Codereaper MCP Server

AI-driven JavaScript dead code elimination for Cursor (MCP server)

Local serverstdioPython

What is the Codereaper MCP server?

If you already use Codereaper, the codereaper mcp server is the piece that lets your assistant work with it directly. AI-driven JavaScript dead code elimination for Cursor (MCP server).

What the server does

CodeReaper is an AI-driven MCP tool for Cursor that finds and removes dead JavaScript by exploring real UIs and capturing V8 coverage.

  • Autonomous UI exploration via the Index browser agent
  • V8 precise coverage to identify zero-execution functions
  • Risk scoring and removal recommendations
  • Patch generation and optional verification replay
  • MCP integration for Cursor workflows

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • find_dead_code — Full pipeline: scan + analyze. Returns dead-code report with file paths, line numbers, risk scores, and removal recommendations
  • scan_website — Scan only (no analysis). Returns scan_id for later use
  • analyze_dead_code — Analyze a completed scan. Takes scan_id
  • generate_patches — Generate unified diffs to remove dead code (conservative / balanced / aggressive)
  • get_patch_diff — Retrieve the combined diff for a patch
  • apply_patch — Apply a patch to source files (stores snapshots for rollback)
  • verify_patch — Re-run the browser agent to check for regressions after patching
  • rollback_patch — Restore original files from pre-patch snapshots
  • list_scans — List recent scans
  • get_scan_status — Get detailed status of a scan

Installation

Installation goes through your MCP client rather than a global install: point it at codereaper on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Credentials and setup notes

Configuration is passed through the environment: GEMINI_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Python 3.11+ - Playwright Chromium (installed via playwright install chromium) - A Gemini API key (or OpenAI / Anthropic if you change providers)

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Codereaper's toolset — find_dead_code, scan_website, analyze_dead_code and 7 more — is a fair guide to whether it matches your workflow. It is maintained by kaldonia-labs; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Codereaper.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
find_dead_codeFull pipeline: scan + analyze. Returns dead-code report with file paths, line numbers, risk scores, and removal recommendations.
scan_websiteScan only (no analysis). Returns scan_id for later use.
analyze_dead_codeAnalyze a completed scan. Takes scan_id.
generate_patchesGenerate unified diffs to remove dead code (conservative / balanced / aggressive).
get_patch_diffRetrieve the combined diff for a patch.
apply_patchApply a patch to source files (stores snapshots for rollback).
verify_patchRe-run the browser agent to check for regressions after patching.
rollback_patchRestore original files from pre-patch snapshots.
list_scansList recent scans.
get_scan_statusGet detailed status of a scan.

How to install the Codereaper MCP server

{
  "mcpServers": {
    "codereaper": {
      "command": "uvx",
      "args": ["codereaper"],
      "env": {
        "GEMINI_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.11+ - Playwright Chromium (installed via playwright install chromium) - A Gemini API key (or OpenAI / Anthropic if you change providers)
VariableDescriptionRequired
GEMINI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Codereaper to find dead code.
  • Use Codereaper to scan website.
  • Use Codereaper to analyze dead code.

Frequently asked questions

It connects Codereaper to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (find_dead_code, scan_website, analyze_dead_code, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Codereaper directly.