claude-code-mcp

claude-code-mcp

18

The claude-code-mcp project is an MCP server that facilitates interaction with Claude Code through various tools, allowing developers to explain, review, fix, edit, test code, and more. Utilizing Node.js, it offers a robust solution for executing commands and handling requests efficiently in diverse environments.

Overview

The claude-code-mcp project is an MCP server for Claude Code. It provides tools like explain_code, review_code, fix_code, edit_code, test_code, simulate_command, and your_own_query. Implemented using Node.js and the MCP SDK, it processes JSON requests from clients, encodes input using Base64, generates and executes commands, and returns results in JSON format. It operates well with Claude Code CLI environments, offering stability and flexibility in request handling.

Functions

  • Request Reception: Receives JSON tool requests.
  • Input Processing: Encodes text using Base64.
  • Command Generation: Assembles command string based on tool name.
  • Command Execution: Executes command using Node.js.
  • Result Return: Delivers execution results in JSON format.

Getting Started

Prerequisites

  • Node.js (>= v18)
  • npm or yarn
  • Claude Code with completed auth

Installation & Usage

  1. Using npx: Run with npx without installation.
  2. Global Installation: Install via npm and run as a command.
  3. Local Installation: Clone the repository, install dependencies, and build.

Configuration

Environment variables are crucial and can be set via MCP Host settings, .env, or a global file in the home directory.