claude-code-mcp Project
@KunihiroS
About claude-code-mcp Project
MCP Server connects with claude code local command.
Basic information
Category
AI & Agents
License
MIT
Runtime
node
Transports
stdio
Publisher
KunihiroS
Submitted by
Kunihiro Sugiyama
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.
More AI & Agents MCP servers
MCP Manager for Claude Desktop
zueaisimple web ui to manage mcp (model context protocol) servers in the claude app
Sequential Thinking Multi-Agent System (MAS)
FradSerAn advanced sequential thinking process using a Multi-Agent System (MAS) built with the Agno framework and served via MCP.
Model Context Protocol Server for Home Assistant
tevonsbA MCP server for Home Assistant
Shell and Coding agent for Claude and other mcp clients
rusiaamanShell and coding agent on mcp clients
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
Comments