Claude Code MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Code MCP start a new chat to create a hello world Python script"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code MCP
An MCP (Model Context Protocol) server that wraps the Claude Code CLI, enabling other AI agents to interact with Claude Code programmatically.
Features
Session Management: Start, continue, and manage multiple conversation sessions
Streaming Output: Real-time output from Claude Code tasks
Interrupt Support: Stop running tasks at any time (like Ctrl+C)
Permission Delegation: When Claude Code needs permission, the outer agent can approve, deny, or redirect
Progress Monitoring: Check task progress and get partial outputs
Related MCP server: Claude Code Manager WAN
Installation
From npm (Recommended)
npm install -g @jawkjiang/claude-code-mcpFrom source
git clone https://github.com/jawkjiang/claude-code-mcp.git
cd claude-code-mcp
npm install
npm run buildPrerequisites
Node.js 18+
Claude Code CLI installed and authenticated
Configuration
Add to your ~/.mcp.json:
Using npx (Recommended)
{
"mcpServers": {
"claude-code": {
"command": "npx",
"args": ["@jawkjiang/claude-code-mcp"]
}
}
}Using global install
{
"mcpServers": {
"claude-code": {
"command": "claude-code-mcp"
}
}
}Using local build
{
"mcpServers": {
"claude-code": {
"command": "node",
"args": ["/path/to/claude-code-mcp/dist/index.js"]
}
}
}Available Tools
Tool | Description |
| Start a new conversation or continue an existing session |
| Respond to permission requests: approve, deny, or redirect with new instructions |
| Stop a running task (like Ctrl+C) |
| Get current output/progress from a session |
| List all active sessions |
| Close and cleanup a session |
| Get Claude Code CLI version |
Usage Examples
Basic Chat
{
"tool": "chat",
"params": {
"message": "Create a hello world Python script",
"workingDirectory": "/path/to/project"
}
}Permission Handling
When Claude Code needs permission, you'll receive:
{
"status": "awaiting_permission",
"sessionId": "abc-123",
"pendingPermission": {
"tool": "Bash",
"action": "rm -rf /tmp/test",
"description": "Delete temporary directory"
},
"currentOutput": "I need to clean up the temp directory...",
"message": "Use 'respond' tool to approve, deny, or redirect."
}You can then respond with:
Approve:
{
"tool": "respond",
"params": {
"sessionId": "abc-123",
"action": "approve"
}
}Deny:
{
"tool": "respond",
"params": {
"sessionId": "abc-123",
"action": "deny"
}
}Redirect (provide alternative instructions):
{
"tool": "respond",
"params": {
"sessionId": "abc-123",
"action": "redirect",
"message": "Don't delete the directory. Instead, just remove the .tmp files inside it."
}
}Interrupt a Task
{
"tool": "interrupt",
"params": {
"sessionId": "abc-123"
}
}Architecture
Outer Agent claude-code-mcp Claude Code CLI
│ │ │
│── chat(message) ────────────>│ │
│ │──── spawn process ──────────>│
│ │ │
│<── awaiting_permission ─────│<── permission request ───────│
│ │ │
│── respond(action) ──────────>│ │
│ - approve │──── send response ──────────>│
│ - deny │ │
│ - redirect(new_message) │ │
│ │ │
│<── completed ───────────────│<── task complete ────────────│Permission Checkpoint Philosophy
Permission requests are not just approve/deny gates - they are audit and steering points where the outer agent can:
Review what Claude Code is doing
Approve and let it continue
Deny and stop the current operation
Redirect with new instructions ("No, do this instead...")
This gives the outer agent the same level of control a human would have when using Claude Code interactively.
License
MIT
Author
Created with Claude Code
Available Tools
7 toolschatA
Start a new conversation with Claude Code or continue an existing session. Returns sessionId for future interactions. If permission is required, status will be "awaiting_permission" - use "respond" to approve/deny/redirect.
Inputs: message (required), model, sessionId, workingDirectory.
close_sessionB
Close and cleanup a session, freeing resources.
Inputs: sessionId (required).
get_outputA
Get the current output buffer from a running or completed session. Useful for checking progress.
Inputs: sessionId.
get_versionA
Get the installed Claude Code CLI version.
Inputs: no named parameters.
interruptA
Interrupt/stop the currently running Claude Code task. Like pressing Ctrl+C.
Inputs: sessionId.
list_sessionsA
List all active sessions and their status.
Inputs: no named parameters.
respondA
Respond to a permission request or send new instructions to Claude Code. Actions:
"approve": Allow the pending operation
"approve_all": Allow this and similar future operations
"deny": Reject the pending operation
"redirect": Stop current operation and provide new instructions instead
Inputs: action (required), message, sessionId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
chat and respond have overlapping capabilities: both can send messages to an existing session, though respond is primarily for permission handling. Other tools are clearly distinct, but the boundary between chat and respond may cause misselection.
Most tools follow a verb or verb_noun pattern (chat, interrupt, get_output, list_sessions), but the mix of single verbs and prefixed verbs (get_, list_, close_) is a minor inconsistency.
Seven tools is an appropriate scope for managing Claude Code sessions, covering all necessary operations without bloat or deficiency.
The set covers the full session lifecycle: create/resume (chat), interact (respond), monitor (get_output, list_sessions), interrupt, and close (close_session), plus version check. No obvious gaps.
Maintenance
Related MCP Connectors
People and AI agents build software together in persistent cloud sessions for Claude Code.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Sync coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to spawn and control Codex CLI and Claude Code sessions on the host machine, with session management and filesystem access.4MIT
- FlicenseNot gradedqualityCmaintenanceEnables ISLI agents and MCP clients to dispatch natural-language coding and terminal tasks to a locally-installed Claude Code CLI, supporting both one-shot execution and persistent sessions with workspace and security controls.-
- AlicenseNot gradedqualityBmaintenanceEnables voice assistants to start, monitor, message, and approve local Claude Code sessions on your computer, including sessions already open in a terminal. It exposes session management, recaps, approvals, and history search as MCP tools.8GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables a Claude Desktop or Claude Code session to start, drive, and supervise interactive Claude Code CLI worker runs, including sending prompts, reading terminal output, waiting for completion, stopping runs, and managing settings and permissions.MIT