Компилирует несколько MCP server и REST API в единую оптимизированную конечную точку (endpoint), чтобы снизить расход контекста и повысить точность работы агентов.
Также известен как toolc-dev/toolc, @toolc/cli
- Звёзды
- 0
- Инструменты
- —
- Загрузки, 30 дней
- —
- Последняя версия
- 0.1.1
- Последний коммит
- 15 сент. 2026 г.
- Лицензия
- Apache-2.0
Что такое toolc MCP?
toolc — это MCP server. Компилирует несколько MCP server и REST API в единую оптимизированную конечную точку (endpoint), чтобы снизить расход контекста и повысить точность работы агентов.
Сводка сгенерирована из README проекта
О toolc MCP server
toolc выступает в роли оптимизирующего компилятора для интерфейсов инструментов агентов, предназначенного для предотвращения раздувания контекстного окна при подключении нескольких MCP server или REST API. Вместо того чтобы передавать все определения инструментов в контекст модели, эта система компилирует федерацию инструментов в единую оптимизированную конечную точку. Разработчики могут направить движок на существующие MCP server, спецификации OpenAPI или даже страницы документации для создания более эффективного интерфейса инструментов.
Пользователи могут запускать инструмент локально через CLI или использовать хостинг-сервис на toolc.dev для получения управляемых HTTPS endpoint и доступа к лог-эксплореру. Процесс компиляции включает переписывание описаний для лучшего понимания LLM, объединение почти дублирующих друг друга инструментов в единые фасадные инструменты и сжатие всего каталога за мета-инструментами, такими как search_tools и call_tool. Для выполнения этапов переписывания и консолидации системе требуется ANTHROPIC_API_KEY. Полученный интерфейс можно развернуть через stdio для использования в таких клиентах, как Claude, или как стандартный REST API.
Что вы можете с ним делать
- 1Снижение затрат на токеныМинимизируйте расходы на выполнение задач агентами за счет сжатия определений инструментов и суммаризации избыточных результатов.
- 2Интеграция REST APIДобавляйте возможности внешних веб-сервисов вашему агенту, используя спецификацию OpenAPI или документацию.
Взято из README проекта. Каждый вариант использования проверен на соответствие цитате из него.
Как установить toolc MCP
Форматы проверены 10 ноя 2026Добавить в CursorДобавить в GooseУстановка toolc MCP в Claude Code
$ claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc -- npx -y @toolc/cliУстановка toolc MCP в Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Установка toolc MCP в VS Code
.vscode/mcp.json
{
"servers": {
"toolc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Установка toolc MCP в VS Code CLI
$ code --add-mcp '{"name":"toolc","type":"stdio","command":"npx","args":["-y","@toolc/cli"],"env":{"ANTHROPIC_API_KEY":"<YOUR_ANTHROPIC_API_KEY>"}}'Установка toolc MCP в Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Установка toolc MCP в Codex
$ codex mcp add toolc --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' -- npx -y @toolc/cliУстановка toolc MCP в Codex config.toml
~/.codex/config.toml
[mcp_servers.toolc] command = "npx" args = ["-y", "@toolc/cli"] [mcp_servers.toolc.env] ANTHROPIC_API_KEY = "<YOUR_ANTHROPIC_API_KEY>"
Установка toolc MCP в Gemini CLI
$ gemini mcp add -s user -e 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc npx -- -y @toolc/cliУстановка toolc MCP в Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Конфигурация
ANTHROPIC_API_KEYСекретEnables the LLM-assisted compile passes (rewrite, consolidate). Without it, toolc serves a mirror of the original tool surface.
| Название | Описание | Тип |
|---|---|---|
| ANTHROPIC_API_KEY | Enables the LLM-assisted compile passes (rewrite, consolidate). Without it, toolc serves a mirror of the original tool surface. | Секрет |
Автоматические проверки
Запущено 14 нояб. 2026 г.Полный отчёт →Прошло наши автоматизированные проверки. Это не аудит безопасности: изучите код и предоставьте серверу минимально необходимый доступ. Как работают проверки
- Связанный и доступный исходный репозиторийtoolc-dev/toolc is public and reachablegithub.com/toolc-dev/toolc ↗Пройдено
- Пакет указывает этот репозиторий как источник@toolc/cli names toolc-dev/toolc as sourcenpmjs.com/package/@toolc/cli ↗Пройдено
- Происхождение сборки (аттестация Sigstore)No build attestation published for this releaseНе проверялось
- Open source лицензия (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Пройдено
- Коммит или релиз за последний годLast commit or release 2026-09-15github.com/toolc-dev/toolc ↗Пройдено
- OpenSSF ScorecardНе проверялось
- Имя пакета не похоже на популярный пакетNo popular package one edit away from @toolc/cliПройдено
- Нет критических предупреждений в пакете или его зависимостях102 resolved dependencies checked; no critical advisoryosv.dev ↗Пройдено
- Нет скрытых инструкций для модели0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersПройдено
- Деструктивные инструменты помеченыНе проверялось
- Удалённая конечная точка отвечает на рукопожатие MCPНе проверялось
README
Открыть на GitHubtoolc
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):
| condition | success | cost / completed task | tool-def context |
|---|---|---|---|
| raw (all 131 tools) | 96.7% | $0.2631 | ~24,360 tok |
| compiled + consolidate | 96.7% | $0.0411 (6.4× cheaper) | ~845 tok |
| consolidate, no selection | 100.0% | $0.1335 | ~14,506 tok |
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
git clone https://github.com/toolc-dev/toolc && cd toolc
pnpm install && pnpm -r test
# describe your federation
cp toolc.config.example.jsonc toolc.config.jsonc
# introspect it
node packages/cli/bin/toolc.mjs -c toolc.config.jsonc inspect
# compile (set ANTHROPIC_API_KEY for the rewrite/consolidate passes)
node packages/cli/bin/toolc.mjs -c toolc.config.jsonc compile
# serve the compiled surface over stdio (add to Claude as an MCP server)
node packages/cli/bin/toolc.mjs -c toolc.config.jsonc serve --mode compiled
A downstream can be an MCP server or a bare REST API:
{
"downstream": [
{ "id": "gh", "transport": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } },
{ "id": "nws", "transport": { "type": "openapi", "spec": "https://api.weather.gov/openapi.json" } }
]
}
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.
Вопросы о toolc MCP
Как добавить toolc MCP в Claude Code?
Выполните claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc -- npx -y @toolc/cli в терминале. Добавьте --scope user, чтобы сервер был доступен во всех проектах.
Как добавить toolc MCP в Cursor?
Откройте ~/.cursor/mcp.json и добавьте сервер в mcpServers, используя конфигурацию Cursor из раздела установки выше.
Могу ли я использовать свои собственные REST API с toolc?
Да, вы можете добавить REST API, предоставив спецификацию OpenAPI или используя черновую спецификацию, синтезированную на основе документации.
Поддерживает ли toolc локальное развертывание?
Да, движок распространяется под лицензией Apache-2.0 и позволяет компилировать и запускать интерфейсы инструментов локально через CLI.
Насколько сильно toolc может снизить затраты?
Бенчмарки показывают, что скомпилированные и консолидированные интерфейсы инструментов могут быть до 6.4 раз дешевле, чем использование необработанных инструментов.