[{"data":1,"prerenderedAt":515},["ShallowReactive",2],{"navigation_docs":3,"-api-mcp-server":129,"-api-mcp-server-surround":512},[4,45,62,88,108],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"children":49,"icon":6},"CI & Hooks","\u002Fci-and-hooks","2.ci-and-hooks\u002F1.index",[50,52,57],{"title":46,"path":47,"stem":48,"icon":51},"i-lucide-git-pull-request",{"title":53,"path":54,"stem":55,"icon":56},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","2.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":58,"path":59,"stem":60,"icon":61},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","2.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":63,"path":64,"stem":65,"children":66,"icon":68},"Reporters","\u002Freporters","3.reporters\u002F1.index",[67,69,73,78,83],{"title":63,"path":64,"stem":65,"icon":68},"i-lucide-file-chart-column",{"title":70,"path":71,"stem":72,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","3.reporters\u002F2.html",{"title":74,"path":75,"stem":76,"icon":77},"JSON Reporter","\u002Freporters\u002Fjson","3.reporters\u002F3.json","i-lucide-braces",{"title":79,"path":80,"stem":81,"icon":82},"Badge Reporter","\u002Freporters\u002Fbadge","3.reporters\u002F4.badge","i-lucide-award",{"title":84,"path":85,"stem":86,"icon":87},"SARIF Reporter","\u002Freporters\u002Fsarif","3.reporters\u002F5.sarif","i-lucide-shield-check",{"title":89,"icon":6,"path":90,"stem":91,"children":92,"page":6},"Benchmarks","\u002Fbenchmarks","4.benchmarks",[93,98,103],{"title":94,"path":95,"stem":96,"icon":97},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","4.benchmarks\u002F1.detection-speed","i-lucide-zap",{"title":99,"path":100,"stem":101,"icon":102},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","4.benchmarks\u002F2.cross-format","i-lucide-layers",{"title":104,"path":105,"stem":106,"icon":107},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","4.benchmarks\u002F3.ai-token-efficiency","i-lucide-sparkles",{"title":109,"path":110,"stem":111,"children":112,"icon":114},"API","\u002Fapi","5.api\u002F1.index",[113,115,120,125],{"title":109,"path":110,"stem":111,"icon":114},"i-lucide-code",{"title":116,"path":117,"stem":118,"icon":119},"Rust Crates (v5)","\u002Fapi\u002Fcore","5.api\u002F2.core","i-lucide-box",{"title":121,"path":122,"stem":123,"icon":124},"Server API","\u002Fapi\u002Fserver","5.api\u002F3.server","i-lucide-server",{"title":126,"path":127,"stem":128,"icon":119},"MCP Server","\u002Fapi\u002Fmcp-server","5.api\u002F4.mcp-server",{"id":130,"title":126,"body":131,"description":503,"extension":504,"links":505,"meta":506,"navigation":507,"path":127,"seo":508,"stem":128,"__hash__":511},"docs\u002F5.api\u002F4.mcp-server.md",{"type":132,"value":133,"toc":490},"minimark",[134,139,155,159,231,245,248,251,354,358,364,370,375,400,405,408,413,416,421,424,428,432,435,443,447,470,474,486],[135,136,138],"h2",{"id":137},"overview","Overview",[140,141,142,146,147,154],"p",{},[143,144,145],"code",{},"jscpd-server"," implements the ",[148,149,153],"a",{"href":150,"rel":151},"https:\u002F\u002Fmodelcontextprotocol.io\u002F",[152],"nofollow","Model Context Protocol (MCP)",", allowing AI assistants like Claude Desktop, Cursor, and Copilot to detect code duplication directly from the editor — no CLI invocation needed.",[135,156,158],{"id":157},"starting-the-server","Starting the Server",[160,161,167],"pre",{"className":162,"code":163,"filename":164,"language":165,"meta":166,"style":166},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Install and start\nnpm install -g jscpd-server\njscpd-server \u002Fpath\u002Fto\u002Fproject\n\n# With custom port\njscpd-server \u002Fpath\u002Fto\u002Fproject --port 3000\n","Terminal","bash","",[143,168,169,178,195,203,210,216],{"__ignoreMap":166},[170,171,174],"span",{"class":172,"line":173},"line",1,[170,175,177],{"class":176},"sHwdD","# Install and start\n",[170,179,181,185,189,192],{"class":172,"line":180},2,[170,182,184],{"class":183},"sBMFI","npm",[170,186,188],{"class":187},"sfazB"," install",[170,190,191],{"class":187}," -g",[170,193,194],{"class":187}," jscpd-server\n",[170,196,198,200],{"class":172,"line":197},3,[170,199,145],{"class":183},[170,201,202],{"class":187}," \u002Fpath\u002Fto\u002Fproject\n",[170,204,206],{"class":172,"line":205},4,[170,207,209],{"emptyLinePlaceholder":208},true,"\n",[170,211,213],{"class":172,"line":212},5,[170,214,215],{"class":176},"# With custom port\n",[170,217,219,221,224,227],{"class":172,"line":218},6,[170,220,145],{"class":183},[170,222,223],{"class":187}," \u002Fpath\u002Fto\u002Fproject",[170,225,226],{"class":187}," --port",[170,228,230],{"class":229},"sbssI"," 3000\n",[232,233,234],"blockquote",{},[140,235,236,240,241,244],{},[237,238,239],"strong",{},"Note:"," The jscpd-server is still Node.js based. The CLI detection engine (",[143,242,243],{},"jscpd"," command) is Rust-based in v5, but the server uses the v4 engine.",[135,246,21],{"id":247},"configuration",[140,249,250],{},"Add to your MCP client config (e.g. Claude Desktop):",[160,252,256],{"className":253,"code":254,"language":255,"meta":166,"style":166},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"mcpServers\": {\n    \"jscpd\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http:\u002F\u002Flocalhost:3000\u002Fmcp\"\n    }\n  }\n}\n","json",[143,257,258,264,282,295,318,337,342,348],{"__ignoreMap":166},[170,259,260],{"class":172,"line":173},[170,261,263],{"class":262},"sMK4o","{\n",[170,265,266,269,273,276,279],{"class":172,"line":180},[170,267,268],{"class":262},"  \"",[170,270,272],{"class":271},"spNyl","mcpServers",[170,274,275],{"class":262},"\"",[170,277,278],{"class":262},":",[170,280,281],{"class":262}," {\n",[170,283,284,287,289,291,293],{"class":172,"line":197},[170,285,286],{"class":262},"    \"",[170,288,243],{"class":183},[170,290,275],{"class":262},[170,292,278],{"class":262},[170,294,281],{"class":262},[170,296,297,300,303,305,307,310,313,315],{"class":172,"line":205},[170,298,299],{"class":262},"      \"",[170,301,302],{"class":229},"type",[170,304,275],{"class":262},[170,306,278],{"class":262},[170,308,309],{"class":262}," \"",[170,311,312],{"class":187},"streamable-http",[170,314,275],{"class":262},[170,316,317],{"class":262},",\n",[170,319,320,322,325,327,329,331,334],{"class":172,"line":212},[170,321,299],{"class":262},[170,323,324],{"class":229},"url",[170,326,275],{"class":262},[170,328,278],{"class":262},[170,330,309],{"class":262},[170,332,333],{"class":187},"http:\u002F\u002Flocalhost:3000\u002Fmcp",[170,335,336],{"class":262},"\"\n",[170,338,339],{"class":172,"line":218},[170,340,341],{"class":262},"    }\n",[170,343,345],{"class":172,"line":344},7,[170,346,347],{"class":262},"  }\n",[170,349,351],{"class":172,"line":350},8,[170,352,353],{"class":262},"}\n",[135,355,357],{"id":356},"available-mcp-tools","Available MCP Tools",[359,360,362],"h3",{"id":361},"check_duplication",[143,363,361],{},[140,365,366,367,369],{},"Checks a provided code snippet for duplications against the codebase currently being served by ",[143,368,145],{},".",[140,371,372],{},[237,373,374],{},"Arguments:",[376,377,378,384,390],"ul",{},[379,380,381,383],"li",{},[143,382,143],{}," (string, required): The source code snippet to analyze",[379,385,386,389],{},[143,387,388],{},"format"," (string, required): The format of the code (e.g. \"javascript\", \"typescript\")",[379,391,392,395,396,399],{},[143,393,394],{},"recheck"," (boolean, optional): If ",[143,397,398],{},"true",", triggers a re-scan of the current directory before checking the snippet",[359,401,403],{"id":402},"get_statistics",[143,404,402],{},[140,406,407],{},"Retrieves the overall project duplication statistics.",[140,409,410,412],{},[237,411,374],{}," None",[140,414,415],{},"Returns total lines, sources, clones, and duplication percentage broken down by format.",[359,417,419],{"id":418},"check_current_directory",[143,420,418],{},[140,422,423],{},"Triggers a re-scan of the current working directory for duplications and returns the updated statistics.",[140,425,426,412],{},[237,427,374],{},[135,429,431],{"id":430},"resources","Resources",[140,433,434],{},"The server exposes the following resource:",[376,436,437],{},[379,438,439,442],{},[143,440,441],{},"jscpd:\u002F\u002Fstatistics",": Returns the current duplication statistics in JSON format",[135,444,446],{"id":445},"how-it-works","How It Works",[448,449,450,456,459,467],"ol",{},[379,451,452,453,455],{},"Start ",[143,454,145],{}," against your project directory — it scans and indexes the codebase",[379,457,458],{},"Your AI assistant connects to the MCP endpoint",[379,460,461,462,464,465],{},"When you ask your assistant to check for duplications, it calls ",[143,463,361],{}," or ",[143,466,402],{},[379,468,469],{},"Results are returned directly in the assistant's context — no manual CLI needed",[135,471,473],{"id":472},"tips","Tips",[376,475,476,483],{},[379,477,478,479,482],{},"Check ",[143,480,481],{},"\u002Fapi\u002Fhealth"," to verify the server has finished its initial scan",[379,484,485],{},"The server accepts request bodies up to 10MB",[487,488,489],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":166,"searchDepth":180,"depth":180,"links":491},[492,493,494,495,500,501,502],{"id":137,"depth":180,"text":138},{"id":157,"depth":180,"text":158},{"id":247,"depth":180,"text":21},{"id":356,"depth":180,"text":357,"children":496},[497,498,499],{"id":361,"depth":197,"text":361},{"id":402,"depth":197,"text":402},{"id":418,"depth":197,"text":418},{"id":430,"depth":180,"text":431},{"id":445,"depth":180,"text":446},{"id":472,"depth":180,"text":473},"Use jscpd-server as a Model Context Protocol (MCP) server for AI assistants.","md",null,{},{"icon":119},{"title":509,"description":510},"jscpd MCP Server","Integrate jscpd with AI assistants via Model Context Protocol (MCP).","F7bYWNLej7kXvLZWJ7hdAuM6urAFM1HOA4cnSuBTZq8",[513,505],{"title":121,"path":122,"stem":123,"description":514,"icon":124,"children":-1},"Use jscpd-server for remote duplication detection.",1782123770547]