Back to browse
GitHub Repository

Code Mode MCP — aggregate all your MCP servers behind search() + execute()

29 starsRust

Cmcp – Aggregate all your MCP servers behind 2 tools

by aceelric·Feb 21, 2026·2 points·2 comments

AI Analysis

●●●BangerBig BrainWizardry

Maps tool explosion onto TypeScript discovery—elegant inversion that cuts context bloat by 99%.

Strengths
  • Zero-context-overhead tool model: 2 tools vs 100+ is a genuinely clever problem reframe, not incremental.
  • Type-safe auto-generation from JSON Schema means full IDE completeness without manual effort.
  • Sandboxed QuickJS execution (64 MB limit) eliminates hallucination-driven RCE risks.
Weaknesses
  • Depends entirely on MCP ecosystem maturity; if servers remain sparse, value proposition shrinks.
  • No production deployment examples or testimonials; 'inspired by Cloudflare' doesn't prove Anthropic will integrate this.
Target Audience

Developers using Claude or Codex with multiple MCP servers; teams running agentic coding workflows.

Similar To

Anthropic MCP · LangChain Agent Tools · Continue.dev Tool Aggregation

Post Description

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.

Similar Projects