home / mcp / claude code mcp server
Claude Code as one-shot MCP server to have an agent in your agent.
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.
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.
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
```,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@latestAfter 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.
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.
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.