Claude Code MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Claude Code MCP Server
MCP server that runs Claude Code as a tool -- with session continuity.
Provides two tools via the Model Context Protocol:
claude_code-- Run Claude Code in one-shot mode with any promptclaude_code_reply-- Continue a previous conversation by thread ID
Both tools parse structured JSON output from the CLI, returning session_id for threading and is_error for error detection. A 30-minute execution timeout prevents runaway processes.
Quick Start
npx @pandysp/claude-code-mcp@latestRequires Node.js 20+ and the Claude CLI installed locally.
First-time setup
Accept the CLI permissions once before the MCP server can use them:
npm install -g @anthropic-ai/claude-code
claude --dangerously-skip-permissionsRelated MCP server: agent-shuttle-mcp
Configuration
Add to your MCP client config:
Claude Desktop / Cursor
{
"mcpServers": {
"claude-code-mcp": {
"command": "npx",
"args": ["-y", "@pandysp/claude-code-mcp@latest"]
}
}
}Windsurf
{
"mcpServers": {
"claude-code-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@pandysp/claude-code-mcp@latest"]
}
}
}OpenClaw (Docker)
When running inside a Docker container (e.g., as an OpenClaw MCP adapter server), use the container's node binary directly instead of npx:
{
"command": "node",
"args": ["/path/to/dist/server.js"]
}Tools Reference
claude_code
Run Claude Code with a one-shot prompt.
Parameter | Type | Required | Description |
| string | yes | The prompt to send to Claude Code |
| string | no | Absolute path to the working directory |
Returns the CLI result text. If the CLI outputs JSON with a session_id, the response includes structuredContent.threadId for use with claude_code_reply.
claude_code_reply
Continue a previous Claude Code conversation.
Parameter | Type | Required | Description |
| string | yes | Session ID from a previous call |
| string | yes | Follow-up prompt |
| string | no | Should match the original call's working directory |
Uses --resume <threadId> under the hood to maintain conversation context.
Environment Variables
Variable | Default | Description |
|
| Override the CLI binary name or absolute path |
|
| Enable verbose debug logging to stderr |
CLAUDE_CLI_NAME supports simple names (looked up in PATH) or absolute paths. Relative paths are rejected.
Development
npm install
npm run build
npm run test:unit # 100 unit tests, fully mocked
npm run dev # dev mode with tsxAttribution
Originally forked from @steipete/claude-code-mcp.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
People and AI agents build software together in persistent cloud sessions for Claude Code.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI clients to send prompts to a local Codex App Server via MCP, returning text responses and supporting persistent session reuse.-
- AlicenseBqualityBmaintenanceEnables MCP clients to delegate prompts to locally configured Codex, Antigravity, OpenCode, and Claude Code agents, fetch live model catalogs and quotas, and maintain stateful multi-turn sessions with selectable tool policies.19MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible clients to run reusable Markdown-defined coding agents through a chosen coding CLI, returning results to the same conversation and optionally continuing sessions across calls.127 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as Cursor to hand a bounded task to a scoped, non-interactive Claude Code session billed to a Claude subscription rather than Cursor model credits. Runs read-only by default, with optional file edits or Bash, plus budget, timeout, and session-resume controls.MIT