Jscpd

v1.0.0Developer Toolsstable

Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server.

aiclones-detectioncode-qualitycoding-agentscopy-paste
Share:
5,684
Stars
0
Downloads
0
Weekly
0/5

What is Jscpd?

Jscpd is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to copy/paste detector for programming source code, supports 223 formats. ai-ready with token-efficient reporter, skill and mcp server.

Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Copy/paste detector for programming source code, supports 22

Use Cases

Detect code clones and duplication across 223+ file formats
Identify copy-paste patterns in source code
Maintain DRY principles in codebases
kucherenko

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx jscpd

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Jscpd

Jscpd is a copy/paste detection tool that scans source code across 223+ programming language formats to identify duplicate code blocks using the Rabin-Karp algorithm. It exposes an MCP server via the jscpd-server package, letting AI assistants detect code clones in your repositories and surface duplication reports directly in conversation. Developers use it to enforce DRY principles, catch accidental duplications during code review, and get token-efficient AI-ready reports.

Prerequisites

  • Node.js 18+ installed on your system
  • npm or npx available in your PATH
  • A git repository or source directory to scan
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Install jscpd globally

Install the jscpd CLI globally via npm. Version 4 uses the TypeScript engine supporting 224 formats; version 5 uses a Rust engine that is 24-37x faster and supports 223 formats.

npm install -g jscpd@5
2

Verify the installation

Confirm jscpd is available and working by running a quick check on a local directory.

jscpd --version
3

Run a duplication scan

Point jscpd at your source directory. Use the 'ai' reporter for token-efficient output suited to AI assistants, or 'console-full' for detailed human-readable results.

jscpd ./src --reporters ai
4

Create a project configuration file

Add a .jscpd.json at the root of your project to configure thresholds, ignored paths, and default reporters so each scan is consistent.

{
  "threshold": 0,
  "reporters": ["ai", "console"],
  "ignore": ["**/*.test.ts", "**/node_modules/**"],
  "formats": ["javascript", "typescript", "python"]
}
5

Configure the MCP server in your client

Add jscpd to your MCP client configuration. The server runs via npx and exposes copy/paste detection as an MCP tool your AI assistant can invoke.

{
  "mcpServers": {
    "jscpd": {
      "command": "npx",
      "args": ["jscpd", "--mcp"]
    }
  }
}

Jscpd Examples

Client configuration

Add jscpd to Claude Desktop's MCP server list to enable copy/paste detection tools in your AI assistant.

{
  "mcpServers": {
    "jscpd": {
      "command": "npx",
      "args": ["jscpd", "--mcp"]
    }
  }
}

Prompts to try

Once connected, use natural language to detect and analyze code duplication in your project.

- "Scan the ./src directory for duplicate code blocks and show me the worst offenders"
- "Run jscpd on this repo and give me an AI-formatted report of all clones above 10 lines"
- "Which files have the most copy-paste duplication in my TypeScript project?"
- "Check if my Python scripts have any repeated logic I should refactor"

Troubleshooting Jscpd

jscpd reports no clones found even in a large codebase

Check the threshold setting in .jscpd.json — the default may be filtering out short clones. Set "threshold": 0 to see all duplications, or lower "minLines" to 3 to catch smaller blocks.

Scan is very slow on a large monorepo

Upgrade to jscpd@5 which uses the Rust engine (24-37x faster). Also add "ignore" patterns in .jscpd.json to skip node_modules, dist, and generated files.

MCP server not discovered by the client

Ensure npx is available in the shell environment your MCP client uses. Try specifying the full path: use "command": "/usr/local/bin/npx" or install jscpd globally with npm install -g jscpd and use "command": "jscpd" directly.

Frequently Asked Questions about Jscpd

What is Jscpd?

Jscpd is a Model Context Protocol (MCP) server that copy/paste detector for programming source code, supports 223 formats. ai-ready with token-efficient reporter, skill and mcp server. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Jscpd?

Follow the installation instructions on the Jscpd GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Jscpd?

Jscpd works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Jscpd free to use?

Yes, Jscpd is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "jscpd": { "command": "npx", "args": ["-y", "jscpd"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Jscpd?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides