ChromeDevTools/chrome-devtools-mcp
Chrome DevTools for coding agents
TypeScript★ 50,722+148 that day#5 on trending
0.8%duplicated code · 180 of 22,589 lines
16clones in code
129code files of 265 scanned
9.5%duplicated over all files · 391 clones
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: src/config/cli-options.ts.
Largest clones in the code
- 13 lines in 4 placestypescript61 tokenssrc/tools/memory.ts:187–199src/tools/memory.ts:292–304src/tools/memory.ts:341–355src/tools/memory.ts:446–458
187 'Loads a memory heapsnapshot and returns retainers for a specific node ID.', 188annotations: { 189 category: ToolCategory.MEMORY, 190 readOnlyHint: true, 191 conditions: ['memoryDebugging'], 192}, 193blockedByDialog: false, 194verifyFilesSchema: { 195 filePath: true, 196},First 10 of 13 lines.
- 6 lines in 4 placestypescript51 tokenssrc/tools/memory.ts:199–204src/tools/memory.ts:315–320src/tools/memory.ts:427–432src/tools/memory.ts:510–515
199 nodeId: zod.number().describe('The node ID to get retainers for.'), 200 pageIdx: zod.number().optional().describe('The page index for pagination.'), 201 pageSize: zod.number().optional().describe('The page size for pagination.'), 202}, 203handler: async (request, response, context) => { 204 const retainers = await context.getHeapSnapshotRetainers(315 .describe('Whether to exclude primitive target nodes. Default is true.'), 316 pageIdx: zod.number().optional().describe('The page index for pagination.'), 317 pageSize: zod.number().optional().describe('The page size for pagination.'), 318}, 319handler: async (request, response, context) => { 320 const edges = await context.getHeapSnapshotEdges( - 26 lines in 2 placestypescript67 tokensscripts/eval_scenarios/lighthouse_a11y_test.ts:12–37scripts/eval_scenarios/lighthouse_best_practices_test.ts:12–37
12prompt: 'Check a11y issues on the page at <TEST_URL>', 13maxTurns: 3, 14htmlRoute: { 15 path: '/lighthouse_test.html', 16 htmlContent: ` 17 <!DOCTYPE html> 18 <html> 19 <head> 20 <title>Lighthouse Audit Test</title> 21 </head>First 10 of 26 lines.
7 more
- 14 lines in 2 placestypescript66 tokens
- 10 lines in 2 placestypescript65 tokens
- 9 lines in 2 placestypescript63 tokens
- 14 lines in 2 placestypescript61 tokens
- 10 lines in 2 placestypescript59 tokens
- 9 lines in 2 placestypescript59 tokens
- 8 lines in 2 placestypescript58 tokens
Largest clones over all files, tests and data included
- 24 lines in 5 placestypescripttests127 tokenstests/tools/console.test.ts:507–530tests/tools/console.test.ts:536–559tests/tools/console.test.ts:565–588tests/tools/console.test.ts:594–617tests/tools/console.test.ts:623–646
507 `); 508}); 509server.addHtmlRoute( 510 '/index.html', 511 `<script src="${server.getRoute('/main.min.js')}"></script>`, 512); 513 514await withMcpContext(async (response, context) => { 515 const page = context.getSelectedMcpPage(); 516 await page.pptrPage.goto(server.getRoute('/index.html'));First 10 of 24 lines.
- 14 lines in 8 placestypescripttests66 tokenstests/tools/memory.test.ts:69–82tests/tools/memory.test.ts:116–128tests/tools/memory.test.ts:138–150tests/tools/memory.test.ts:193–206tests/tools/memory.test.ts:366–378and 3 more
69 {params: {filePath}}, 70 response, 71 context, 72); 73 74// Call handle to trigger formatting (similar to network tests) 75const responseData = await response.handle(context); 76const output = responseData.content 77 .map(c => (c.type === 'text' ? c.text : '')) 78 .join('\n');116 {params: {filePath, filterName: 'objectsRetainedByContexts'}}, 117 response, 118 context, 119); 120 121const responseData = await response.handle(context); 122const output = responseData.content 123 .map(c => (c.type === 'text' ? c.text : '')) 124 .join('\n'); 125First 10 of 14 lines, the second copy on the right.
- 10 lines in 10 placestypescripttests51 tokenstests/tools/memory.test.ts:99–108tests/tools/memory.test.ts:121–130tests/tools/memory.test.ts:143–152tests/tools/memory.test.ts:371–380tests/tools/memory.test.ts:421–430and 5 more
99 const responseData = await response.handle(context); 100 const output = responseData.content 101 .map(c => (c.type === 'text' ? c.text : '')) 102 .join('\n'); 103 104 t.assert.snapshot(output); 105 }); 106}); 107 108it('with objectsRetainedByContexts filterName', async t => {121 const responseData = await response.handle(context); 122 const output = responseData.content 123 .map(c => (c.type === 'text' ? c.text : '')) 124 .join('\n'); 125 126 t.assert.snapshot(output); 127 }); 128}); 129 130it('with sharedNativeContext filterName', async t => { - 13 lines in 10 placestypescripttests50 tokens
- 13 lines in 8 placestypescripttests51 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 112 | 20,784 | 16 | 180 | 0.87% |
| javascript | 7 | 987 | 0 | 0 | 0% |
| bash | 9 | 644 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 182 | 46,023 | 370 | 5,063 | 11% |
| markdown | 29 | 4,728 | 13 | 83 | 1.76% |
| yaml | 16 | 666 | 8 | 122 | 18.32% |
| json | 12 | 1,919 | 0 | 0 | 0% |
| javascript | 10 | 1,147 | 0 | 0 | 0% |
| bash | 15 | 808 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 3, 2026 | #5 | 50,722 (+148) | 265 | 55,465 | 391 | 9.5% | 0.8% | — | b2007ab |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.