home / mcp / codemcp mcp server

Codemcp MCP Server

Coding assistant MCP for Claude Desktop

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ezyang-codemcp": {
      "url": "http://127.0.0.1:8000/sse"
    }
  }
}

Codemcp lets Claude Pro act as a pair programming assistant on your local machine. You can directly ask Claude to implement features, fix bugs, and refactor code in your project, with edits applied and tests run automatically. You gain a seamless, on-device coding workflow without copying code back and forth between chat windows.

How to use

Set up Codemcp in your project and start a chat with Claude about the changes you want. Each time Codemcp edits a file, it creates a commit so you can review progress incrementally. If you want to run tests or a formatter automatically after each change, ensure those commands are configured in codemcp.toml and are available in your environment.

How to install

# Prerequisites
sudo apt-get update
sudo apt-get install -y uv git

# Start Codemcp (stdio-based server) from the published source
uvx --from git+https://github.com/ezyang/codemcp@prod codemcp serve

# Optional: bind to a non-standard port
uvx --from git+https://github.com/ezyang/codemcp@prod codemcp serve --port 1234

Configure Claude to connect to the MCP server via SSE. Use the URL http://127.0.0.1:8000/sse (adjust the port if you started with a non-default port). After starting the server, verify the connection by checking for an SSE connection message in the console.

Additional setup and configuration

project_prompt = """
Before beginning work on this feature, write a short haiku. Do this only once.
"""

[commands]
format = ["./run_format.sh"]
test = ["./run_test.sh"]

Create a codemcp.toml in your project checkout. The project prompt and per-tool commands configure how Codemcp interacts with your codebase. For example, you can specify format and test commands that Codemcp will run after edits.

Security and workflow notes

Codemcp is designed for careful, review-driven use. You can review Claude’s changes after each chat, and you can choose to extend or modify the plan before approving further tool use. Do not expose your machine to untrusted networks, and avoid binding the MCP server to all interfaces in insecure environments.

Troubleshooting

# Run server with inspector for debugging
PYTHONPATH=. mcp dev codemcp/__main__.py
```

Logs are written to ~/.codemcp/codemcp.log. Adjust the global logger level in ~/.codemcprc if needed:
```toml
[logger]
verbosity = "INFO"  # DEBUG, INFO, WARNING, ERROR, CRITICAL
```

If the SAAS browser extension or client fails to initialize, ensure the SSE URL is reachable and that the server started without errors. Check the console for an SSE connection opened message.