
Toolc
dev.toolc由 toolc.dev 发布v0.1.1更新于 Oct 24, 2026
Optimizing compiler for agent tools: many MCP servers or REST APIs in, one lean endpoint out.
概览
一个本地编译器,把多个 MCP 服务器或 REST API 整合成一个精简、成本更低的工具面,通过 stdio 提供给助手。
- 可以做什么
- 把多个 MCP 服务器、OpenAPI 规范或文档页面编译成一个更小的工具面,每个处理环节都可配置开关(R1、R17)。重写工具描述,并把近似重复的工具合并为带确定性路由的门面工具(R4、R5)。可选地把整个目录藏在 search_tools 和 call_tool 两个元工具之后,以最大程度节省上下文(R6)。在服务时对过大的结果做摘要,同时保留标识符和来源信息(R7)。记录每次调用的参数和结果,并把反复出现的错误聚类为修复建议(R9)。
- 适用场景
- 当助手连接多个 MCP 服务器或 REST API,合并后的工具定义挤占上下文或降低工具选择质量时适用(R2)。适合希望降低单任务成本、提高工具选择准确度,又不想逐个手动精简服务器的场景。
- 运行要求
- 作为本地进程通过 stdio 运行,从 npm 包 @toolc/cli 安装;README 的快速开始使用 pnpm 从源码构建。需要 toolc.config.jsonc 描述下游服务器或 OpenAPI 规范。环境变量 ANTHROPIC_API_KEY 启用 LLM 辅助的 rewrite 和 consolidate 环节;未设置时,toolc 提供原始工具面的镜像。
安装
在 SourceWeft 中
- 打开 控制台中的 Toolc,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
toolc
The optimizing compiler for agent tool surfaces. Point it at your MCP servers, or just a REST API's OpenAPI spec, or even a docs page, and get back one endpoint that serves a smaller, smarter tool surface: cheaper for every agent that connects, more accurate on every task, with every call logged.
Connecting N MCP servers dumps every tool definition into the model's context, degrades tool selection, and forces improvised multi-hop call chains. toolc compiles the federation instead:
- Rewrite: LLM-optimized descriptions with sibling disambiguation
- Consolidate: families of near-duplicate tools (
search_x/find_x/get_x) merge into single facade tools with deterministic routing - Selection: the whole catalog compresses behind two meta-tools
(
search_tools/call_tool) when you want maximum context savings - Compaction: oversized results are summarized at serve time, preserving identifiers and sourcing details
- Compose: REST APIs join the pool straight from an OpenAPI spec, or from a drafted spec synthesized from their documentation
- Observe: every call logged with arguments and results; recurring errors cluster into recommended fixes
Benchmark
131 tools across 5 live servers, 30 tasks × 3 trials, judged answers (full grid · consolidation run):
Consolidation dominates both ends of the frontier: the selection surface is the cost lever, consolidation lifts accuracy everywhere. Every pass is a config toggle; pick the tradeoff per deployment.
Quick start
A downstream can be an MCP server or a bare REST API:
See SELF_HOSTING.md for Docker deployment.
Hosted
toolc.dev runs this same engine as a managed service: compiled HTTPS endpoints, a console with a playground and full-payload log explorer, docs-to-spec drafting, and error-driven fix recommendations.
Layout
packages/core: IR (Capability Graph), frontends (MCP, OpenAPI, docs synthesis), passes, emitpackages/gateway: runtime MCP server (mirror + compiled) with call logging and compactionpackages/cli: thetoolccommandpackages/harness: benchmark runner, grading, reportspackages/shared: config schema, errors
License
The engine (everything in this repository) is Apache-2.0, forever: anyone can compile and serve their own tool surfaces locally with the exact same compilation quality as the hosted product.
来源:README.md,提交 69f0bec
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分