# codemcp

> MCP Client

Codemcp integrates Claude Desktop with your codebase, enabling AI-powered feature implementation, bug fixes, and refactoring through direct file edits and test runs, all while leveraging Git for safe, reversible changes.

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 1608
- **Forks:** 68
- **Owner:** ezyang
- **GitHub:** https://github.com/ezyang/codemcp
- **Created:** 2025-03-09T03:58:34+00:00
- **Updated:** 2025-03-28T18:05:10+00:00
- **Source:** https://model-context-protocol.com/clients/ai-code-assistant-claude-desktop-integration

## Setup

## Setup

1.  Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
2.  Configure `claude_desktop_config.json` with the appropriate command and arguments for codemcp, using either uv or a global pip install.
3.  Restart the Claude Desktop app after modifying the JSON.
4.  Create a `codemcp.toml` file in the Git repository checkout you want to work on, defining commands like `format` and `test`.
5.  In Claude Desktop, create a Project and put `Initialize codemcp with $PROJECT_DIR` in the Project Instructions, where `$PROJECT_DIR` is the path to the project.
6.  For global pip install, use `pip install git+https://github.com/ezyang/codemcp@prod` and configure `claude_desktop_config.json` to use `python -m codemcp`.
7.  Manually upgrade codemcp using `pip install --upgrade git+https://github.com/ezyang/codemcp@prod`.


## Tools

## Available Tools

1.  **Code Editing**: Directly edit files on your computer based on Claude's suggestions.
2.  **Test Execution**: Run tests on your codebase via Claude.
3.  **Code Formatting**: Format your code using Claude.
4.  **Git Integration**: Generate commits for every change made by codemcp.
5.  **Safe Agentic AI**: Provides a limited set of tools to prevent misuse and ensures code changes can be rolled back using Git.
6.  **Project Initialization**: Initialize codemcp with a project directory to scope Claude's actions.

