Toolc

dev.toolcPublished by toolc.devv0.1.1Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

A local compiler that turns many MCP servers or REST APIs into one lean, cheaper tool surface served to an assistant over stdio.

What you can do
Compile a federation of MCP servers, OpenAPI specs or docs pages into one smaller tool surface, with each pass configurable as a toggle (R1, R17). Rewrite tool descriptions and merge near-duplicate tools into facade tools with deterministic routing (R4, R5). Optionally hide the whole catalog behind two meta-tools, search_tools and call_tool, for maximum context savings (R6). Summarize oversized results at serve time while keeping identifiers and sourcing details (R7). Log every call with arguments and results and cluster recurring errors into recommended fixes (R9).
When to use it
Useful when an assistant connects to several MCP servers or REST APIs and the combined tool definitions crowd the context window or degrade tool selection (R2). It suits setups that want lower per-task cost and more accurate tool choice without hand-pruning each server.
Requirements
Runs as a local process over stdio, installed from the npm package @toolc/cli; the README's quick start builds from source with pnpm. Needs a toolc.config.jsonc describing downstream servers or OpenAPI specs. The ANTHROPIC_API_KEY environment variable enables the LLM-assisted rewrite and consolidate passes; without it, toolc serves a mirror of the original tool surface.
Before you install
The ANTHROPIC_API_KEY secret is sent to Anthropic for the LLM-assisted passes, which costs money. Every call is logged with arguments and results, so sensitive data may be stored locally. Compiled descriptions and routing are generated, so verify tool behavior after compiling. Downstream servers and APIs receive the calls toolc routes to them.

Installation

In SourceWeft

  1. Open Toolc in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

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

sh
git clone https://github.com/toolc-dev/toolc && cd toolcpnpm install && pnpm -r test
# describe your federationcp toolc.config.example.jsonc toolc.config.jsonc
# introspect itnode 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:

jsonc
{  "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.

Source: README.md at commit 69f0bec

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts