ToolRoute MCP server
✓ VerifiedRoutes AI agent tasks to the most effective MCP server and LLM based on performance benchmarks and cost efficiency.
Also known as grossiweb/ToolRoute, @toolroute/sdk
- Stars
- 2
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.2.2
- Last commit
- Jul 1, 2026
- License
- MIT
What is ToolRoute MCP?
ToolRoute routes AI agent tasks to the most effective MCP server and LLM based on performance benchmarks and cost efficiency.
Summary generated from the project's README
About ToolRoute MCP server
ToolRoute acts as a routing layer for AI agents to identify the most effective MCP server and large language model for a specific task. It is designed for developers using MCP clients like Claude Code, Cursor, Windsurf, or Cline. By connecting via a remote URL or using the HTTP API, users can receive recommendations based on a scoring system that evaluates output quality, reliability, efficiency, cost, and trust.
The system categorizes requests into three distinct approaches: direct LLM for writing or analysis, MCP server for external tools like email or search, and multi-tool for complex orchestration chains. It uses an LLM classifier to understand tasks and ranks candidates using data from 132 real benchmark executions. This allows agents to select tools like the Exa MCP Server or models such as Claude Haiku 4.5 based on performance and cost efficiency.
What you can do with it
- 1Optimize agent tool selectionAn AI agent can determine which specific MCP server to use for a web search task.
- 2Improve task reliabilityThe routing engine uses a five-dimension score to pick the most dependable model and tool combination.
Written from the project's README. Every use case is checked against a quote from it.
How to install ToolRoute MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall ToolRoute MCP in Claude Code
$ claude mcp add toolroute -- npx -y @toolroute/sdkInstall ToolRoute MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"toolroute": {
"command": "npx",
"args": [
"-y",
"@toolroute/sdk"
]
}
}
}Install ToolRoute MCP in VS Code
.vscode/mcp.json
{
"servers": {
"toolroute": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolroute/sdk"
]
}
}
}Install ToolRoute MCP in VS Code CLI
$ code --add-mcp '{"name":"toolroute","type":"stdio","command":"npx","args":["-y","@toolroute/sdk"]}'Install ToolRoute MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"toolroute": {
"command": "npx",
"args": [
"-y",
"@toolroute/sdk"
]
}
}
}Install ToolRoute MCP in Codex
$ codex mcp add toolroute -- npx -y @toolroute/sdkInstall ToolRoute MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.toolroute] command = "npx" args = ["-y", "@toolroute/sdk"]
Install ToolRoute MCP in Gemini CLI
$ gemini mcp add -s user toolroute npx -- -y @toolroute/sdkInstall ToolRoute MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"toolroute": {
"command": "npx",
"args": [
"-y",
"@toolroute/sdk"
]
}
}
}Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablegrossiweb/toolroute is public and reachablegithub.com/grossiweb/toolroute ↗Pass
- Package names this repository as its source@toolroute/sdk names grossiweb/toolroute as sourcenpmjs.com/package/@toolroute/sdk ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-07-01github.com/grossiweb/toolroute ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @toolroute/sdkPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubToolRoute
Routing layer for AI agents. One call returns the best MCP server and LLM for any task — scored on 132 real benchmark executions.
Quick start
Add to any MCP client (Claude Code, Cursor, Windsurf, Cline):
{
"mcpServers": {
"toolroute": {
"url": "https://toolroute.io/api/mcp"
}
}
}
Or via HTTP:
curl -X POST https://toolroute.io/api/route \
-H "Content-Type: application/json" \
-d '{"task": "search the web for recent AI papers"}'
{
"approach": "mcp_server",
"recommended_skill": "exa-mcp-server",
"recommended_skill_name": "Exa MCP Server",
"recommended_model": {
"slug": "claude-haiku-4-5-20251001",
"display_name": "Claude Haiku 4.5",
"provider": "anthropic",
"tier": "cheap_chat",
"provider_model_id": "anthropic/claude-haiku-4-5-20251001",
"input_cost_per_mtok": 1.00,
"output_cost_per_mtok": 5.00
},
"confidence": 0.91,
"alternatives": ["brave-search-mcp", "tavily-mcp"],
"fallback": "brave-search-mcp"
}
recommended_modelis always an object, not a bare string — the innerslugis the canonical model identifier.
How it works
Every task falls into one of three approaches:
| Approach | When | Returns |
|---|---|---|
direct_llm |
Task needs only an LLM (code, writing, analysis) | Best model + cost estimate |
mcp_server |
Task needs an external tool (search, email, calendar) | Best tool + best model |
multi_tool |
Compound task ("send Slack AND update Jira AND email") | Ordered orchestration chain |
Routing uses an LLM classifier (~$0.00001/call) for task understanding, then ranks candidates on a 5-dimension score:
Value Score = 0.35 × Output Quality
+ 0.25 × Reliability
+ 0.15 × Efficiency
+ 0.15 × Cost
+ 0.10 × Trust
Every reported outcome updates the scores. The routing gets more accurate as more agents use it.
Benchmark results
132 blind A/B executions across code, writing, analysis, structured output, and translation.
| ToolRoute | Fixed GPT-4o | |
|---|---|---|
| Quality wins | 6 | 0 |
| Ties | 9 | 9 |
| Losses | 0 | — |
| Avg cost | $0.001–0.01 | $0.03–0.10 |
API
| Endpoint | Method | Description |
|---|---|---|
/api/route |
POST | Route a task to best MCP server + LLM (unified) |
/api/route/model |
POST | Route to best LLM model only (no MCP server) |
/api/mcp |
POST (JSON-RPC) | MCP server — 16 tools |
/api/mcp |
GET (SSE) | SSE transport for MCP clients |
/api/report |
POST | Report MCP server outcome (lightweight) |
/api/contributions |
POST | Advanced MCP skill telemetry (requires skill_id or skill_slug in payload) |
/api/report/model |
POST | Report LLM model outcome — use this for model telemetry, not /api/contributions |
/api/verify/model |
POST | Verify model output quality |
/api/skills |
GET | Search MCP server catalog |
/api/agents/register |
POST | Register agent identity |
/api/agents/preferences |
POST | Set routing preferences (Strategy D Phase 2 — allow_china, regulated_industries) |
/api/health |
GET | Service health check (DB + uptime) |
/api/metrics |
GET | Public aggregate platform metrics (no auth) |
Full reference at toolroute.io/api-docs
SDK
npm install @toolroute/sdk
import { ToolRoute } from '@toolroute/sdk'
const tr = new ToolRoute()
const rec = await tr.route({ task: 'parse this CSV and summarize it' })
// execute with rec.recommended_model ...
await tr.report({ skill: rec.recommended_skill, outcome: 'success', latency_ms: 1400 })
Self-hosting
git clone https://github.com/grossiweb/ToolRoute.git
cd ToolRoute
cp .env.local.example .env.local
npm install
npm run dev
Requires: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY
How routing works
ToolRoute classifies each task using an LLM classifier (Gemini Flash Lite,
~$0.00001/call) with a keyword fallback. The resulting tier maps to a specific
model via src/lib/routing/tiers.ts. Live pricing and capability data come
from the models table. See docs/architecture.md
for the full picture.
Stack
Next.js 14 (App Router) · Supabase (Postgres) · Vercel
License
MIT
ToolRoute MCP questions
How do I add ToolRoute MCP to Claude Code?
Run claude mcp add toolroute -- npx -y @toolroute/sdk in your terminal. Add --scope user to make it available in every project.
How do I add ToolRoute MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How does ToolRoute decide which tool or model to use?
It uses an LLM classifier to understand the task and then ranks candidates using a five-dimension score covering quality, reliability, efficiency, cost, and trust.
Can I use ToolRoute with existing MCP clients?
Yes, it can be added to clients like Claude Code, Cursor, Windsurf, and Cline via a JSON configuration.