{"slug": "what-do-your-mcp-tools-cost-your-agent-before-it-starts", "title": "What do your MCP tools cost your agent before it starts?", "summary": "A developer released Switchboard, an open-source MCP gateway front end that exposes 5 tools to an AI agent instead of the hundreds of tool definitions a typical multi-server MCP setup loads, cutting token use by 82.9% across 10 recorded tasks. Switchboard routes search, describe, read, write and more calls through agentgateway, requires Telegram approval for every write with single-use approvals bound to the exact displayed arguments, and defaults to a 50-second approval timeout. The project reports 91 offline tests plus a smoke test against a real agentgateway, and its author notes it has 1 user, himself.", "body_md": "One MCP front door to every tool behind your gateway: agents see five tools instead of hundreds, and every write waits for a tap on your phone.\n\n**Parked**. It works; I am not changing it now and may come back.\n\n``` php\nflowchart LR\n  agent[AI agent] -- \"search · describe · read · write · more\" --> sb[switchboard]\n  sb -- one session per scope --> gw[agentgateway]\n  gw --> s1[GitHub MCP]\n  gw --> s2[Telegram MCP]\n  gw --> s3[... every other MCP server]\n  sb -- \"write? show every argument\" --> tg[Telegram bot]\n  tg -- Approve / Deny --> sb\n```\n\nAn agent connected to every MCP server I run reads hundreds of tool definitions before it reads the task, and any one of those tools can change something. I wanted the agent to look tools up instead of carrying them all, and I wanted a person, not the tool's own description of itself, to decide what may write.\n\n- **Five tools instead of hundreds.**`search` finds a tool,`describe` returns its arguments,`read` runs it,`write` runs it after approval,`more` pages a long result. A scope can add`run(code)` : a script chains read tools\nand only its final value reaches the agent's context: 82.9% fewer tokens on 10 recorded tasks\n([how it was measured, and its limits](https://github.com/Egoushka/switchboard/blob/main/docs/guide/measurement.md) ).\n- **Config decides what reads.** A tool is`read` only if the config says so. A server with no entry is all`write` , and a`destructiveHint` always forces`write` .\n- **Approvals you can trust.** Each write shows every argument on Telegram, with zero-width and bidi characters\nprinted as visible escapes. Approvals are single-use, bound to exactly the arguments shown, denied on timeout\nand refused when Telegram is unreachable.\n- **Small results.** Nulls dropped, an optional JMESPath`query` applied, the first page capped at 6,000 characters.\n- **An audit line per write** , before and after the call, with a hash of the arguments, never the arguments.\n\nNot here: client keys and allow-lists (the gateway owns them), stdio transport, more than one approver, anything\non disk. [What it does not do](https://github.com/Egoushka/switchboard/blob/main/docs/guide/index.md#what-it-does-not-do) has the full list.\n\nWarning\n\n`pip install switchboard` installs an unrelated PyPI project. Use the container image or a clone.\n\nRuns the smoke test CI runs: switchboard between a real agentgateway and a fake MCP server, with a fake Telegram\napprover. Needs Docker with Compose and [uv](https://docs.astral.sh/uv/).\n\n```\ngit clone https://github.com/Egoushka/switchboard.git && cd switchboard\nuv sync && uv run pytest\ndocker build -t switchboard:dev .\ndocker compose -f tests/smoke/compose.yaml up -d\nuv run python tests/smoke/check.py\n```\n\nThe [quickstart guide](https://github.com/Egoushka/switchboard/blob/main/docs/guide/quickstart.md) explains each step and what the output means.\n\nEach *scope* in the config is an MCP endpoint at `/mcp/<scope>` holding one long-lived session to a gateway route.\n`search` ranks that route's tools with BM25 over server name, description and tool name. `write` sends the tool,\nits arguments and the agent's reason to Telegram and runs the call once if Approve arrives before the timeout\n(50 s by default). An approved call runs to the end even if the client gives up.\n[How it works](https://github.com/Egoushka/switchboard/blob/main/docs/guide/how-it-works.md) follows one request through every part.\n\n|  | Value | Source | \n|---|---|---|\n| Tools an agent sees | 5 (4 in a read-only scope) | `test_integration.py` checks both lists | \n| Tests | 91, all offline, plus a smoke test against a real agentgateway | [status](https://github.com/Egoushka/switchboard/blob/main/docs/guide/status.md) | \n| Users | 1, me | counted | \n\n`uv run switchboard measure [config.json]` reads your MCP client config (Claude Code, Claude Desktop, Cursor, OpenCode or a plain `mcpServers` file), connects to every server and prints what its tools cost an agent before it does anything, against the same tools behind switchboard.\nTokens are characters / 4 of name, description and input schema, the estimate of [measurement](https://github.com/Egoushka/switchboard/blob/main/docs/guide/measurement.md); `--json` prints the same as JSON.\nA server that cannot be reached is listed with its reason and does not fail the run; header values and secrets in env vars never print. Sample, on the author's own setup:\n\n```\nserver            tools    tokens\nhomelab-infra        60    15,793\ncontext7              2     1,279\nroslyn                0         0\nhomelab-memory       47    17,781\nhomelab-langfuse     53    12,657\nprompts-chat         17     5,051\nswitchboard           5     1,346\ntotal               184    53,908\n\nHeaviest tools:\n    2,252  hindsight_create_mental_model (homelab-memory)\n    2,109  hindsight_create_page (homelab-memory)\n    2,057  hindsight_update_page_node (homelab-memory)\n    2,040  hindsight_update_mental_model (homelab-memory)\n    1,521  langfuse_listObservations (homelab-langfuse)\n\nBehind switchboard:\n  5 tool definitions (search, describe, read, write, more) with your server list: 564 tokens\n  a typical search result: 215 tokens\n  before the first call: 779 tokens, against 53,908 now (saving 98.6%)\n```\n\n- [Overview](https://github.com/Egoushka/switchboard/blob/main/docs/guide/index.md) : who it is for, the tools, limits, status\n- [Quickstart](https://github.com/Egoushka/switchboard/blob/main/docs/guide/quickstart.md) : the smoke stack, step by step\n- [Deploy](https://github.com/Egoushka/switchboard/blob/main/docs/guide/deploy.md) : config, environment, container, routing clients, measuring the savings\n- [Approvals](https://github.com/Egoushka/switchboard/blob/main/docs/guide/approvals.md) : what the approver sees, what the agent gets back, the audit log\n- [How it works](https://github.com/Egoushka/switchboard/blob/main/docs/guide/how-it-works.md) ·[Reference](https://github.com/Egoushka/switchboard/blob/main/docs/guide/reference.md) ·[Status and evidence](https://github.com/Egoushka/switchboard/blob/main/docs/guide/status.md)\n- [Changelog](https://github.com/Egoushka/switchboard/blob/main/CHANGELOG.md)\n\n<sub>Made by [Yehor Hrabovskyi](https://hrabovskyi.online) · [MIT licence](https://github.com/Egoushka/switchboard/blob/main/LICENSE).</sub>", "url": "https://wpnews.pro/news/what-do-your-mcp-tools-cost-your-agent-before-it-starts", "canonical_source": "https://github.com/Egoushka/switchboard", "published_at": "2026-12-02 01:59:55+00:00", "updated_at": "2026-12-02 02:15:34.310576+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "mlops"], "entities": ["Switchboard", "agentgateway", "Telegram", "Model Context Protocol", "GitHub", "Claude Code", "Claude Desktop", "Cursor"], "also_reported_by": [], "takeaway": "Fronting many MCP servers with a 5-tool search/describe/read/write/more gateway cut tokens 82.9% on 10 recorded tasks, and a run(code) scope that chains read tools and returns only the final value saves further context.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/what-do-your-mcp-tools-cost-your-agent-before-it-starts", "markdown": "https://wpnews.pro/news/what-do-your-mcp-tools-cost-your-agent-before-it-starts.md", "text": "https://wpnews.pro/news/what-do-your-mcp-tools-cost-your-agent-before-it-starts.txt", "jsonld": "https://wpnews.pro/news/what-do-your-mcp-tools-cost-your-agent-before-it-starts.jsonld"}}