Mengompilasi beberapa MCP server dan REST API menjadi satu endpoint tool yang teroptimasi untuk mengurangi penggunaan context dan meningkatkan akurasi agent.
Juga dikenal sebagai toolc-dev/toolc, @toolc/cli
- Stars
- 0
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- 0.1.1
- Commit terakhir
- 15 Sep 2026
- Lisensi
- Apache-2.0
Apa itu toolc MCP?
toolc adalah MCP server. Mengompilasi beberapa MCP server dan REST API menjadi satu endpoint tool yang teroptimasi untuk mengurangi penggunaan context dan meningkatkan akurasi agent.
Ringkasan dibuat dari README proyek
Tentang toolc MCP server
toolc bertindak sebagai compiler optimasi untuk agent tool surface, yang dirancang untuk mencegah pembengkakan context window saat menghubungkan beberapa MCP server atau REST API. Alih-alih memasukkan setiap definisi tool ke dalam context model, sistem ini mengompilasi federasi tool menjadi satu endpoint yang ramping. Developer dapat mengarahkan engine ke MCP server yang sudah ada, spesifikasi OpenAPI, atau bahkan halaman dokumentasi untuk menghasilkan tool surface yang lebih cerdas.
User dapat menjalankannya secara lokal melalui CLI atau menggunakan layanan hosted di toolc.dev untuk mendapatkan managed HTTPS endpoint dan log explorer. Proses kompilasi mencakup penulisan ulang deskripsi agar lebih mudah dipahami LLM, konsolidasi tool yang hampir duplikat menjadi single facade tool, dan kompresi seluruh katalog di balik meta-tools seperti search_tools dan call_tool. Untuk menjalankan proses rewrite dan consolidate, sistem memerlukan ANTHROPIC_API_KEY. Hasil akhirnya dapat disajikan melalui stdio untuk digunakan di client seperti Claude atau sebagai REST API standar.
Apa yang bisa Anda lakukan dengannya
- 1Mengurangi biaya tokenMinimalkan pengeluaran untuk tugas agent dengan mengompresi definisi tool dan meringkas hasil yang terlalu besar.
- 2Integrasi REST APITambahkan layanan web eksternal ke dalam kapabilitas agent Anda menggunakan spesifikasi OpenAPI atau dokumentasi.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal toolc MCP
Format diverifikasi 10 Nov 2026Tambahkan ke CursorTambahkan ke GooseInstal toolc MCP di Claude Code
$ claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc -- npx -y @toolc/cliInstal toolc MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Instal toolc MCP di VS Code
.vscode/mcp.json
{
"servers": {
"toolc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Instal toolc MCP di VS Code CLI
$ code --add-mcp '{"name":"toolc","type":"stdio","command":"npx","args":["-y","@toolc/cli"],"env":{"ANTHROPIC_API_KEY":"<YOUR_ANTHROPIC_API_KEY>"}}'Instal toolc MCP di Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Instal toolc MCP di Codex
$ codex mcp add toolc --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' -- npx -y @toolc/cliInstal toolc MCP di 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>"
Instal toolc MCP di Gemini CLI
$ gemini mcp add -s user -e 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc npx -- -y @toolc/cliInstal toolc MCP di Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"toolc": {
"command": "npx",
"args": [
"-y",
"@toolc/cli"
],
"env": {
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>"
}
}
}
}Konfigurasi
ANTHROPIC_API_KEYRahasiaEnables the LLM-assisted compile passes (rewrite, consolidate). Without it, toolc serves a mirror of the original tool surface.
| Nama | Deskripsi | Tipe |
|---|---|---|
| ANTHROPIC_API_KEY | Enables the LLM-assisted compile passes (rewrite, consolidate). Without it, toolc serves a mirror of the original tool surface. | Rahasia |
Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap →Lolos checks otomatis kami. Ini bukan audit keamanan: baca kodenya dan berikan server akses paling terbatas yang dibutuhkannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkautoolc-dev/toolc is public and reachablegithub.com/toolc-dev/toolc ↗Lolos
- Nama paket mencantumkan repositori ini sebagai sumbernya@toolc/cli names toolc-dev/toolc as sourcenpmjs.com/package/@toolc/cli ↗Lolos
- Provenance build (atestasi Sigstore)No build attestation published for this releaseTidak diperiksa
- Lisensi open source (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-09-15github.com/toolc-dev/toolc ↗Lolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerNo popular package one edit away from @toolc/cliLolos
- Tidak ada advisory kritis pada paket atau dependensinya102 resolved dependencies checked; no critical advisoryosv.dev ↗Lolos
- Tidak ada instruksi tersembunyi untuk model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di 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.
Pertanyaan tentang toolc MCP
Bagaimana cara menambahkan toolc MCP ke Claude Code?
Jalankan claude mcp add --env 'ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>' toolc -- npx -y @toolc/cli di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan toolc MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Bisakah saya menggunakan REST API saya sendiri dengan toolc?
Ya, Anda bisa menyertakan REST API dengan menyediakan spesifikasi OpenAPI atau menggunakan draf spesifikasi yang disintesis dari dokumentasi.
Apakah toolc mendukung deployment lokal?
Ya, engine ini memiliki lisensi Apache-2.0 dan memungkinkan Anda untuk mengompilasi serta menjalankan tool surface secara lokal menggunakan CLI.
Seberapa besar toolc dapat mengurangi biaya?
Benchmark menunjukkan bahwa tool surface yang telah dikompilasi dan dikonsolidasi bisa 6.4 kali lebih murah dibandingkan menggunakan tool mentah.