This MCP (Model Context Protocol) server allows you to run Claude Code in one-shot mode with permissions automatically bypassed. It provides enhanced reliability and task orchestration capabilities for more effective coding tasks.
Add this to your .mcp.json
file:
{
"mcpServers": {
"claude-code-mcp-enhanced": {
"command": "npx",
"args": [
"github:grahama1970/claude-code-mcp-enhanced"
],
"env": {
"MCP_CLAUDE_DEBUG": "false",
"MCP_HEARTBEAT_INTERVAL_MS": "15000",
"MCP_EXECUTION_TIMEOUT_MS": "1800000"
}
}
}
}
{
"mcpServers": {
"claude-code-mcp-enhanced": {
"command": "npx",
"args": [
"-y",
"@grahama1970/claude-code-mcp-enhanced@latest"
],
"env": {
"MCP_CLAUDE_DEBUG": "false",
"MCP_HEARTBEAT_INTERVAL_MS": "15000",
"MCP_EXECUTION_TIMEOUT_MS": "1800000"
}
}
}
}
Clone the repository:
git clone https://github.com/grahama1970/claude-code-mcp-enhanced.git
cd claude-code-mcp-enhanced
Install dependencies and build:
npm install
npm run build
Configure your .mcp.json
file:
{
"mcpServers": {
"claude-code-mcp-enhanced": {
"command": "node",
"args": [
"/path/to/claude-code-mcp-enhanced/dist/server.js"
],
"env": {
"MCP_CLAUDE_DEBUG": "false",
"MCP_HEARTBEAT_INTERVAL_MS": "15000",
"MCP_EXECUTION_TIMEOUT_MS": "1800000"
}
}
}
}
Before the MCP server can use the claude_code
tool, you must run the Claude CLI manually once:
npm install -g @anthropic-ai/claude-code
claude --dangerously-skip-permissions
Follow the prompts to accept the terms.
~/.cursor/mcp.json
%APPDATA%\\Cursor\\mcp.json
~/.config/cursor/mcp.json
~/.codeium/windsurf/mcp_config.json
%APPDATA%\\Codeium\\windsurf\\mcp_config.json
~/.config/.codeium/windsurf/mcp_config.json
claude_code
Executes a prompt directly using the Claude Code CLI with permissions bypassed.
Arguments:
prompt
(string, required): The prompt to send to Claude Code.workFolder
(string, optional): The working directory for execution.parentTaskId
(string, optional): ID of the parent task for orchestration.returnMode
(string, optional): 'summary' or 'full' (default).taskDescription
(string, optional): Short description of the task.mode
(string, optional): Specifies the Roo mode when enabled.health
Returns health status of the Claude Code MCP server.
convert_task_markdown
Converts markdown task files into Claude Code MCP-compatible JSON format.
{
"toolName": "claude_code:claude_code",
"arguments": {
"prompt": "Your work folder is /path/to/project\n\nRefactor the function foo in main.py to be async.",
"workFolder": "/path/to/project"
}
}
{
"toolName": "claude_code:claude_code",
"arguments": {
"prompt": "Your work folder is /path/to/project\n\nCreate database models for the new API endpoint as specified in the requirements.",
"workFolder": "/path/to/project",
"parentTaskId": "task-123",
"returnMode": "summary",
"taskDescription": "Database model creation for API endpoint"
}
}
The server supports powerful task orchestration capabilities including:
Enable specialized behaviors through a .roomodes
configuration file:
MCP_USE_ROOMODES=true
in your MCP configuration.roomodes
file with custom modesmode
parameterVariable | Description | Default |
---|---|---|
CLAUDE_CLI_PATH |
Path to Claude CLI executable | Auto-detect |
MCP_CLAUDE_DEBUG |
Enable debug logging | false |
MCP_HEARTBEAT_INTERVAL_MS |
Progress report interval | 15000 (15s) |
MCP_EXECUTION_TIMEOUT_MS |
CLI execution timeout | 1800000 (30m) |
MCP_MAX_RETRIES |
Max retry attempts | 3 |
MCP_RETRY_DELAY_MS |
Delay between retries | 1000 (1s) |
MCP_USE_ROOMODES |
Enable Roo modes | false |
MCP_WATCH_ROOMODES |
Auto-reload .roomodes | false |
MCP_CLAUDE_DEBUG
to false
MCP_HEARTBEAT_INTERVAL_MS
MCP_MAX_RETRIES
and MCP_RETRY_DELAY_MS
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "claude-code-mcp-enhanced" '{"command":"npx","args":["github:grahama1970/claude-code-mcp-enhanced"],"env":{"MCP_CLAUDE_DEBUG":"false","MCP_HEARTBEAT_INTERVAL_MS":"15000","MCP_EXECUTION_TIMEOUT_MS":"1800000"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"claude-code-mcp-enhanced": {
"command": "npx",
"args": [
"github:grahama1970/claude-code-mcp-enhanced"
],
"env": {
"MCP_CLAUDE_DEBUG": "false",
"MCP_HEARTBEAT_INTERVAL_MS": "15000",
"MCP_EXECUTION_TIMEOUT_MS": "1800000"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"claude-code-mcp-enhanced": {
"command": "npx",
"args": [
"github:grahama1970/claude-code-mcp-enhanced"
],
"env": {
"MCP_CLAUDE_DEBUG": "false",
"MCP_HEARTBEAT_INTERVAL_MS": "15000",
"MCP_EXECUTION_TIMEOUT_MS": "1800000"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect