Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-code-mcp-server

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.

What it does

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.

Tools

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

Prerequisites

Setup

git clone https://github.com/nikhil-mat/ccmcp.git
cd ccmcp
npm install
npm run build

Usage with Claude Desktop

Add 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"]
    }
  }
}

Usage with Claude Code

Add a .mcp.json to your project root:

{
  "mcpServers": {
    "claude-code": {
      "command": "node",
      "args": ["/path/to/ccmcp/dist/index.js"]
    }
  }
}

Example

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"

Tool Parameters

claude_code_execute

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

License

MIT

About

An MCP server that allows clients to delegate coding tasks to Claude Code.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages