An MCP (Model Context Protocol) server that exposes Claude Code CLI as tools, enabling Claude Desktop and other MCP clients to delegate coding tasks to Claude Code.
This server lets any MCP client spawn Claude Code sessions to perform multi-step coding tasks: reading files, editing code, running commands, searching codebases, and more.
| Tool | Description |
|---|---|
claude_code_execute |
Run a coding task through Claude Code |
claude_code_continue |
Continue the most recent session with a follow-up |
claude_code_resume |
Resume a specific session by ID |
- Node.js >= 18
- Claude Code CLI installed and authenticated (
claude login)
git clone https://github.com/nikhil-mat/ccmcp.git
cd ccmcp
npm install
npm run buildAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"claude-code": {
"command": "node",
"args": ["/path/to/ccmcp/dist/index.js"]
}
}
}Add a .mcp.json to your project root:
{
"mcpServers": {
"claude-code": {
"command": "node",
"args": ["/path/to/ccmcp/dist/index.js"]
}
}
}Once configured, you can ask Claude Desktop to delegate coding tasks:
"Fix the authentication bug in ~/myapp/src/auth.ts"
Claude Desktop will call claude_code_execute, which spawns a Claude Code session that autonomously reads files, identifies the issue, and applies a fix.
You can chain tasks across sessions:
claude_code_execute → "Fix the bug in auth.ts"
claude_code_continue → "Now add tests for that fix"
claude_code_resume → "Go back to session X and deploy"
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt |
string | yes | The coding task or question |
working_directory |
string | no | Absolute path to work in |
allowed_tools |
string[] | no | Tools to allow (default: Read, Glob, Grep, Bash, Edit, Write) |
model |
string | no | Model to use (default: sonnet) |
max_turns |
number | no | Limit agentic turns (1-100) |
timeout_ms |
number | no | Timeout in ms (default: 300000) |
system_prompt |
string | no | Custom system prompt |
MIT