441 tools in.Three tools out.
mcp-router sits between Claude Code and your MCP servers. Claude searches for the tool it needs instead of carrying every tool in every request, and results arrive trimmed to what matters.
Install in one line
macOS and Linux, x86_64 and arm64. Checks the SHA-256 checksum, then installs to ~/.local/bin.
curl -fsSL https://raw.githubusercontent.com/rabin-a/mcp-router/master/install.sh | sh
Move the MCP servers you already use in Claude Code into the router, then add the router itself:
mcp-router import
claude mcp add router -s user -- mcp-router
Adding new servers works like claude mcp add:
mcp-router add -e GITHUB_TOKEN=... github -- npx -y @modelcontextprotocol/server-github
mcp-router add -t http linear https://mcp.linear.app/mcp
Three tools stand in for all of them
Servers start only when a tool is first used. Tool lists are cached, so search works without starting anything.
- find_tools
- Keyword search across every connected server. Returns the best matches with their argument schemas, stripped of noise.
- call_tool
- Calls a tool by
server.toolname. JSON results lose link templates, nulls and whitespace, so large results stay small enough to read inline. - run_script
- Sandboxed JavaScript that chains several calls in one step and returns only the answer. No files, network or imports.
Measured in Claude Code, against six other proxies
Each setup fronted the same 441-tool fleet and ran three tasks that call tools, twice each. Bars show the average change in tokens compared with connecting the servers directly. A task only counted if the server logs showed the work was done.
- mcp-router6 of 6 tasks done −29%
- lazy-mcp6 of 6 tasks done +52%
- mcp-gateway (RaiAnsar)6 of 6 tasks done +72%
- mcp-tool-search6 of 6 tasks done +75%
- MCPGateway4 of 6 tasks done +145%
- mcp-tool-router0 of 6 tasks done search found nothing in Claude Code
- mcp-context-proxy0 of 6 tasks done truncated results, wrong server
- Every proxy trims the fixed cost of listing 441 tools, about 15% per request. That part is easy.
- Most proxies then spend more than they save: each extra search or schema lookup is another turn that re-reads the whole conversation.
- Claude Code also defers a proxy's own tools unless they set
anthropic/alwaysLoad. mcp-router is the only one tested that does. - Result size matters most. Results over 50,000 characters are saved to a file Claude must read back; shaping JSON keeps them inline.
The fleet is synthetic and each cell ran twice, so treat small differences as noise. Setup, caveats, raw data and a harness to reproduce it are in BENCHMARK.md.