home / mcp / claude code mcp server

Claude Code MCP Server

Claude Code as one-shot MCP server to have an agent in your agent.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "steipete-claude-code-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@steipete/claude-code-mcp@latest"
      ],
      "env": {
        "CLAUDE_CLI_NAME": "claude-custom",
        "MCP_CLAUDE_DEBUG": "true"
      }
    }
  }
}

You can run Claude Code in one-shot mode through a dedicated MCP server, giving your AI agents direct access to Claude Code with permissions bypassed by default. This makes coding tasks faster and more reliable by enabling file edits, git operations, and complex workflows without repeated prompt friction.

How to use

Use an MCP client to connect to the Claude Code MCP Server and invoke the single available tool, claude_code, which runs Claude Code with automatic permissions bypass. You provide a prompt describing the coding task, and the server handles executing Claude Code and applying the requested changes to your project.

How to install

Prerequisites: install Node.js version 20 or later, and ensure the Claude CLI is installed locally and you have accepted permissions with --dangerously-skip-permissions.

Install or run the MCP server using npx with the latest package version.

# Use npx to run the Claude Code MCP Server
npx -y @steipete/claude-code-mcp@latest
```

# Optional: customize the Claude CLI binary name via environment variable
CLAUDE_CLI_NAME=claude-custom npx -y @steipete/claude-code-mcp@latest
```,

Configuration and startup notes

Set the Claude CLI binary name if you need to point to a custom Claude CLI. You can also enable verbose debug output for troubleshooting.

CLAUDE_CLI_NAME=claude-custom npx -y @steipete/claude-code-mcp@latest
```

```
MCP_CLAUDE_DEBUG=true npx -y @steipete/claude-code-mcp@latest

Connecting to your MCP client

After the server starts, configure your MCP client (such as Cursor or Windsurf) to use the Claude Code MCP endpoint. You will reference the claude_code tool via the client’s MCP configuration, enabling you to send prompts and receive code-generation and file-edit responses directly.

Tips for effective use

  • Enable Bash reads and writes for quick shell tasks
  • Grant Read/Write access for in-file edits
  • Keep a compact queue of tasks to preserve context for longer sessions

Examples of typical tasks you can perform

Generate or analyze code, edit files, perform Git operations, and run multi-step workflows all within a single prompt to Claude Code through the MCP server.

Available tools

claude_code

Executes a prompt directly using the Claude Code CLI with --dangerously-skip-permissions. This tool accepts a prompt and optional tool enablement flags and returns the Claude Code results.