RepoPilot

chromedevtools / chrome-devtools-mcp

Search chromedevtools/chrome-devtools-mcp

GitHub

Code

How chromedevtools/chrome-devtools-mcp is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely start-up file
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new DevTools data collection (new Collector)

  • Create collector class in src/collectors/ extending page inspection pattern used in PageCollector.ts
  • Implement async method calling Chrome DevTools Protocol methods via browser connection
  • Register collector tool in McpContext by adding to toolMap initialization
  • Create formatter in src/formatters/ to convert raw protocol data to structured JSON

Add a new CLI command or option

  • Define new CLI option schema in src/config/cli-options.ts or relevant options file
  • Add parsing logic in ConfigParser.ts to extract the option from argv
  • Update ServerConfig.ts TypeScript interface to include new option
  • Handle option in McpContext or BrowserManager initialization based on scope

Add performance analysis or metric extraction (new Processor)

  • Create processor class in src/processors/ implementing trace/snapshot analysis logic
  • Register processor as tool in McpContext, wiring browser data access
  • Create formatter in src/formatters/ to structure metric results for JSON response
  • Add tool dispatch case in ToolHandler.ts connecting tool invocation to processor

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.
  • Some entry points named in the manifest are build output or are missing from the file list, so their source is not shown.

Code quality and hotspots

Largest source files

  • Branch points1105 per file on average
  • Code issues26 errors, 4753 warnings
  • Largest file60,838 lines
  • Hotspot load10 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions8 workflows
  • Tests135 test filesJest/Vitest · 0.79 test files per source file (file count, not coverage)
  • Dependency updatesDependabot

Test folders: tests · tests/e2e · tests/fixtures

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.