AI Skill Hub 强烈推荐:jscpd MCP工具 是一款优质的MCP工具。已获得 5.6k 颗 GitHub Star,AI 综合评分 8.2 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
专业的代码克隆检测工具,支持223种编程语言和文件格式。能自动识别源代码中的重复代码片段,帮助开发团队提升代码质量、规范编码规范。适合软件工程师、代码审查人员和AI编程助手集成使用。
jscpd MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
专业的代码克隆检测工具,支持223种编程语言和文件格式。能自动识别源代码中的重复代码片段,帮助开发团队提升代码质量、规范编码规范。适合软件工程师、代码审查人员和AI编程助手集成使用。
jscpd MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/kucherenko/jscpd
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"jscpd-mcp--": {
"command": "npx",
"args": ["-y", "jscpd"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 jscpd MCP工具 执行以下任务... Claude: [自动调用 jscpd MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"jscpd_mcp__": {
"command": "npx",
"args": ["-y", "jscpd"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Copy/paste detector for programming source code, supports 223 formats. AI-ready with AI skills, 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 algorithm for searching duplications.
v4.2.x
prismjs npm package with an own backend built on the reprism grammar engine. ~11.5% faster tokenization on real projects (avg 1126ms → 997ms on a 548-file, 223-format scan)..vue), Svelte (.svelte), Astro (.astro), and Markdown files are now tokenized per-block/per-section, enabling duplicate detection across file types (e.g. a <script> block in a .vue file vs a .ts file).--store-path: configure LevelDB cache directory for parallel runs--skipComments: shorthand flag for --mode weak--formats-names: map specific filenames (e.g. Makefile, Dockerfile) to a format--noTips: suppress tip output in CI environments$ npm install -g jscpd
$ npm install -g jscpd-server
$ npx jscpd /path/to/source or
$ jscpd /path/to/code or
$ jscpd --pattern "src/**/*.js" More information about cli here.
Start the server:
$ jscpd-server
Check code for duplication:
$ curl -X POST http://localhost:3000/api/check \
-H "Content-Type: application/json" \
-d '{
"code": "console.log(\"hello\");\nconsole.log(\"world\");",
"format": "javascript"
}'
More information about server here.
23 clones · 4.2% duplication ```
Benchmarked on the fixtures/ directory (91 clones, 132 files):
| Reporter | Output size | Estimated tokens |
|---|---|---|
| default (console) | ~21,800 chars | ~5,400 |
ai | ~4,500 chars | ~1,100 |
~79% fewer tokens than the default console reporter.
For integration copy/paste detection to your application you can use programming API:
jscpd Promise API
import {IClone} from '@jscpd/core';
import {jscpd} from 'jscpd';
const clones: Promise<IClone[]> = jscpd(process.argv);
jscpd async/await API
import {IClone} from '@jscpd/core';
import {jscpd} from 'jscpd';
(async () => {
const clones: IClone[] = await jscpd(['', '', __dirname + '/../fixtures', '-m', 'weak', '--silent']);
console.log(clones);
})();
detectClones API
import {detectClones} from "jscpd";
(async () => {
const clones = await detectClones({
path: [
__dirname + '/../fixtures'
],
silent: true
});
console.log(clones);
})()
detectClones with persist store
import {detectClones} from "jscpd";
import {IMapFrame, MemoryStore} from "@jscpd/core";
(async () => {
const store = new MemoryStore<IMapFrame>();
await detectClones({
path: [
__dirname + '/../fixtures'
],
}, store);
await detectClones({
path: [
__dirname + '/../fixtures'
],
silent: true
}, store);
})()
In case of deep customisation of detection process you can build your own tool with @jscpd/core, @jscpd/finder and @jscpd/tokenizer.
| name | version | description |
|---|---|---|
| [jscpd](apps/jscpd) | [](https://www.npmjs.com/package/jscpd) | main package for jscpd (cli and API for detections included) |
| [jscpd-server](apps/jscpd-server) | [](https://www.npmjs.com/package/jscpd-server) | jscpd server application |
| [@jscpd/core](packages/core) | [](https://www.npmjs.com/package/@jscpd/core) | core detection algorithm, can be used for detect duplication in different environments, one dependency to eventemitter3 |
| [@jscpd/finder](packages/finder) | [](https://www.npmjs.com/package/@jscpd/finder) | detector of duplication in files |
| [@jscpd/tokenizer](packages/tokenizer) | [](https://www.npmjs.com/package/@jscpd/tokenizer) | tool for tokenize programming source code |
| [@jscpd/leveldb-store](packages/leveldb-store) | [](https://www.npmjs.com/package/@jscpd/leveldb-store) | LevelDB store, used for big repositories, slower than default store |
| [@jscpd/html-reporter](packages/html-reporter) | [](https://www.npmjs.com/package/@jscpd/html-reporter) | Html reporter for jscpd |
| [@jscpd/badge-reporter](packages/badge-reporter) | [](https://www.npmjs.com/package/@jscpd/badge-reporter) | Badge reporter for jscpd |
| [jscpd-sarif-reporter](packages/sarif-reporter) | [](https://www.npmjs.com/package/jscpd-sarif-reporter) | SARIF reporter for jscpd (GitHub Code Scanning compatible) |
成熟的代码质量检测工具,支持格式全面,与MCP集成良好,适合AI编程助手增强代码质量管理能力。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,jscpd MCP工具 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | jscpd |
| 原始描述 | 开源MCP工具:Copy/paste detector for programming source code, supports 223 formats. AI-ready 。⭐5.6k · TypeScript |
| Topics | 代码质量克隆检测复制粘贴检测223种格式AI就绪 |
| GitHub | https://github.com/kucherenko/jscpd |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-14 · 更新时间:2026-05-16 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端