How chromedevtools/chrome-devtools-mcp works
Chrome DevTools MCP is an MCP server and standalone CLI that lets an agent or terminal user automate and inspect a live Chrome browser. The main workflow is a client tool request, server dispatch and context acquisition, then browser interaction and a formatted result; the CLI is a separate entry point. The product also includes performance tracing, debugging, configuration, and usage telemetry. Edges are limited to relationships documented in the README or visible in the supplied source index and excerpts; several feature-module links are documented at the capability level rather than verified call paths.
Main entry points: index.ts MCP server · ToolHandler.ts Tool handler · ToolDefinition.ts Tool definitions · McpContext.ts Browser context
Components 20
Entry points
- MCP server
src/index.ts - Browser CLI
src/bin/chrome-devtools.ts
Server runtime
- Tool handler
src/ToolHandler.ts - Browser context
src/McpContext.ts - Tool definitions
src/tools/ToolDefinition.ts - Result formatting
src/McpResponse.ts
Browser capabilities
- Browser manager
src/BrowserManager.ts - Page automation
src/McpPage.ts - Debug tools
src/tools/console.ts - Network tools
src/tools/network.ts - Screenshots
src/tools/screenshot.ts - Performance analysis
src/processors/PerformanceTrace.ts - Page and worker logs
src/collectors/PageCollector.ts - Heap snapshots
src/processors/HeapSnapshotManager.ts
Configuration and telemetry
- Config parser
src/config/ConfigParser.ts - Server configuration
src/config/ServerConfig.ts - Usage telemetry
src/telemetry/ClearcutLogger.ts
Other components
- MCP client
- CLI user
- Chrome
Connections 19
- MCP client → MCP server: sends tool requests
- CLI user → Browser CLI: runs commands
- MCP server → Tool handler: dispatches tools
src/index.ts - Tool handler → Browser context: gets context
src/ToolHandler.ts - Tool handler → Tool definitions: handles definitions
src/ToolHandler.ts - Tool handler → Result formatting: handles response
src/ToolHandler.ts - MCP server → Browser manager: configures browser
src/index.ts - Browser manager → Chrome: launches or connects
- Tool definitions → Page automation: uses page APIs
src/tools/ToolDefinition.ts - Tool definitions → Heap snapshots: uses heap manager
src/tools/ToolDefinition.ts - Tool definitions → Performance analysis: uses trace processor
src/tools/ToolDefinition.ts - Browser context → Page and worker logs: uses collectors
src/McpContext.ts - MCP client → Debug tools: requests debugging
- MCP client → Network tools: requests network inspection
- MCP client → Screenshots: requests screenshots
- MCP client → Performance analysis: requests performance analysis
- MCP server → Config parser: parses configuration
src/index.ts - Config parser → Server configuration: builds configuration
src/config/ConfigParser.ts - MCP server → Usage telemetry: initializes telemetry
src/index.ts