Skip to main content
Glama
vola-trebla

toad-mcp-server

by vola-trebla
README.md
# toad-mcp-server

![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)
![Node.js](https://img.shields.io/badge/Node.js-339933?logo=nodedotjs&logoColor=white)
![MCP](https://img.shields.io/badge/MCP-Model_Context_Protocol-8B5CF6)
![Zod](https://img.shields.io/badge/Zod-v4-3E67B1?logo=zod&logoColor=white)
![ESLint](https://img.shields.io/badge/ESLint-4B32C3?logo=eslint&logoColor=white)
![Prettier](https://img.shields.io/badge/Prettier-F7B93E?logo=prettier&logoColor=black)
![CI](https://img.shields.io/github/actions/workflow/status/vola-trebla/toad-mcp-server/ci.yml?label=CI&logo=githubactions&logoColor=white)
![License](https://img.shields.io/badge/License-ISC-blue)

> šŸ”Œ MCP server exposing portfolio AI tools via [Model Context Protocol](https://modelcontextprotocol.io).
> Connect to Claude Desktop and call Semantic Search, Eval Framework, and Prompt Management tools directly from chat.

## šŸ—ļø Architecture

```
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    stdio / HTTP     ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   Claude Desktop    │◄────────────────-──►│    toad-mcp-server       │
│   (MCP Client)      │                     │                          │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜                     │  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”  │
                                            │  │ toad_search_docs   │──┼──► Semantic Search API
                                            │  ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤  │
                                            │  │ toad_run_eval      │──┼──► Eval Framework API
                                            │  ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤  │
                                            │  │ toad_system_status │──┼──► Health checks
                                            │  ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€-────┤  │
                                            │  │ toad_list_prompts  │  │
                                            │  ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤  │
                                            │  │ toad_get_prompt    │  │
                                            │  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜  │
                                            ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
```

## šŸ› ļø Tools

| Tool                    | Description                                               | Read-only |
| ----------------------- | --------------------------------------------------------- | --------- |
| `toad_search_documents` | Semantic search over documents via natural language query | Yes       |
| `toad_run_eval`         | Run eval suite against a prompt variant, returns scores   | No        |
| `toad_system_status`    | Health check all portfolio services (latency, status)     | Yes       |
| `toad_list_prompts`     | List prompts with pagination and tag filtering            | Yes       |
| `toad_get_prompt`       | Get prompt by name with version, template, score history  | Yes       |

All tools support `response_format: "markdown" | "json"` where applicable.

## šŸ“¦ Resources

| URI                     | Description                                  |
| ----------------------- | -------------------------------------------- |
| `toad://system/status`  | Health status of all services (JSON)         |
| `toad://prompts/{name}` | Get prompt by name with full metadata (JSON) |

## šŸš€ Quick Start

```bash
# Install
npm install

# Build
npm run build

# Run (stdio — for Claude Desktop)
npm start

# Run (HTTP — for remote/multi-client access)
TRANSPORT=http npm start

# Dev mode
npm run dev
```

## šŸ–„ļø Claude Desktop Setup

1. Build the server:

   ```bash
   npm run build
   ```

2. Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

   ```json
   {
     "mcpServers": {
       "toad-mcp-server": {
         "command": "node",
         "args": ["dist/index.js"],
         "cwd": "/absolute/path/to/toad-mcp-server",
         "env": {
           "SEMANTIC_SEARCH_URL": "http://localhost:3001",
           "EVAL_FRAMEWORK_URL": "http://localhost:3002"
         }
       }
     }
   }
   ```

3. Restart Claude Desktop — tools appear automatically.

## šŸ” Testing with MCP Inspector

```bash
npx @modelcontextprotocol/inspector node dist/index.js
```

Opens a web UI to test each tool interactively.

## āš™ļø Environment Variables

| Variable              | Default                 | Description                       |
| --------------------- | ----------------------- | --------------------------------- |
| `SEMANTIC_SEARCH_URL` | `http://localhost:3001` | Semantic Search Engine endpoint   |
| `EVAL_FRAMEWORK_URL`  | `http://localhost:3002` | Eval Framework endpoint           |
| `TRANSPORT`           | `stdio`                 | Transport mode: `stdio` or `http` |
| `PORT`                | `3100`                  | HTTP transport port               |
| `HOST`                | `127.0.0.1`             | HTTP transport bind address       |

## šŸ“œ Scripts

| Script           | Description                   |
| ---------------- | ----------------------------- |
| `npm run build`  | Compile TypeScript to `dist/` |
| `npm run dev`    | Run with tsx (hot reload)     |
| `npm start`      | Run compiled server           |
| `npm run lint`   | ESLint check                  |
| `npm run format` | Prettier format               |

## 🧱 Tech Stack

- TypeScript (NodeNext, strict)
- [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) — MCP server SDK
- [Zod](https://zod.dev) v4 — input validation
- ESLint + Prettier + Husky — code quality
- GitHub Actions — CI (lint → format → build)

## šŸ“„ License

ISC

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct capability: semantic search, eval execution, system health, prompt listing, and prompt detail retrieval. The relationship between list_prompts and get_prompt is complementary rather than ambiguous.

Naming Consistency5/5

All tools follow the same `toad_` prefix with a clear verb_noun pattern: search_documents, run_eval, system_status, list_prompts, get_prompt. This makes the toolset highly predictable.

Tool Count5/5

Five tools is well-scoped for a specialized server covering search, evaluation, system health, and prompt registry access. Each tool earns its place without redundant or unnecessary entries.

Completeness3/5

The server supports read/search/run workflows, but lacks prompt registry write operations (create/update/delete) and any way to list available eval suites. Agents may encounter dead ends when trying to discover eval inputs or manage prompt lifecycle.