Skip to content
MCP server

CodeClone

Structural change control and code-health analysis for AI-assisted Python development

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
2.0.3
Listing updated
2 days ago

About CodeClone

CodeClone is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

claude mcp add codeclone -- uvx codeclone

Add to claude_desktop_config.json

{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "codeclone": {
      "command": "uvx",
      "args": [
        "codeclone"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

What it does

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

Pricing

Open source

Free PyPI package

Prices change. Check orenlab.github.io before you buy.

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 to CodeClone

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools