dev.toolc/toolc

Official registry Developer tools

Optimizing compiler for agent tools: many MCP servers or REST APIs in, one lean endpoint out.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package @toolc/cli
Claude Code
claude mcp add toolc -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y @toolc/cli@0.1.1 serve
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "toolc": {
            "command": "npx",
            "args": [
                "-y",
                "@toolc/cli@0.1.1",
                "serve"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<your anthropic_api_key>"
            }
        }
    }
}

Environment variables

  • ANTHROPIC_API_KEY secret Enables the LLM-assisted compile passes (rewrite, consolidate). Without it, toolc serves a mirror of the original tool surface.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. toolc
  2. Benchmark
  3. Quick start
  4. Hosted
  5. Layout
  6. License

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):

conditionsuccesscost / completed tasktool-def context
raw (all 131 tools)96.7%$0.2631~24,360 tok
compiled + consolidate96.7%$0.0411 (6.4× cheaper)~845 tok
consolidate, no selection100.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, emit
  • packages/gateway: runtime MCP server (mirror + compiled) with call logging and compaction
  • packages/cli: the toolc command
  • packages/harness: benchmark runner, grading, reports
  • packages/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.

Frequently asked questions

What is dev.toolc/toolc?

Optimizing compiler for agent tools: many MCP servers or REST APIs in, one lean endpoint out.

How do I install dev.toolc/toolc?

It runs on your machine. In Claude Code: claude mcp add toolc -e 'ANTHROPIC_API_KEY=<your anthropic_api_key>' -- npx -y @toolc/cli@0.1.1 serve. For other clients, paste the JSON configuration from this page into their MCP settings.

Does dev.toolc/toolc need an API key?

Yes. It expects ANTHROPIC_API_KEY, which you set in its configuration.

Is dev.toolc/toolc open source?

Yes. Its code is on GitHub under the Apache-2.0 license.

Who maintains dev.toolc/toolc?

It is published by toolc-dev. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.