codemcp is a coding assistant MCP (Model Context Protocol) used to turn Claude Desktop into a pair programming assistant. By installing codemcp, users can directly ask Claude to implement features, fix bugs, and perform refactoring on a local codebase, and Claude will directly edit files and run tests, thereby avoiding copying and pasting code in the chat window.
Purpose
codemcp is designed to be used with Claude Pro (Anthropic's $20/month subscription), allowing users to pay for usage through a subscription, thereby eliminating the marginal cost of agent operations. It is similar in functionality to other AI coding software (such as Claude Code, Cursor, Cline, Aider), but is unique in its design.
Main capabilities
- Auto-accept edits: By default, codemcp automatically accepts Claude's modifications to the code, allowing the agent to proceed as autonomously as possible, and users can review all changes at once at the end.
- Restricted shell commands: codemcp prohibits unrestricted shell access and requires users to
codemcp.tomlpredeclare the commands the agent can use. - Git-versioned edits: All LLM edits are version-controlled through Git, allowing users to roll back the agent's changes at a fine-grained level without worrying about forgetting to commit.
- IDE-agnostic: Users can use their preferred IDE or editor (such as vim) to review changes and make further edits, without being forced to use VSCode or a specific editor.
Usage
- Install uv and git (if not already installed).
- Install the claude-mcp extension in the browser so you can connect to the SSE MCP server directly from the website, without using Claude Desktop, and easily run multiple chat windows in parallel.
- Run codemcp with the following command:
You can adduvx --from git+https://github.com/ezyang/codemcp@prod codemcp serve .--port 1234to specify a non-standard port. If you want to use the latest development version, you can changeprodtomain; if you want to pin a specific version, you can replace it with0.3.0, etc. It can also be run remotely: if you use Tailscale and trust all devices on the Tailnet, you can securely run it remotely via--host 100.101.102.103(replace with the node's Tailscale IP). Warning: anyone who can access this MCP can execute arbitrary code on your computer, and binding to0.0.0.0is strongly discouraged. - Configure the URL in claude-mcp:
http://127.0.0.1:8000/sse(replace the port as needed). - In the Git repository you want to work in, create a
codemcp.tomlfile, and in thecommandssection add the commands the agent can execute (such as formatting, running tests). Theformatcommand is special and will automatically run after every file edit. - Create a project in Claude Desktop, and add the relevant configuration to the project instructions (such as
$PROJECT_DIRpoints to the project path). - Chat with Claude and ask it to make changes to the project. Every time codemcp modifies code, it generates a commit and amends it during the chat.
Use cases
- Users who want to use an AI coding assistant via a subscription and avoid usage-based billing.
- Those who prefer a workflow of automatically accepting edits and reviewing them all at the end.
- Users who use non-VSCode editors (such as vim).
- Scenarios that require fine-grained rollback of agent changes.
Limitations
- The author states that the launch of claude code has made codemcp largely obsolete, but some design ideas are still valuable.
- It is not an autonomous agent; at minimum, you need to intervene after each chat to review changes and request the next step.
- Requesting too many tasks in a single chat may hit Claude Desktop's output limit, requiring manual "continue".
- When Claude goes off track, what is consumed is time rather than money, so behavior needs to be adjusted accordingly.
- Logs are written to
~/.codemcp/codemcp.log, the log level can be set in the global configuration file~/.codemcprc, and per-project configuration is not supported. - More installation instructions (including non-standard cases) can be found in INSTALL.md.
- Contribution guidelines are in CONTRIBUTING.md.