claude-code-mcp Project
@KunihiroS
关于 claude-code-mcp Project
MCP Server connects with claude code local command.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"claude-code-mcp": {
"command": "npx",
"args": [
"@kunihiros/claude-code-mcp"
]
}
}
}工具
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.
概览
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.
AI 与智能体 分类下的更多 MCP 服务器
Hass-MCP
voskaControl and query Home Assistant from Claude and other LLMs — a Model Context Protocol (MCP) server.
🛡️ A.I.G(AI-Infra-Guard)
TencentA full-stack AI Red Teaming platform securing AI ecosystems via OpenClaw Security Scan, Agent Scan, Skills Scan, MCP scan, AI Infra scan and LLM jailbreak evaluation.
Shell and Coding agent for Claude and other mcp clients
rusiaamanShell and coding agent on mcp clients
mcp-hfspace MCP Server 🤗
evalstateMCP Server to Use HuggingFace spaces, easy configuration and Claude Desktop mode.
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
评论