MCP.so
登录

claude-code-mcp Project MCP Server

@KunihiroS

基本信息

分类

AI 与智能体

许可证

MIT

传输方式

stdio

作者

KunihiroS

提交者

Kunihiro Sugiyama

关于 claude-code-mcp Project MCP Server

MCP Server connects with claude code local command.

claude-code-mcp Project MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "claude-code-mcp": {
      "command": "npx",
      "args": [
        "@kunihiros/claude-code-mcp"
      ]
    }
  }
}

claude-code-mcp Project MCP Server 工具

7

Provides 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, and your_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

常见问题

1

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.

2

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`.

3

What tools are available?

The server offers `explain_code`, `review_code`, `fix_code`, `edit_code`, `test_code`, `simulate_command`, and `your_own_query`.

4

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.

5

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 服务器