Code-MCP

Terminal and Code Integration for Claude AI

Connect Claude AI to Your Development Environment

Code-MCP connects Claude AI to your development environment through the Model Context Protocol (MCP), enabling terminal commands and file operations through the AI interface.

Terminal Access

Run shell commands in your project directory directly from Claude

File Operations

Create, read, update, and delete files and directories

Git Integration

Special handling for git commands with safety confirmations

Smart Editing

Enhanced editing capabilities for code files

Code Analysis

Advanced pattern matching and function-level operations

Productivity Tools

Operate on your codebase with natural language instructions

See It In Action

Can you show me what files have changed in my project?

Sure, I'll run git status for you:

On branch main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   src/app.js
    modified:   src/components/Header.js

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    src/components/Sidebar.js

Would you like me to show you the changes in any of these files?

Installation

curl -LsSf https://raw.githubusercontent.com/54yyyu/code-mcp/main/install.sh | sh
powershell -c "Invoke-WebRequest -Uri https://raw.githubusercontent.com/54yyyu/code-mcp/main/install.ps1 -OutFile install.ps1; .\install.ps1"

Install with pip

pip install git+https://github.com/54yyyu/code-mcp.git

Or better, install with uv

uv pip install git+https://github.com/54yyyu/code-mcp.git

For Developers

# Clone the repository
git clone https://github.com/54yyyu/code-mcp.git
cd code-mcp

# Install in development mode with uv (recommended)
uv pip install -e .

Claude Desktop Integration

1

Automatic Setup

Run the setup helper to configure Claude Desktop

# With a specific project path
code-mcp-setup /path/to/your/project
                            
# Or run without arguments to use the current directory
code-mcp-setup
2

Manual Setup (Alternative)

Edit Claude Desktop configuration directly

  • Go to Claude > Settings > Developer > Edit Config
  • Add the following to your claude_desktop_config.json:
{
    "mcpServers": {
        "code": {
            "command": "code-mcp",
            "args": [
                "/path/to/your/project"
            ]
        }
    }
}
3

Save and Restart

Save the file and restart Claude Desktop

Examples

Try asking Claude these commands: