1. Conduid
  2. Agents
  3. Jscpd
MCP server · Agents

Jscpd

Copy/paste detector for programming source code.

64Good

Scored 4 months ago · breakdown

About Jscpd

Jscpd is an MCP server in the Agents category: copy/paste detector for programming source code. It has been installed 0 times through Conduid.

Install

Clone
git clone https://github.com/kucherenko/jscpd

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Jscpd

Powered by Claude · Grounded in docs

I know everything about Jscpd. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

jscpd

stand with Ukraine

npm jscpd license npm

jscpd CI codecov FOSSA Status Backers on Open Collective Sponsors on Open Collective

NPM

Copy/paste detector for programming source code, supports 150+ formats.

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 150 programming languages and digital formats of documents. The jscpd tool implements Rabin-Karp algorithm for searching duplications.

Packages of jscpd

name version description
jscpd npm main package for jscpd (cli and API for detections included)
jscpd-server npm jscpd server application
@jscpd/core npm core detection algorithm, can be used for detect duplication in different environments, one dependency to eventemitter3
@jscpd/finder npm detector of duplication in files
@jscpd/tokenizer npm tool for tokenize programming source code
@jscpd/leveldb-store npm LevelDB store, used for big repositories, slower than default store
@jscpd/html-reporter npm Html reporter for jscpd
@jscpd/badge-reporter npm Badge reporter for jscpd

AI Agent Skill

jscpd includes an agent skill for detecting and eliminating code duplication with AI coding assistants (Claude, Copilot, Gemini, Cursor, etc.).

npx skills add kucherenko/jscpd

Once installed, the skill teaches your agent to run jscpd with the ai reporter and refactor detected duplications.

Installation

$ npm install -g jscpd

Usage

$ npx jscpd /path/to/source

or

$ jscpd /path/to/code

or

$ jscpd --pattern "src/**/*.js"

More information about cli here.

JSCPD Server

JSCPD Server is a standalone application that provides an API for detecting code duplication. It can be used to integrate duplication detection into your services or tools.

Installation

$ npm install -g jscpd-server

Usage

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.

Programming API

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.

Start contribution

  • Fork the repo kucherenko/jscpd
  • Clone forked version (git clone https://github.com/{your-id}/jscpd)
  • Install dependencies (pnpm install)
  • Run the project in dev mode: pnpm dev (watch changes and rebuild the packages)
  • Add your changes
  • Add tests and check it with pnpm test
  • Build your project pnpm build
  • Create PR

Who uses jscpd

  • GitHub Super Linter is combination of multiple linters to install as a GitHub Action
  • Code-Inspector is a code analysis and technical debt management service.
  • Mega-Linter is a 100% open-source linters aggregator for CI (GitHub Action & other CI tools) or to run locally
  • Codacy automatically analyzes your source code and identifies issues as you go, helping you develop software more efficiently with fewer issues down the line.
  • Natural is a general natural language facility for nodejs. It offers a broad range of functionalities for natural language processing.
  • OpenClaw is a personal AI assistant that runs on your own devices, supporting 20+ messaging channels and multi-platform companion apps.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

ga tracker

Star History

Star History Chart

License

MIT © Andrey Kucherenko

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Jscpd

How do I install Jscpd?

Run git clone https://github.com/kucherenko/jscpd, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Jscpd safe to use with an AI agent?

Its trust score is 64 out of 100 (good). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Jscpd still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.