NOTICE: claude code is available with Anthropic's $20/mo subscription, so I consider codemcp fully obsolete. However, there are some good design ideas (especially around the Git-versioning scheme) that I eventually want to port into the current generation of agentic coding clis. Make Claude Desktop a pair programming assistant by installing codemcp. With it, you can directly ask Claude to implemen
Add this skill
npx mdskills install ezyang/codemcpComprehensive code analysis backend with semantic search, impact analysis, and excellent documentation
1NOTICE: claude code is available with Anthropic's $20/mo subscription, so I consider2codemcp fully obsolete. However, there are some good design ideas (especially around3the Git-versioning scheme) that I eventually want to port into the current generation4of agentic coding clis.56# codemcp78Make Claude Desktop a pair programming assistant by installing codemcp. With9it, you can directly ask Claude to implement features, fix bugs and do10refactors on a codebase on your computer; Claude will directly edit files and11run tests. Say goodbye to copying code in and out of Claude's chat window!12131415codemcp offers similar functionality to other AI coding software (Claude Code,16Cursor, Cline, Aider), but it occupies a unique point in the design space:17181. It's intended to be used with **Claude Pro**, Anthropic's $20/mo19 subscription offering. I like paying for my usage with a subscription plan20 because it means **zero marginal cost** for agent actions; no more feeling21 bad that you wasted five bucks on a changeset that doesn't work.2223 Note that if you have Claude Max ($100/mo), Claude Code can also be used24 with subscription based pricing. The value proposition for codemcp is25 murkier in this case (and it is definitely inferior to Claude Code in some26 respects), but you can still use codemcp with Claude Max if you prefer some27 of the other UI decisions it makes. (Also, it's open source, so you can28 change it if you don't like it, unlike Claude Code!)29302. It's built around **auto-accept by default**. I want my agent to get as31 far as it can without my supervision, so I can review everything in one go at32 the end. There are two key things that codemcp does differently than most33 coding agents: we **forbid unrestricted shell**, instead requiring you to34 predeclare commands the agent can use in ``codemcp.toml``, and we **Git35 version all LLM edits**, so you can roll back agent changes on a36 fine-grained basis and don't have to worry about forgetting to commit37 changes.38393. It's **IDE agnostic**: you ask Claude to make changes, it makes them, and40 then you can use your favorite IDE setup to review the changes and make41 further edits. I use vim as my daily driver editor, and coding environments42 that require VSCode or a specific editor are a turn off for me.4344## IMPORTANT: For master users - Major changes for token efficiency4546To improve codemcp's token efficiency, on master I am in the process of47changing codemcp back into a multi-tool tool (instead of a single tool whose48instructions are blatted into chat when you InitProject). This means you have49to manually approve tool use. Because tool use approval is persistent across50multiple chats, I think this is a reasonable tradeoff to make, but if you51really don't like, file a bug at52[refined-claude](https://github.com/ezyang/refined-claude/issues) browser53extension for supporting auto-approve tool use.5455## Installation5657I recommend this specific way of installing and using codemcp:58591. Install `uv` and install git, if they are not installed already.60612. Install [claude-mcp](https://chromewebstore.google.com/detail/mcp-for-claudeai/jbdhaamjibfahpekpnjeikanebpdpfpb) on your browser.62 This enables you to connect to SSE MCP servers directly from the website,63 which means you don't need to use Claude Desktop and can easily have64 multiple chat windows going in parallel. We expect this extension should65 be soon obsoleted by the rollout of66 [Integrations](https://www.anthropic.com/news/integrations). At time of67 writing, however, Integrations have not yet arrived for Claude Pro subscribers.68693. Run codemcp using ``uvx --from git+https://github.com/ezyang/codemcp@prod codemcp serve``.70 You can add ``--port 1234`` if you need it to listen on a non-standard port.7172 Pro tip: if you like to live dangerously, you can change `prod` to `main`. If73 you want to pin to a specific release, replace it with `0.3.0` or similar.7475 Pro tip: you can run codemcp remotely! If you use76 [Tailscale](https://tailscale.com/) and trust all devices on your Tailnet,77 you can do this securely by passing ``--host 100.101.102.103`` (replace the78 IP with the Tailscale IP address of your node. This IP typically lives in79 the 100.64.0.0/10 range.) **WARNING:** Anyone with access to this MCP can perform80 arbitrary code execution on your computer, it is **EXTREMELY** unlikely you want to81 bind to 0.0.0.0.82834. Configure claude-mcp with URL: ``http://127.0.0.1:8000/sse`` (replace the port if needed.)84855. Unfortunately, the web UI inconsistently displays the hammer icon. However, you can verify86 that the MCP server is working by looking for "[MCP codemcp] SSE connection opened" in the87 Console, or by asking Claude what tools it has available (it should say88 tools from codemcp are available.)8990If you prefer to use Claude Desktop or have unusual needs, check out [INSTALL.md](INSTALL.md) for91installation instructions for a variety of non-standard situations.9293## Usage9495First, you must create a `codemcp.toml` file in the Git repository checkout96you want to work on. If you want the agent to be able to do things like run97your formatter or run tests, add the commands to execute them in the commands98section (note: these commands need to appropriately setup any virtual99environment they need):100101```toml102format = ["./run_format.sh"]103test = ["./run_test.sh"]104```105106The ``format`` command is special; it is always run after every file edit.107108Next, in Claude Desktop, we recommend creating a Project and putting this in109the Project Instructions:110111```112Initialize codemcp with $PROJECT_DIR113```114115Where `$PROJECT_DIR` is the path to the project you want to work on.116117Then chat with Claude about what changes you want to make to the project.118Every time codemcp makes a change to your code, it will generate a commit.119120To see some sample transcripts using this tool, check out:121122- [Implement a new feature](https://claude.ai/share/a229d291-6800-4cb8-a0df-896a47602ca0)123- [Fix failing tests](https://claude.ai/share/2b7161ef-5683-4261-ad45-fabc3708f950)124- [Do a refactor](https://claude.ai/share/f005b43c-a657-43e5-ad9f-4714a5cd746f)125126codemcp will generate a commit per chat and amend it as it is working on your feature.127128## Philosophy129130- When you get rate limited, take the time to do something else (review131 Claude's code, review someone else's code, make plans, do some meetings)132133- This is *not* an autonomous agent. At minimum, you have to intervene after134 every chat to review the changes and request the next change. While you135 *can* ask for a long list of things to be done in a single chat, you will136 likely hit Claude Desktop's output limit and have to manually "continue" the137 agent anyway. Embrace it, and use the interruptions to make sure Claude is138 doing the right thing.139140- When Claude goes off the rails, it costs you time rather than dollars.141 Behave accordingly: if time is the bottleneck, watch Claude's incremental142 output carefully.143144## Configuration145146Here are all the config options supported by `codemcp.toml`:147148```toml149project_prompt = """150Before beginning work on this feature, write a short haiku. Do this only once.151"""152153[commands]154format = ["./run_format.sh"]155test = ["./run_test.sh"]156```157158The `project_prompt` will be loaded when you initialize the project in chats.159160The `commands` section allows you to configure commands for specific tools. The161names are told to the LLM, who will decide when it wants to run them. You can add162instructions how to use tools in the `project_prompt`; we also support a more verbose163syntax where you can give specific instructions on a tool-by-tool basis:164165```166[commands.test]167command = ["./run_test.sh"]168doc = "Accepts a pytest-style test selector as an argument to run a specific test."169```170171## Troubleshooting172173To run the server with inspector, use:174175```176PYTHONPATH=. mcp dev codemcp/__main__.py177```178179Logs are written to `~/.codemcp/codemcp.log`. The log level can be set in a global configuration file at `~/.codemcprc`:180181```toml182[logger]183verbosity = "INFO" # Can be DEBUG, INFO, WARNING, ERROR, or CRITICAL184```185186Logging is not configurable on a per project basis, but this shouldn't matter187much because it's difficult to use Claude Desktop in parallel on multiple188projects anyway.189190## Contributing191192See [CONTRIBUTING.md](CONTRIBUTING.md).193
Full transparency — inspect the skill content before installing.