whereismyai
jscpd
jscpd is a copy/paste detector for source code that finds duplicated, dead and overly complex code across languages.
Jscpd is a copy/paste detector for source code that finds duplicated, dead and overly complex code across hundreds of languages. It scores overall codebase health and fails builds when duplication crosses a set threshold. Built as a native Rust binary with a language server, it provides an MCP server and agent skills so AI agents can check for clones before writing more code. It detects identical tokens, renamed variables, similar syntax trees, and semantic duplicates using code embedding models. It integrates into pre-commit hooks, CI gates, and editors to make technical debt visible.
jscpd at a glance
- Best for: Software engineer
- Runs on: CLI, VS Code, JetBrains, self-hosted, open source
- Pricing: Free
- Released: May 2013
- Category: AI coding tool
- Website: jscpd.dev
Key features
- Finds duplicated code in 224 programming languages
- Runs as a native Rust binary without Node.js
- Includes an MCP server for AI agents
- Detects unused files, exports and imports
- Provides a language server for editor diagnostics
- Measures port progress between languages
- Generates HTML, JSON, XML and README badges
- Supports SARIF reports for code scanning
Use it for
- Block commits when duplication exceeds a threshold
- Fail pull requests in CI when clones appear
- Let AI agents check for code clones via MCP
- Rank and refactor the most complex files
- Port codebases to another language securely
Alternatives to jscpd
- jevgrep — Reduces coding agent costs by providing targeted, relevant repository context.
- Sgrep — Runs locally without accounts or hosted indexes using small CPU models.
- Codebase Memory MCP — High-speed indexing and persistent knowledge graphs for AI coding agents.
- CodeGraph — It eliminates file crawling, reducing AI agent tool calls by 88% and cutting costs.
- JS Reverse MCP — It organizes scripts, breakpoints, and network data for continuous AI agent reasoning.
- code2prompt — Written in Rust for high speed and efficiency when handling large codebases.
- jCodeMunch MCP — Cuts AI code-reading token costs by over 95 percent via tree-sitter symbol indexing.
- Zed — Very fast native editor with parallel agents and multiplayer
- BeautifulRust — It improves agent output using guidelines from five major Rust sources.
- Ccm — Measures codebases, traces change impact, and estimates resource costs locally.
- jcode — Optimized for massive parallelism with low memory usage per session.
- daidocs — It keeps code graphs as plain text for lower token costs and better accuracy.
All jscpd alternatives