# CodeClone

> CodeClone is an open-source MCP server for developer tools. Structural change control and code-health analysis for AI-assisted Python development. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://orenlab.github.io/codeclone/
- **Repository:** https://github.com/orenlab/codeclone
- **MCP Registry name:** io.github.orenlab/codeclone
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

Most review tools start after a patch exists. CodeClone starts earlier: an agent declares an intent, the tool maps its structural blast radius and an explicit edit boundary, and afterwards compares the real patch with that scope and verifies for regressions. It leaves an audit trail and says it never rewrites source or asks an LLM whether a change is safe; findings come from deterministic repository facts.

The base analysis report covers clones, complexity, coupling, cohesion, dead code, a module map, API inventory and coverage joins, with baselines that separate accepted legacy debt from new regressions. Output goes to the CLI, HTML, JSON, Markdown, SARIF, MCP and GitHub Actions. The documentation lists 38 MCP tools. Alpha 2.1 features add intent control, live call-graph context, local engineering memory and multi-agent conflict handling.

It needs Python 3.10 or newer and runs with no hosted service or account; state is stored locally. Documented clients include Claude Code, Claude Desktop, Cursor, Codex and VS Code.

## Features

- **Intent-first editing:** Declares scope before edits and verifies the patch stays inside it (2.1 alpha).
- **Structural analysis:** Reports clones, complexity, coupling, cohesion, dead code and API inventory.
- **Baseline-aware gates:** Separates accepted legacy debt from regressions in the current change.
- **Many report formats:** Emits HTML, JSON, Markdown and SARIF from one canonical payload.
- **Engineering Memory:** Keeps local, evidence-linked decisions and past findings (2.1 alpha).
- **Agent coordination:** Handles conflict-safe multi-agent intents and queues (2.1 alpha).

## Good for

- Keep an agent's edit inside the files it declared
- Fail CI on new structural regressions only
- Find duplicated code and dead code in a Python project
- Review the blast radius of a refactor
- Share past decisions between agent sessions

## Install

### Claude Code (Terminal)

```sh
claude mcp add codeclone -- uvx codeclone
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "codeclone": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
```

## FAQ

### Does it use an LLM to judge changes?

No. Findings and gates come from deterministic repository facts.

### Do I need an account?

No hosted service or cloud account is needed; analysis state is stored locally.

### How do I try it?

Run uvx codeclone@latest . from the repository; Python 3.10 or newer is required.

### Which parts are alpha?

The controller, live context, engineering memory and agent coordination sections need the 2.1 prerelease.

### Is CodeClone free?

Yes. CodeClone is open source, so you can use and self-host it for free.

### How do I add CodeClone to Claude Code?

Run this command in your terminal: claude mcp add codeclone -- uvx codeclone

### What are the best alternatives to CodeClone?

The closest alternatives to CodeClone are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/codeclone
