
assimelha/cmcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
코드 모드 MCP - 검색 뒤에 모든 MCP 서버를 집계 () + 실행 ()
개요
MCP 서버의 수십을 등록 중지합니다. 그대는 그대를 갖게 되며 AI 에이전트는 TypeScript를 작성하여 모든 연결 서버에서 도구로 호출합니다. - 전체 유형의 안전, 샌드박스 실행 및 자동 응답 truncation. 에 의해 영감을 Cloudflare의 코드 모드 MCP에 대한 접근. MCP 도구 폭발은 실제입니다. 모든 새로운 서버는 에이전트의 상황에 5-30 도구를 추가합니다. 잠재적으로 180개의 도구 정의인 6개의 서버로 모델은 각 차례로 파싱해야 합니다. cmcp 플립 모델: 대신 N 도구, 당신은 얻을: 에이전트는 도구와 상호 작용하는 코드를 작성, JSON blobs. 이 수단: - context (2 vs 수백) - - Claude 또는 Codex를 다시 시작하지 않고 서버를 추가하십시오 - - 단일 실행에서 다중 도구 통화 - - JSON Schema의 자동 생성 형 스크립트 선언 - - 코드는 QuickJS 엔진에서 64 MB 메모리 제한 그게 다. Restart Claude와 검색 및 실행 도구를 사용하여 코드 모드 mcp를 볼 수 있습니다.
개요(AI 번역)
MCP 서버의 수십을 등록 중지합니다. registerone proxy 는 모두 2 도구 를 나타낸다.
AI 에이전트는 TypeScript를 작성하여 모든 연결 서버에서 도구로 호출합니다. - 전체 유형의 안전, 샌드박스 실행 및 자동 응답 truncation.
에 의해 영감을 Cloudflare의 코드 모드 MCP에 대한 접근.
왜
MCP 도구 폭발은 실제입니다. 모든 새로운 서버는 에이전트의 상황에 5-30 도구를 추가합니다. 잠재적으로 180개의 도구 정의인 6개의 서버로 모델은 각 차례로 파싱해야 합니다.
cmcp 플립 모델: 대신 N 도구, 당신은 **2 **:
| 도구 | 용도 |
인포메이션
| search() | TypeScript 필터 코드를 작성하여 도구 발견 |
| execute() | 유형의 동기화 코드가 있는 서버의 통화 도구 |
에이전트는 도구와 상호 작용하는 코드를 작성, JSON blobs. 이 수단:
-99% 적은 도구 정의 in context (2 vs 수백) -Hot-reload - Claude 또는 Codex를 재시작하지 않고 서버 추가 -Composable — 단일 실행에 여러 도구 호출
- Type-safe - JSON Schema의 자동 생성된 TypeScript 선언 -Sandboxed — 코드는 QuickJS 엔진에서 64 MB 메모리 제한으로 실행됩니다.
빠른 시작
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
cmcp — Code Mode MCP
Stop registering dozens of MCP servers. Register one proxy that aggregates them all behind just 2 tools.
Your AI agent writes TypeScript to discover and call tools across every connected server — with full type safety, sandboxed execution, and automatic response truncation.
Inspired by Cloudflare’s approach to code-mode MCP.
Why
The MCP tool explosion is real. Every new server adds 5-30 tools to your agent’s context. With 6 servers that’s potentially 180 tool definitions the model has to parse on every turn.
cmcp flips the model: instead of N tools, you get 2:
| Tool | Purpose |
|---|---|
search() |
Discover tools by writing TypeScript filter code |
execute() |
Call tools across any server with typed async code |
The agent writes code to interact with tools, not JSON blobs. This means:
- 99% fewer tool definitions in context (2 vs hundreds)
- Hot-reload — add servers without restarting Claude or Codex
- Composable — chain multiple tool calls in a single execution
- Type-safe — auto-generated TypeScript declarations from JSON Schema
- Sandboxed — code runs in a QuickJS engine with a 64 MB memory limit
Quick start
# Install
cargo install --path .
# Add servers (same syntax you already know)
cmcp add canva https://mcp.canva.com/mcp
cmcp add --transport stdio github -- npx -y @modelcontextprotocol/server-github
# Register the proxy with Claude
cmcp install
That’s it. Restart Claude and you’ll see code-mode-mcp with the search and execute tools.
Copy-paste from any MCP README
Most MCP server docs give you a claude mcp add or codex mcp add command. Just prepend cmcp:
# Claude syntax — just prepend cmcp
cmcp claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
cmcp claude mcp add --transport http canva https://mcp.canva.com/mcp
# Codex syntax — same idea
cmcp codex mcp add my-server -- npx docs-server@latest
cmcp codex mcp add api-server --url https://api.example.com --bearer-token-env-var API_TOKEN
How it works
search — discover tools
The agent writes TypeScript to filter the tool catalog:
// Find screenshot-related tools
return tools.filter(t => t.name.includes("screenshot"));
// Find all tools from a specific server
return tools.filter(t => t.server === "chrome-devtools");
// Get a summary of available servers
const servers = [...new Set(tools.map(t => t.server))];
return servers.map(s => ({
server: s,
tools: tools.filter(t => t.server === s).map(t => t.name)
}));
execute — call tools
Each server is a typed global object. The agent calls tools with await:
// Navigate and take a screenshot
await chrome_devtools.navigate_page({ url: "https://example.com" });
const screenshot = await chrome_devtools.take_screenshot({ format: "png" });
return screenshot;
// Chain multiple servers in one call
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →