# CodeClone

CodeClone maps structural issues in Python repositories and compares them with a saved baseline. Use it to review new regressions separately from existing debt.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 12 repo stars
- Author: orenlab
- License: MPL-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/orenlab/codeclone
- Updated: 2026-10-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/codeclone

## What it does

The MCP server exposes repository analysis covering code clones, complexity, module relationships, dead code, and public APIs. CodeClone can render the same report as JSON, HTML, Markdown, or SARIF. It does not edit source files or ask an LLM to judge whether a change is safe; its findings come from repository analysis.

A baseline records structural debt the team has already accepted, so later checks can focus on regressions from the current change. The baseline file is `codeclone.baseline.json`; update it deliberately and commit it, rather than changing it just to clear a failed check. Python 3.10 or newer is required. MCP change control and related features are marked alpha in CodeClone 2.1.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add codeclone -- uvx codeclone
```
uvx runs the command named after the package; if the README names another one, use uvx --from codeclone <command>

### Codex

**Platform CLI**
```bash
codex mcp add codeclone -- uvx codeclone
```
uvx runs the command named after the package; if the README names another one, use uvx --from codeclone <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "codeclone": {
            "command": "uvx",
            "args": [
                "codeclone"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from codeclone <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "codeclone": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "codeclone"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from codeclone <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add codeclone uvx codeclone
```
uvx runs the command named after the package; if the README names another one, use uvx --from codeclone <command>

## When to use it
- locate duplicated code and high-complexity areas in a Python repository
- separate newly introduced regressions from existing structural debt
- inspect module dependencies and dependency cycles
- review public APIs and dead code in one analysis

## Example prompts
- Analyze this Python repository and report its structural findings.
- Compare the current analysis with the baseline and identify regressions from this change.
- Show the module dependency structure and the main code duplication findings.

## Similar
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
