MCP Server for Claude Code CLI with full interactive capabilities.
An MCP (Model Context Protocol) server that provides seamless access to Claude Code CLI through MCP protocol with native IDE integration for Cursor, Cline, and other MCP-compatible clients. Features interactive permissions, questions, choices, confirmations, and real-time progress indication via MCP Elicitation.
- Permission Requests - File/command approvals via MCP Elicitation
- Text Questions - Free-form user input
- Choice Questions - Dropdown selections
- Confirmations - Yes/no dialogs
- Multi-Turn Conversations - Session resumption support
- Progress Indication - Real-time tool activity
- JSON Protocol - Claude outputs interaction markers (
__user_question__,__user_choice__,__confirmation__) - MCP Elicitation - Markers are parsed and shown as native IDE dialogs
- Session Resumption - Multi-turn via
--resume SESSION_ID - Native Permissions - Uses
--permission-prompt-toolmechanism
- Python 3.13+
- Poetry
- Claude Code CLI (download)
- Cursor 2.1.50+ (for MCP Elicitation support)
git clone https://github.com/your-username/mcp-claude-code.git
cd mcp-claude-code
poetry installAdd to Cursor settings (Cmd/Ctrl + Shift + P → "Preferences: Open User Settings (JSON)"):
{
"mcpServers": {
"claude-code": {
"command": "poetry",
"args": ["run", "python", "-m", "mcp_claude_code"],
"cwd": "/absolute/path/to/mcp-claude-code",
"env": {
"WORKSPACE_ROOT": "${workspaceFolder}"
}
}
}
}Execute Claude Code CLI with full interactive capabilities.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt |
string | required | Task for Claude Code |
model |
string | "haiku" |
haiku=fast/simple, sonnet=complex, opus=critical |
workspace_root |
string | $WORKSPACE_ROOT |
Working directory |
skip_permissions |
bool | false |
Skip permission checks |
Example:
{
"prompt": "Create a README.md for this project",
"model": "haiku",
"skip_permissions": false
}Returns:
{
"success": true,
"output": "Created README.md with project documentation.",
"error": null,
"execution_time_seconds": 5.2,
"permissions_requested": 1,
"permissions_granted": 1,
"choices_asked": 0,
"questions_asked": 0,
"confirmations_asked": 0
}skip_permissions |
Behavior |
|---|---|
false (default) |
Interactive - permission requests shown via MCP Elicitation |
true |
Autonomous - uses --dangerously-skip-permissions |
When approving a permission:
| Scope | Description | Storage |
|---|---|---|
| Allow Once | Only current operation | Not stored |
| Allow Session | Current session | Memory |
| Allow Always | Future sessions | JSON file |
| Deny | Reject operation | Not stored |
Real-time progress via MCP Progress Notifications:
| Event | Example |
|---|---|
| Read | 📖 Read: src/main.py |
| Bash | 💻 Bash: npm install |
| Grep | 🔎 Grep: 'TODO' in src/ |
| Heartbeat | ⏳ Still working... (15s elapsed) |
| Success | ✅ Completed in 1234ms |
All tests use real Claude Code CLI - no mocks.
# Run all tests
poetry run pytest tests/ -v
# Run E2E tests
poetry run pytest tests/test_e2e/ -vMCP Client (Cursor/Cline)
│ MCP Protocol
↓
claude-code-proxy MCP Server
│ subprocess
↓
Claude Code CLI
--output-format stream-json
--append-system-prompt (interaction protocols)
--permission-prompt-tool mcp__perm__approve
See ARCHITECTURE.md for details.
| Client | Elicitation Support |
|---|---|
| Cursor 2.0+ | ✅ Full |
| VS Code + Cline | |
| Claude Desktop | ❌ Not supported |
This project is tagged with the following topics for easy discovery:
Core Technologies:
mcp- Model Context Protocolmcp-server- MCP server implementationmodel-context-protocol- Official MCP specificationclaude- Claude AI integrationclaude-code- Claude Code CLI wrapperclaude-code-cli- Command-line interface integration
AI & LLM:
ai- Artificial Intelligencellm- Large Language Modelsai-assistant- AI coding assistantcode-generation- Automated code generation
IDE Integration:
cursor- Cursor IDE supportcline- Cline extension supportide-integration- IDE integration capabilitiesfastmcp- FastMCP framework
Features:
interactive- Interactive capabilitiespermissions- Permission management systemelicitation- MCP Elicitation supportsession-resumption- Multi-turn conversation supportprogress-indication- Real-time progress updatesautomation- Development automation
Language & Platform:
python- Python implementation
MIT