# jscpd — Copy/Paste Detector + MCP Server > A copy/paste (duplicate code) detector supporting 223 formats, with CLI and server modes; verified 5631★, pushed 2026-05-14. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash npm install -g jscpd jscpd --help # example (tune args in README): jscpd --min-tokens 50 --path . ``` ## Intro A copy/paste (duplicate code) detector supporting 223 formats, with CLI and server modes; verified 5631★, pushed 2026-05-14. **Best for:** Teams adding duplicate-code detection to CI, monorepos, or agent refactor workflows **Works with:** Node.js; runs as CLI or server per README install examples **Setup time:** 5-10 minutes ### Key facts (verified) - GitHub: 5631 stars · 233 forks · pushed 2026-05-14. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `jscpd`. ## Main - Use jscpd as a regression guard: run it in CI to keep copy/paste from silently spreading during fast iterations. - Tune it for agent refactors: set a token threshold so you catch true duplication without flagging common boilerplate. - Prefer the server mode when you need repeated queries across multiple repos or a UI/report pipeline. - Treat supported formats as a scope knob: start narrow (your main language), then expand once the baseline is clean. ### README (excerpt) **jscpd** ![stand with Ukraine](https://badgen.net/badge/support/UKRAINE/?color=0057B8&labelColor=FFD700) [![npm](https://img.shields.io/npm/v/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) ![jscpd](https://raw.githubusercontent.com/kucherenko/jscpd/master/assets/jscpd-badge.svg?sanitize=true) [![license](https://img.shields.io/github/license/kucherenko/jscpd.svg?style=flat-square)](https://github.com/kucherenko/jscpd/blob/master/LICENSE) [![npm](https://img.shields.io/npm/dw/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) [![jscpd CI](https://github.com/kucherenko/jscpd/actions/workflows/nodejs.yml/badge.svg)](https://github.com/kucherenko/jscpd/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/kucherenko/jscpd/branch/master/graph/badge.svg)](https://codecov.io/gh/kucherenko/jscpd) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fkucherenko%2Fjscpd.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkucherenko%2Fjscpd?ref=badge_shield) [![Backers on Open Collective](https://opencollective.com/jscpd/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/jscpd/sponsors/badge.svg)](#sponsors) [![NPM](https://nodei.co/npm/jscpd.svg)](https://nodei.co/npm/jscpd/) > Copy/paste detector for programming source code, supports 223 formats. AI-ready with MCP server and token-efficient reporter. Copy/paste is a common technical debt on a lot of projects. The jscpd gives the ability to find duplicated blocks implemented on more than 223 programming languages and digital formats of documents. The jscpd tool implements [Rabin-Karp](https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm) algorithm for searching duplications. ## Packages of jscpd | name | version | description | |----------------------|----------|---------------| | [jscpd](apps/jscpd) | [![npm](https://img.shields.io/npm/v/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) | main package for jscpd (cli and API for detections included) | | [jscpd-server](apps/jscpd-server) | [![npm](https://img.shields.io/npm/v/jscpd-server.svg?style=flat-square)](https://www.npmjs.com/package/jscpd-server) | jscpd server application | ### Source-backed notes - README states it supports 223 formats and provides both CLI and server installs (`npm install -g jscpd` / `jscpd-server`). - Repo is MIT licensed and actively maintained (verified via GitHub API). - README includes a `pnpm install` path for contributors (repo build instructions). ### FAQ - **Is it only for JavaScript?**: No—README says it supports 223 formats; run it against your repo language set. - **How do I install the CLI?**: Use `npm install -g jscpd` (README install section). - **Can I run it as a service?**: Yes—README mentions server mode (`jscpd-server`). ## Source & Thanks > Created by [kucherenko](https://github.com/kucherenko). Licensed under MIT. > > [kucherenko/jscpd](https://github.com/kucherenko/jscpd) — ⭐ 5631 Thanks to the upstream maintainers and contributors for publishing this work under an open license. --- ## Quick Use ```bash npm install -g jscpd jscpd --help # example (tune args in README): jscpd --min-tokens 50 --path . ``` ## Intro jscpd 是重复代码(copy/paste)检测器:支持 223 种格式,提供 CLI/服务端模式,适合在 CI 中做自动化质量门禁并输出报告;已验证 5631★,更新于 2026-05-14。 **Best for:** 想把重复代码检测接入 CI、单仓多包或 agent 重构流程的团队 **Works with:** Node.js;可按 README 以 CLI 或 server 方式运行 **Setup time:** 5-10 minutes ### Key facts (verified) - GitHub:5631 stars · 233 forks;最近更新 2026-05-14。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口:`jscpd`。 ## Main - 把 jscpd 当回归门禁:在 CI 里跑,避免快速迭代时 copy/paste 复制扩散。 - 为 agent 重构调阈值:设置 token 阈值,抓住真正重复而不是常见样板代码。 - 需要跨仓库反复查询或出报表时用 server 模式,避免重复启动开销。 - 把“支持格式”当范围旋钮:先覆盖主语言,清干净后再逐步扩大扫描面。 ### README (excerpt) **jscpd** ![stand with Ukraine](https://badgen.net/badge/support/UKRAINE/?color=0057B8&labelColor=FFD700) [![npm](https://img.shields.io/npm/v/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) ![jscpd](https://raw.githubusercontent.com/kucherenko/jscpd/master/assets/jscpd-badge.svg?sanitize=true) [![license](https://img.shields.io/github/license/kucherenko/jscpd.svg?style=flat-square)](https://github.com/kucherenko/jscpd/blob/master/LICENSE) [![npm](https://img.shields.io/npm/dw/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) [![jscpd CI](https://github.com/kucherenko/jscpd/actions/workflows/nodejs.yml/badge.svg)](https://github.com/kucherenko/jscpd/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/kucherenko/jscpd/branch/master/graph/badge.svg)](https://codecov.io/gh/kucherenko/jscpd) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fkucherenko%2Fjscpd.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkucherenko%2Fjscpd?ref=badge_shield) [![Backers on Open Collective](https://opencollective.com/jscpd/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/jscpd/sponsors/badge.svg)](#sponsors) [![NPM](https://nodei.co/npm/jscpd.svg)](https://nodei.co/npm/jscpd/) > Copy/paste detector for programming source code, supports 223 formats. AI-ready with MCP server and token-efficient reporter. Copy/paste is a common technical debt on a lot of projects. The jscpd gives the ability to find duplicated blocks implemented on more than 223 programming languages and digital formats of documents. The jscpd tool implements [Rabin-Karp](https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm) algorithm for searching duplications. ## Packages of jscpd | name | version | description | |----------------------|----------|---------------| | [jscpd](apps/jscpd) | [![npm](https://img.shields.io/npm/v/jscpd.svg?style=flat-square)](https://www.npmjs.com/package/jscpd) | main package for jscpd (cli and API for detections included) | | [jscpd-server](apps/jscpd-server) | [![npm](https://img.shields.io/npm/v/jscpd-server.svg?style=flat-square)](https://www.npmjs.com/package/jscpd-server) | jscpd server application | ### Source-backed notes - README 写明支持 223 种格式,并提供 CLI 与 server 安装方式(`npm install -g jscpd` / `jscpd-server`)。 - 仓库为 MIT 许可且维护活跃(已通过 GitHub API 复核)。 - README 也给出贡献者构建路径(例如 `pnpm install`)。 ### FAQ - **只能测 JavaScript 吗?**:不是:README 写明支持 223 种格式,可按你的语言栈配置扫描。 - **CLI 怎么安装?**:按 README:`npm install -g jscpd`。 - **可以当服务跑吗?**:可以:README 提到 server 模式(`jscpd-server`)。 ## Source & Thanks > Created by [kucherenko](https://github.com/kucherenko). Licensed under MIT. > > [kucherenko/jscpd](https://github.com/kucherenko/jscpd) — ⭐ 5631 --- Source: https://tokrepo.com/en/workflows/jscpd-copy-paste-detector-mcp-server Author: Skill Factory