top | item 47099142

Show HN: Cmcp – Aggregate all your MCP servers behind 2 tools

2 points| aceelric | 9 days ago |github.com

I built cmcp, a proxy that sits between your AI agent (Claude, Codex) and all your MCP servers. Instead of registering each server individually — which can add 100+ tool definitions to your agent's context — you register one proxy that exposes just 2 tools: search() and execute().

The agent writes TypeScript to discover and call tools:

// search — find tools across all servers return tools.filter(t => t.name.includes("screenshot"));

// execute — call tools with full type safety await chrome_devtools.navigate_page({ url: "https://example.com" }); const shot = await chrome_devtools.take_screenshot({ format: "png" }); return shot;

Type declarations are auto-generated from each tool's JSON Schema, so the agent gets typed parameters for every tool. TypeScript is stripped via oxc and the JS runs in a sandboxed QuickJS engine (64 MB memory limit).

Adding servers works exactly like you'd expect — just prepend cmcp to any claude mcp add command from a README:

cmcp claude mcp add chrome-devtools npx chrome-devtools-mcp@latest cmcp install

Built in Rust with rmcp, rquickjs, and oxc. Inspired by Cloudflare's blog post on code-mode MCP.

What I found interesting building this: the biggest win isn't just fewer tokens — it's composability. An agent can chain calls across multiple servers in a single execution, which isn't possible with individual tool calls.

2 comments

order

sergiomattei|9 days ago

This looks nice, congrats on the launch. I'm trying this at work on Monday, I suffer from this problem for tons of MCP tools that are MCP only, not CLI, and completely fill my context window.

First thoughts: it seems the broader community is moving towards Agent Skills as a "replacement" for MCPs to tackle the context pollution problem.

Agent harnesses like Pi don't ship with MCP support as an intentional design choice. MCP servers[0] are being rewritten as pure CLIs in order to support this new scenario.

Thoughts on this?

[0]: https://github.com/microsoft/playwright-cli

aceelric|9 days ago

Problem with skills is that agents have to load the entire skill for them to use it, or you could break down big skills into multiple smaller ones, which is just a hassle compared to cmcp.

With cmcp you get to use all thr available mcps, while still not bloating context.