CH
OfficialWeb Scraping

Chrome DevTools MCP Server for AI Debugging

Enable AI coding assistants to debug web pages directly in Chrome with an MCP server for real-time runtime insights and powerful debugging capabilities.

Quick Install
npx -y @ChromeDevTools/chrome-devtools-mcp

Overview

Chrome DevTools MCP is a Model Context Protocol (MCP) server that connects AI coding assistants to a live Chrome instance via Chrome DevTools. It exposes DevTools capabilities—network inspection, console and stack traces, performance tracing, screenshots, DOM inspection and automated Puppeteer actions—to MCP clients so agents can reason over and act on real browser state in real time.

This server is intended for developer-facing automation and debugging workflows: let an AI assistant reproduce, diagnose, and fix client-side problems by directly observing network traffic, runtime errors (with source-mapped stacks), and performance traces. It is built to be used alongside MCP-aware tools and agent platforms and supports reliable automation through Puppeteer-based automation primitives.

Features

  • Real-time access to Chrome DevTools (Inspector, Network, Console, Performance, DOM)
  • Automated browser control via Puppeteer with built-in waiting and action helpers
  • Record and analyze performance traces; optionally enrich lab data with CrUX field data
  • Capture screenshots and heap snapshots
  • Source-mapped console stack traces and error inspection
  • Configurable “slim” mode for minimal functionality and smaller footprint
  • Opt-in/opt-out telemetry and update checks for deployments

Requirements

  • Node.js v20.19 or newer (latest maintenance LTS recommended)
  • Google Chrome (Stable) or Chrome for Testing current stable or newer
  • npm (for installation/running via npx)
  • Note: Other Chromium builds may work but are not officially supported

Installation / Configuration

Run the MCP server with npx (recommended for MCP clients):

npx -y chrome-devtools-mcp@latest

Basic MCP mcpServers JSON snippet for an MCP client:

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest"]
    }
  }
}

Common flags and environment variables

# Slim mode (fewer tools, smaller runtime)
npx -y chrome-devtools-mcp@latest --slim --headless

# Connect to an already-running Chrome (useful for integrated environments)
npx -y chrome-devtools-mcp@latest --browser-url=http://127.0.0.1:9222

# Disable usage statistics (also controlled by env)
npx -y chrome-devtools-mcp@latest --no-usage-statistics

# Disable CrUX lookups for performance tools
npx -y chrome-devtools-mcp@latest --no-performance-crux

Environment variables

  • CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=1 — disable telemetry
  • CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1 — skip periodic npm update checks
  • CI=1 — also disables usage stats in CI environments

Available Tools / Resources

The MCP server exposes several high-level tool capabilities (each backed by DevTools protocol + Puppeteer helpers):

  • Performance tracing and trace analysis (lab traces + optional CrUX)
  • Network inspector (request/response bodies, timings)
  • Console and exception viewers (with source maps)
  • DOM/Elements inspection and manipulation
  • Screenshots and visual diffs
  • Puppeteer automation actions (click, type, navigation, waits)

Resources

  • GitHub repository: https://github.com/ChromeDevTools/chrome-devtools-mcp
  • Local tool reference & docs (included in repo): tool-reference, slim-tool-reference, troubleshooting, design-principles

Use Cases

  1. Debug a failing production bug interactively

    • An AI assistant inspects console errors, navigates to the failing page, collects network traces, and locates the source-mapped error origin. It can then attempt a hotfix by patching JS on the page or produce a reproducible Puppeteer script.
  2. Automated regression triage

    • Run a test page under the MCP server, record a performance trace, and have an agent summarize the top CPU/long task sources and render-blocking resources. Optionally include CrUX field metrics for a holistic view.
  3. Web-scraping robustness checks

    • Use Puppeteer actions exposed by the server to reproduce a scraping workflow, detect intermittent network failures or redirects, and log detailed request/response bodies for troubleshooting.
  4. Visual and functional validation

    • Capture screenshots before/after a change, inspect the computed styles and layout metrics, and automatically compare results to detect regressions.

Security & Privacy Notes

  • The server exposes the full content of the connected browser to MCP clients. Do not run it against browser instances that contain sensitive personal data unless you trust the MCP client.
  • Performance tools may query CrUX (field data). Disable with –no-performance-crux if you prefer no external lookups.
  • Usage statistics are enabled by default; opt out via flag or environment variable as needed.

Tips

  • Use –slim for lightweight, non-performance workflows.
  • For integration with agent platforms that already run Chrome, pass –browser-url so the MCP server attaches to the existing debug endpoint instead of launching a new browser.
  • Keep Node and Chrome versions up to date for best compatibility and security.

For full API details, examples, and design rationale, see the repository readme and tool reference in the linked GitHub project.