Toolroute

io.github.grossiweb由 GitHub 账号 grossiweb 发布v0.2.2更新于 Oct 24, 2026

Route AI agent tasks to the best MCP server and LLM, scored on 132+ real benchmark executions.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

ToolRoute 根据基准执行评分为任务推荐最合适的 MCP 服务器和 LLM 模型,让助手在行动前选好工具与模型

可以做什么
将任务路由到推荐的 MCP 服务器加 LLM 模型,或仅推荐模型,并给出置信度、备选方案、回退选项和各模型成本估算。把复合任务分类为有序的多工具编排链。搜索 MCP 服务器目录,并查询服务健康状态和公开汇总指标。回传执行结果和模型输出质量,注册代理身份或设置路由偏好。
适用场景
当助手需要在众多 MCP 服务器或 LLM 模型之间做选择,并希望获得带成本估算的评分推荐时适用;复合任务需要有序工具链时也适用。若已明确要用的工具和模型,则用处不大。
运行要求
README 显示可将远程端点添加到 MCP 客户端,或本地安装 npm SDK 包;清单列出本地 stdio 进程。需要访问托管服务的网络。常规使用未声明 API 密钥或环境变量;自托管需要 Supabase 相关变量。
安装前请注意
路由会把任务文本发送到第三方托管服务,该服务还会对其运行 LLM 分类器。上报与遥测端点会把执行结果和技能标识回传,结果会更新共享评分。自托管需要 Supabase 凭据,包括服务角色密钥。路由调用会产生少量按次费用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Toolroute,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ToolRoute

Routing layer for AI agents. One call returns the best MCP server and LLM for any task — scored on 132 real benchmark executions.

[MIT]


Quick start

Add to any MCP client (Claude Code, Cursor, Windsurf, Cline):

json
{  "mcpServers": {    "toolroute": {      "url": "https://toolroute.io/api/mcp"    }  }}

Or via HTTP:

bash
curl -X POST https://toolroute.io/api/route \  -H "Content-Type: application/json" \  -d '{"task": "search the web for recent AI papers"}'
json
{  "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_model is always an object, not a bare string — the inner slug is the canonical model identifier.


How it works

Every task falls into one of three approaches:

ApproachWhenReturns
direct_llmTask needs only an LLM (code, writing, analysis)Best model + cost estimate
mcp_serverTask needs an external tool (search, email, calendar)Best tool + best model
multi_toolCompound 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.

ToolRouteFixed GPT-4o
Quality wins60
Ties99
Losses0—
Avg cost$0.001–0.01$0.03–0.10

API

EndpointMethodDescription
/api/routePOSTRoute a task to best MCP server + LLM (unified)
/api/route/modelPOSTRoute to best LLM model only (no MCP server)
/api/mcpPOST (JSON-RPC)MCP server — 16 tools
/api/mcpGET (SSE)SSE transport for MCP clients
/api/reportPOSTReport MCP server outcome (lightweight)
/api/contributionsPOSTAdvanced MCP skill telemetry (requires skill_id or skill_slug in payload)
/api/report/modelPOSTReport LLM model outcome — use this for model telemetry, not /api/contributions
/api/verify/modelPOSTVerify model output quality
/api/skillsGETSearch MCP server catalog
/api/agents/registerPOSTRegister agent identity
/api/agents/preferencesPOSTSet routing preferences (Strategy D Phase 2 — allow_china, regulated_industries)
/api/healthGETService health check (DB + uptime)
/api/metricsGETPublic aggregate platform metrics (no auth)

Full reference at toolroute.io/api-docs


SDK

bash
npm install @toolroute/sdk
typescript
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

bash
git clone https://github.com/grossiweb/ToolRoute.gitcd ToolRoutecp .env.local.example .env.localnpm installnpm 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

来源:README.md,提交 40b88de

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分