AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
Dev Tooling/
jscpd
jscpd logo

jscpd

Active·★ 6.4k·MIT·Updated 2026-10-21
★ Essential★ Trending

jscpd is a copy/paste detector for source code that finds duplicated blocks in more than 225 programming languages and document formats, using the Rabin-Karp algorithm. Copy/paste is a common source of technical debt, and jscpd reports where the duplicated blocks are. The README says the latest versions add a Rust-powered engine.

The newer part of the project is aimed at AI workflows. An `ai` reporter prints compact, token-efficient output (common-path-prefix compression, no code fragments) that can be piped into an LLM prompt; on the project's test fixtures it used about 1,100 estimated tokens against about 5,400 for the default console reporter, roughly 79% fewer. Two agent skills ship with it, a tool-reference skill and a dry-refactoring skill that guides reading clone output and extracting duplicates, installed with `npx skills add kucherenko/jscpd`. A separate jscpd-server package exposes detection as an MCP server over streamable HTTP. The main package provides a CLI and an API, other packages cover the core algorithm, tokenizer, finder, a LevelDB store for large repositories and HTML reporters, and the code is MIT licensed.

Hands-on tested · Tested on 2026-10-10 with jscpd 5.4.1.

Setup: macOS, Node via npx, run on the AgentIndex frontend (157 files, 20,313 lines) and backend repositories

Commands run

npx -y [email protected] <dirs> --ignore "**/data/**,**/*.json,**/node_modules/**,**/.next/**" --min-lines 8 --min-tokens 60

What we saw

  • Frontend: 45 clones, 3.4% duplicated lines. Backend: 4 clones, 1.9%.
  • The findings were real: identical admin middleware in two route files and six near-identical Open Graph image files. We refactored both.
  • The `ai` reporter printed about 2.7k characters against about 9.4k for the console reporter on the same run (roughly 71% smaller; the README claims 79% on its own fixtures).
  • About 4.7 seconds including the npx download.

Data as of 2026-10-17.

License
MIT
Latest release
v5.4.1 · 2026-10-09
Last commit
2026-10-17
Contributors
88
Forks
277
Open issues and PRs
49
First published
2013-05-29
npm package
cpd 5.4.1 · 2,477 downloads last week

Source: GitHub, npm and PyPI public APIs.

#Code Duplication#Static Analysis#Code Quality#Refactoring#AI-Ready#Multi-language Support#Dev Tooling#Performance
$ Install
$ npm install -g cpd
↗ Visit site★ GitHub
01

Features

01Detects copy/paste duplications in over 225 programming languages and digital formats.
02AI-ready with token-efficient reporter and agent skills for integration into LLM workflows.
03Rust-powered engine (cpd) offers 10-30x faster detection performance.
04Supports Git blame with side-by-side comparison for author attribution in duplicated code.
05Multiple output reporters including console, HTML, JSON, SARIF (GitHub Code Scanning compatible), and custom reporters.
02

Why choose it

+Detects duplicated code across 225+ languages and formats with a well-known algorithm (Rabin-Karp).
+The `ai` reporter cuts output to about a fifth of the tokens of the default reporter (the project's own measurement).
+Ships an agent skill for refactoring away duplicates, plus an MCP server for assistants.
+Modular packages (core, tokenizer, finder, stores, reporters) and an API besides the CLI; MIT licensed.
03

Trade-offs

!The 79% token saving is measured by the project on its own fixtures, so results on your repository will differ.
!It finds duplicated code, but deciding which duplicates are worth refactoring is still a human or agent judgement call.
!The MCP functionality lives in a separate jscpd-server package that you install and run in addition to the CLI.
04

Maintenance check

ActiveChecked: 2026-10-20
Last commit
2026-10-20
Commits, last 90 days
100+
Releases, last 90 days
16
Latest release
v5.4.2 (2026-10-20)
Open issues
49
Recent issues with at least one comment
1/13
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 10, 48, 23, 15, 31, 44, 61, 41, 72, 70, 23, 21

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

Most discussed open issues

  • #416 Programming API exemples not working11 comments · 2020-11-30
  • #355 Add hosted microservice for jscpd (tryjscpd)6 comments · 2020-05-10
  • #591 Facing slowness while running JSCPD 5 comments · 2023-06-07
  • #221 Same code on multiple files5 comments · 2019-04-05
  • #1015 Upstream: move Super Linter and MegaLinter off threshold 0 to --baseline-from-ref; fix the parallel report-path race3 comments · 2026-09-05

Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.

05

Compatibility

Node.js
Runtime
Verified via docs
Rust
Engine
Verified via docs
npm
Package Manager
Verified via docs
GitHub Actions
CI/CD Integration
Verified via docs
LLM / AI Agents
AI Integration
Verified via docs
MacOS
Platform
Verified via docs
06

Quick start

1
$ npm install -g cpd
07

Use cases

↳Identify and eliminate code duplication in large codebases to reduce technical debt and improve maintainability.
↳Integrate into CI/CD pipelines (e.g., GitHub Super Linter) for automated code quality checks and preventing new duplications.
↳Assist AI agents in refactoring tasks by providing token-efficient duplication reports.
↳Generate comprehensive reports (HTML, SARIF) for code auditing and compliance purposes.
↳Use the MCP Server to expose duplication detection capabilities to AI assistants directly from an editor for on-demand checks.
08

Alternatives

⚡Top VS:
VScross-code-organizer★383→VSDoyunha-Gopeak★268→VSmcp★56→VSsourcey★1.4k→
cross-code-organizer logo
cross-code-organizer★ 383
Cross-Code Organizer (formerly Claude Code Organizer): cross-harness config dashboard for Claude Code, Codex CLI, MCP servers, skills, memories, agents, sessions, security scanning, context budget, and backups.
VSCompare→
Doyunha-Gopeak logo
Doyunha-Gopeak★ 268
GoPeak — The most comprehensive MCP server for Godot Engine. 95+ tools: scene management, GDScript LSP, DAP debugger, screenshot capture, input injection, ClassDB introspection, CC0 asset library. npx gopeak
VSCompare→
mcp logo
mcp★ 56
RunAPI MCP server for model discovery, pricing lookup, media task creation, and balance checks.
VSCompare→
sourcey logo
sourcey★ 1.4k
Precision documentation from OpenAPI, MCP, Doxygen, and Markdown guides. Static HTML you own.
VSCompare→
CopilotKit logo
CopilotKit★ 38.2k
React UI + elegant infrastructure for AI Copilots, AI chatbots, and in-app AI agents. The Agentic Frontend.
VSCompare→
rust-doctor logo
rust-doctor★ 21
Your agent writes bad Rust. This catches it.
VSCompare→
1Panel logo
1Panel★ 37.2k
🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.
VSCompare→
sigmap logo
sigmap★ 646
~97% token reduction for AI coding sessions — zero deps, 33 languages, MCP server
VSCompare→
See all alternatives →

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs04Maintenance check05Compatibility06Quick start07Use cases08Alternatives
kucherenko /
jscpd
↗

Copy/paste detector for 225 formats with an AI reporter, skills and MCP server

6.4k277MIT
Last commit2d ago
StatusActive
CategoryDev Tooling
Contributors88
Latest releasev5.4.1
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.