ToolRoute
ToolRoute
AI 智能体的路由层。只需一次调用,即可为任何任务返回最佳的 MCP 服务器和大模型——基于 132 次真实基准测试执行进行评分。
快速开始
添加到任何 MCP 客户端(Claude Code、Cursor、Windsurf、Cline):
{
"mcpServers": {
"toolroute": {
"url": "https://toolroute.io/api/mcp"
}
}
}或通过 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_model": "gemini-flash-2.0",
"confidence": 0.91
}Related MCP server: Playwright MCP Server
工作原理
每个任务都属于以下三种方法之一:
方法 | 适用场景 | 返回内容 |
| 任务仅需大模型(代码、写作、分析) | 最佳模型 + 成本估算 |
| 任务需要外部工具(搜索、邮件、日历) | 最佳工具 + 最佳模型 |
| 复合任务(“发送 Slack 并更新 Jira 并发送邮件”) | 有序编排链 |
路由使用大模型分类器(约 $0.00001/次调用)来理解任务,然后根据 5 个维度的评分对候选者进行排名:
Value Score = 0.35 × Output Quality
+ 0.25 × Reliability
+ 0.15 × Efficiency
+ 0.15 × Cost
+ 0.10 × Trust每次报告的结果都会更新评分。随着使用该路由的智能体越多,路由会变得越准确。
基准测试结果
在代码、写作、分析、结构化输出和翻译方面进行了 132 次盲测 A/B 执行。
ToolRoute | 固定 GPT-4o | |
质量胜出 | 6 | 0 |
平局 | 9 | 9 |
失败 | 0 | — |
平均成本 | $0.001–0.01 | $0.03–0.10 |
API
端点 | 方法 | 描述 |
| POST | 将任务路由到最佳 MCP 服务器 + 大模型 |
| POST (JSON-RPC) | MCP 服务器 — 16 个工具 |
| GET (SSE) | 用于 MCP 客户端的 SSE 传输 |
| POST | 报告模型结果 |
| POST | 验证模型输出质量 |
| GET | 搜索 MCP 服务器目录 |
| POST | 注册智能体身份 |
完整参考请见 toolroute.io/api-docs
SDK
npm install @toolroute/sdkimport { 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 })自托管
git clone https://github.com/grossiweb/ToolRoute.git
cd ToolRoute
cp .env.local.example .env.local
npm install
npm run dev需要:NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY
路由工作原理
ToolRoute 使用大模型分类器(Gemini Flash Lite,约 $0.00001/次调用)并结合关键字回退来对每个任务进行分类。所得层级通过 src/lib/routing/tiers.ts 映射到特定模型。实时定价和能力数据来自 models 表。请参阅 docs/architecture.md 以获取完整概览。
技术栈
Next.js 14 (App Router) · Supabase (Postgres) · Vercel
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Cost-optimized LLM model routing recommendations for autonomous AI agents
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
HiveCompute MCP Server — decentralized inference router for AI agents
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.814,508 npm5,048MIT

Playwright MCP Serverofficial
AlicenseBqualityAmaintenanceA Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.16257,529,920 npm37,580Apache 2.0- AlicenseAqualityAmaintenanceMCP Server that enables LLMs to interact with the local filesystem.13865 npm23MIT
- AlicenseNot gradedqualityDmaintenanceA model routing advisor for autonomous agents — get cost-optimised LLM recommendations via MCP.12 npmMIT