Full Byte Developer.

When to use Chrome DevTools MCP

Use chrome-devtools-mcp when an agent must drive a live Chrome for traces, network, console and screenshots.

Published here · 2 sources

A coding agent that only edits files cannot see what Chrome paints. The Chrome team describes that gap as programming with a blindfold on [2]. chrome-devtools-mcp exposes a live Chrome to MCP clients for traces, network, console and screenshots. Use it when the bug is in the browser, not in the repo tree [1] [2].

Install from the official docs

Requirements from the README: Node.js LTS, Chrome current stable or newer, and npm [1]. Add this config to your MCP client [1] [2]:

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

To opt out of usage statistics (enabled by default) [1]:

mcp client config with opt-out
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"]
    }
  }
}

You can also set CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI. Collection is disabled when those env vars are set [1]. Connecting to the server alone does not start Chrome; the browser starts when a tool needs a running instance [1].

A first prompt the Chrome blog suggests: ask the agent to check LCP on a live page (the blog uses web.dev; the README uses developers.chrome.com) [1] [2]. You should see the client open Chrome and record a performance trace [1].

What browser automation gives an agent

Key capabilities listed on the README and Chrome blog [1] [2]:

  • Performance insights from Chrome DevTools traces
  • Network analysis (for example CORS failures)
  • Screenshots and console messages (with source-mapped stacks)
  • Puppeteer automation that waits for action results
  • Live DOM and CSS inspection for layout bugs
JobPrefer chrome-devtools-mcp whenPrefer something else when
UI bugScreenshot or DOM shows the broken layoutPure logic with no browser surface
NetworkAgent must read request status and headersYou already have a failing unit test
ConsoleRuntime error only appears in the pageTypechecker already catches it
PerformanceYou need a real DevTools / CrUX-backed traceSynthetic bench outside Chrome is enough
Form flowAgent must click, type and observe stateAPI-level test covers the contract

Reach for this server when the agent must prove a layout, a request, a console error or a performance claim against a running page [1] [2]. Screenshots and live DOM beat guessing from source alone when CSS, hydration or third-party scripts change what the user sees [2].

When not to use it

Skip or fence this server when:

  • CI already has a headless browser runner (Playwright, Puppeteer, Cypress) and the failure is a deterministic test, not an exploratory DevTools session.
  • The page holds secrets: production admin, banking, personal mail or logged-in customer data. The README warns that browser content is exposed to MCP clients; do not share sensitive or personal information you do not want the client to see [1].
  • You need a browser other than Google Chrome or Chrome for Testing. Official support is those two only; other Chromium browsers may work but are not guaranteed [1].
  • You cannot accept default telemetry. Opt out with --no-usage-statistics or the env vars above; pass --no-performance-crux if you do not want performance tools calling the CrUX API; set CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS to quiet npm update checks [1].

Use a throwaway Chrome profile for agent sessions. Close the browser when the investigation ends.

Decision checklist

  1. Is the failure visible only in a running page? If no, fix it with unit or API tests first.
  2. Do you need DevTools-grade evidence (trace, network, console, screenshot)? If yes, install the MCP server [1].
  3. Is the profile free of secrets? If no, switch profile or stop [1].
  4. Did you opt out of usage stats and CrUX when policy requires it? [1]

Related: Design an agent control loop that stays simple, What is an AI agent?, Constrain AI coding agent scope.

Your next session should open a throwaway Chrome profile, reproduce one UI bug through the MCP tools, then close the browser.

Send this to the teammate who pastes "it looks fine locally" without a network or console capture.

Keep this guide

By Full Byte Developer

Filed under MCP, AI agents, Dev tools

Questions about this guide

What is chrome-devtools-mcp?

An MCP server and CLI from ChromeDevTools that lets coding agents control and inspect a live Chrome browser with DevTools: performance traces, network, screenshots, console messages and Puppeteer automation.

Which browsers are supported?

The README says it officially supports Google Chrome and Chrome for Testing only. Other Chromium browsers may work but are not guaranteed.

Does it send usage data?

Usage statistics collection is enabled by default. Opt out with --no-usage-statistics, or set CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI. Performance tools may also call the CrUX API unless you pass --no-performance-crux.

What is the privacy warning?

The README says the MCP client can inspect, debug and modify data in the browser. Avoid sharing sensitive or personal information you do not want the client to see.

Sources

Next in this stack