MCP.so
ログイン

claude-code-mcp Project

@KunihiroS

claude-code-mcp Project について

MCP Server connects with claude code local command.

基本情報

カテゴリ

AI とエージェント

ライセンス

MIT

ランタイム

node

トランスポート

stdio

公開者

KunihiroS

投稿者

Kunihiro Sugiyama

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

ツール

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

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 とエージェント」の他のコンテンツ