# toolc

Turns a pile of MCP servers and REST APIs into one endpoint with a smaller tool surface. Useful when tool definitions eat your context.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: toolc-dev
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/toolc-dev/toolc
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/toolc

## What it does

toolc points at your MCP servers, an OpenAPI spec, or a docs page and serves back a single endpoint. Inside, tool descriptions get rewritten, near-duplicate tools (`search_x`, `find_x`, `get_x`) collapse into facade tools with deterministic routing, and oversized results are summarized at serve time. Every call is logged with its arguments and results.

It runs as a CLI: a config file describes the downstreams, then `inspect`, `compile` and `serve --mode compiled` do the work. The rewrite and consolidate passes need `ANTHROPIC_API_KEY`, so compilation stops without it. Each pass is a config toggle, which lets you pick the tradeoff per deployment.

Install is `npx -y @toolc/cli`, added to Claude as an MCP server. There is a Docker path for self-hosting and a managed service at toolc.dev with a console and log explorer. The engine is Apache-2.0, and local compilation matches the hosted quality.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ANTHROPIC_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add toolc -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- npx -y @toolc/cli
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add toolc --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- npx -y @toolc/cli
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "toolc": {
            "command": "npx",
            "args": [
                "-y",
                "@toolc/cli"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "toolc": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@toolc/cli"
            ],
            "env": {
                "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> toolc npx -y @toolc/cli
```
Replace <…> with your own values

## When to use it
- shrink a catalog of dozens of tools to two meta-tools
- merge duplicate tools like `search_x` and `find_x`
- attach a REST API to an agent from its OpenAPI spec
- cut the cost of every agent call
- find out which calls keep failing

## Example prompts
- Compile the federation in `toolc.config.jsonc` and show me the result
- Run toolc in `compiled` mode and wire it up as an MCP server
- Draft a spec from this API's docs and add it to the tool pool

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
