← Home System Overview Architecture Data Pipeline Health System Usage System Workflows MCP Tools

MCP Tools — The Brain

Blueprint · Last updated 2026-05-02

Overview

The Brain exposes itself as a Model Context Protocol server via mcp_server.py. This allows Claude to call the delegate tool natively — it appears in Claude's tool list alongside Bash, Read, and Edit — rather than via a Bash call. The same orchestrator runs in both modes.

Registration

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "the-brain": {
      "command": "python",
      "args": ["C:\\Claude\\git\\the-brain\\mcp_server.py"]
    }
  }
}

Claude Code picks it up automatically on next launch. Run python mcp_server.py from the command line to verify the server starts before registering.

Exposed Tool: delegate

This is the only tool The Brain exposes. Claude reaches for it automatically for any AI task that matches the routing guide in CLAUDE.md.

Input Schema

ParameterTypeRequiredDescription
providerstringyesProvider key: cerebras groq gemini mistral sambanova fireworks openai huggingface cloudflare openrouter ollama pollinations
task_typeenumyesclassification summarization coding creative reasoning factual_qa extraction translation general
promptstringyesFull prompt to send to the worker
contextstringnoOptional context block prepended to the prompt
max_tokensintegernoMaximum output tokens (default: 2048)

Response Format

Each call returns TextContent with a header line followed by the content:

[mistral / mistral-small-latest | 512 tokens | 1172ms | free]

<content from the worker>

CLI Equivalent

The MCP tool call above is equivalent to running:

python delegate.py --provider mistral --type coding --prompt "..."

Both invoke the same Orchestrator and log to stats/usage.json.