Labsco
MCP SERVER

Code Reaper

by kaldonia-labs

Explores a running site with a browser agent, records V8 coverage, and writes patches that delete the JavaScript nothing executed.

Code Generation, Scaffolding & MigrationVerified
Summary
Deletion backed by coverage, with a way back.

The evidence for removing a function is that it never ran while a browser agent used the site, and risk scores plus pre-patch snapshots mean a wrong call is reversible. Coverage only proves what the crawl exercised, which is what the verification replay is for.

What it is

An MCP server for Cursor that finds dead JavaScript by driving a real browser over your site, collecting V8 precise coverage, and turning zero-execution functions into removal patches.

What you get
  • One call that runs the whole pipeline and returns file paths, line numbers, risk scores and removal recommendations (find_dead_code)
  • Scan and analysis as separate steps when one crawl should feed several passes (scan_website, analyze_dead_code)
  • Unified-diff patches generated at a conservative, balanced or aggressive setting, and readable before they are applied (generate_patches, get_patch_diff)
  • Patches applied to disk with pre-patch snapshots kept, and a rollback that restores the originals (apply_patch, rollback_patch)
  • A verification replay that re-runs the browser agent over the same interactions after patching (verify_patch)
  • Recent scans listed with their status, and one scan's detail (list_scans, get_scan_status)
Requirements

Python 3.11+, Playwright Chromium installed with playwright install chromium, and a Gemini API key, which the first run writes into ~/.cursor/mcp.json.

Setup effort

One command plus a key — pipx run codereaper, then supply credentials