Skip to main content
mcpSource-backedReview first Safety Privacy

jscpd MCP Server

Copy-paste detection MCP server that scans a codebase and lets AI assistants check snippets, inspect duplication statistics, and review current-directory duplication through jscpd's detection engine.

by Andrey Kucherenko·added 2026-06-06·
Claude CodeClaude Desktop
HarnessClaude CodeClaude Desktop
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • jscpd-server scans the configured project directory on startup and can compare submitted snippets against the scanned codebase.
  • The MCP server exposes duplication checks and statistics over an HTTP server that currently does not require authentication.
  • Bind the server to local interfaces for personal workflows and avoid exposing scanned proprietary codebases to untrusted networks.
  • Persistent stores such as LevelDB may retain codebase token/index data between runs.
  • Snippet checks can reveal copied code fragments, file paths, line ranges, and duplication percentages to the MCP client and model.

Privacy notes

  • Source paths, snippets, duplicated fragments, clone locations, statistics, file formats, and project structure may be exposed through MCP tool results.
  • Codebases may contain proprietary logic, credentials, customer identifiers, comments, internal APIs, security-sensitive code, or generated files.
  • Reports and server logs can retain duplication evidence and scanned project metadata.
  • Tune ignore rules before scanning vendored dependencies, generated files, test fixtures, secrets, or third-party code you do not want in model context.

Prerequisites

  • Node.js and npm available for installing `jscpd-server`.
  • A project directory you are authorized to scan for code duplication.
  • MCP client with Streamable HTTP support.
  • Port, host, and store settings chosen before exposing the server outside local development.
  • `.jscpd.json`, ignore patterns, gitignore behavior, and min-token/min-line thresholds reviewed for the target codebase.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
10 minutes
Difficulty
intermediate
Full copyable content
npm install -g jscpd-server
jscpd-server PROJECT_DIR

About this resource

Content

jscpd MCP Server exposes copy-paste detection to AI assistants through the jscpd-server package. The server scans a codebase, then provides MCP tools for checking snippets against that codebase, retrieving duplication statistics, and checking the current directory.

The MCP server is useful for refactoring workflows where Claude or another agent needs to determine whether new or selected code duplicates existing patterns before suggesting an extraction, consolidation, or cleanup.

Source Review

These sources were reviewed on 2026-06-06. Prefer the live repository, server README, package metadata, and npm registry metadata for current commands, server options, MCP endpoint behavior, supported tools, package names, and duplication detection capabilities.

Features

  • Start a project-scoped duplication server with jscpd-server PROJECT_DIR.
  • Expose a Streamable HTTP MCP endpoint from the local jscpd server.
  • Check submitted snippets against the scanned project.
  • Retrieve project duplication statistics.
  • Check duplication in the current directory.
  • Configure host, port, store, config file, format filters, ignore patterns, minimum lines, minimum tokens, max source size, and detection mode.
  • Use persistent storage for production-style runs.
  • Support more than 225 programming languages and document formats through jscpd's detection engine.

Installation

Install the server package:

npm install -g jscpd-server

Start it against a project directory:

jscpd-server PROJECT_DIR

Configure your MCP client to use Streamable HTTP and the local server's /mcp route. Keep the service bound to a trusted local interface unless you have a separate access-control layer.

Tools

  • check_duplication: check a submitted snippet against the scanned codebase.
  • get_statistics: return duplication statistics for the scanned project.
  • check_current_directory: run a current-directory duplication check.

Use Cases

  • Ask Claude whether a proposed helper duplicates existing project code.
  • Check selected snippets before accepting generated code.
  • Drive duplication-aware refactoring sessions.
  • Review project duplication statistics from an editor or agent workflow.
  • Gate cleanup tasks with concrete clone locations and percentages.
  • Pair with jscpd's AI reporter and skills for token-efficient refactoring workflows.

Safety and Privacy

Run jscpd-server only on directories the agent is allowed to inspect. The server can expose source paths, clone locations, snippets, duplicated fragments, and project-level statistics. For proprietary repos, bind locally, avoid shared networks, and tune ignore rules before the initial scan.

Persistent stores can retain scan data. Treat LevelDB stores, reports, server logs, and MCP transcripts as code-derived artifacts that may need the same handling as source code.

Duplicate Check

No kucherenko/jscpd entry, jscpd MCP entry, jscpd-server MCP entry, or matching source URL was found in content/mcp.

#code-quality#duplication#static-analysis#streamable-http#refactoring

Source citations

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.