claude-code-mcp Project
@KunihiroS
About claude-code-mcp Project
MCP Server connects with claude code local command.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"claude-code-mcp": {
"command": "npx",
"args": [
"@kunihiros/claude-code-mcp"
]
}
}
}Tools
7Provides a detailed explanation of the given code.
Reviews the given code.
Fixes bugs or issues in the given code.
Edits the given code based on instructions.
Generates tests for the given code.
Simulates the execution of a given command.
Sends a custom query with context.
Overview
What is claude-code-mcp?
claude-code-mcp is an MCP server that calls the locally installed Claude Code CLI and provides tools for code explanation, review, fixing, editing, testing, command simulation, and custom queries. It communicates via stdio and uses Base64 encoding to handle special characters in natural language text.
How to use claude-code-mcp?
Run the server via npx @kunihiros/claude-code-mcp or install globally with npm install -g claude-code-mcp and run claude-code-mcp. Set the required CLAUDE_BIN environment variable to the path of your Claude CLI executable. Configuration can be provided through MCP host settings, a .env file, or a global ~/.claude-code-mcp.env file.
Key features of claude-code-mcp
- Provides seven tools:
explain_code,review_code,fix_code,edit_code,test_code,simulate_command, andyour_own_query - Base64 encodes natural language input for stable processing
- Communicates via stdio using JSON‑formatted requests and responses
- Configurable log level (
debug,info,warn,error) - Supports running from MCP hosts like Claude Desktop (unconfirmed)
Use cases of claude-code-mcp
- Explain or review code using Claude Code from any MCP‑compatible host
- Automatically fix bugs or edit code with natural language instructions
- Generate unit tests for existing code
- Simulate command execution before running it
- Send custom queries with optional context
FAQ from claude-code-mcp
What are the runtime requirements?
Node.js 18 or later (tested with v22.14.0), npm (or yarn), and the Claude Code CLI installed and authenticated.
How do I set the path to the Claude CLI?
Set the CLAUDE_BIN environment variable (required) to the absolute path of your Claude executable, e.g. /home/linuxbrew/.linuxbrew/bin/claude.
What tools are available?
The server offers explain_code, review_code, fix_code, edit_code, test_code, simulate_command, and your_own_query.
Can I use claude-code-mcp with Claude Desktop?
The README notes that calling Claude Code from Claude Desktop may work, but this is unconfirmed.
Where are logs stored?
The log file claude-code-mcp.log is first created in the project root, then falls back to the user’s home directory (~/.claude-code-mcp.log), and finally to /tmp/claude-code-mcp.log. Log rotation is not implemented.
Frequently asked questions
What are the runtime requirements?
Node.js 18 or later (tested with v22.14.0), npm (or yarn), and the Claude Code CLI installed and authenticated.
How do I set the path to the Claude CLI?
Set the `CLAUDE_BIN` environment variable (required) to the absolute path of your Claude executable, e.g. `/home/linuxbrew/.linuxbrew/bin/claude`.
What tools are available?
The server offers `explain_code`, `review_code`, `fix_code`, `edit_code`, `test_code`, `simulate_command`, and `your_own_query`.
Can I use claude-code-mcp with Claude Desktop?
The README notes that calling Claude Code from Claude Desktop may work, but this is unconfirmed.
Where are logs stored?
The log file `claude-code-mcp.log` is first created in the project root, then falls back to the user’s home directory (`~/.claude-code-mcp.log`), and finally to `/tmp/claude-code-mcp.log`. Log rotation is not implemented.
Basic information
More AI & Agents MCP servers
Model Context Protocol for Unreal Engine
chongdashuEnable AI assistant clients like Cursor, Windsurf and Claude Desktop to control Unreal Engine through natural language using the Model Context Protocol (MCP).
MCP Claude Code
SDGLBLMCP implementation of Claude Code capabilities and more
MCP Server - Remote MacOs Use
baryhuangThe only general AI agent that does NOT requires extra API key, giving you full control on your local and remote MacOs from Claude Desktop App
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
MCP Client for Ollama (ollmcp)
joniglHarness the power of local LLMs with this TUI MCP Client for Ollama. Featuring all core MCP primitives (tools, prompts, resources), agent mode, multi-server, model switching, streaming responses, human-in-the-loop, thinking mode, model params config, system prompts, and saved pre
Comments