# When to use Chrome DevTools MCP

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

Source: https://fullbytedeveloper.com/blog/chrome-devtools-mcp-when-to-use
Published here: 2026-11-26

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]:

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

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

```json title="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

| Job | Prefer chrome-devtools-mcp when | Prefer something else when |
| --- | --- | --- |
| UI bug | Screenshot or DOM shows the broken layout | Pure logic with no browser surface |
| Network | Agent must read request status and headers | You already have a failing unit test |
| Console | Runtime error only appears in the page | Typechecker already catches it |
| Performance | You need a real DevTools / CrUX-backed trace | Synthetic bench outside Chrome is enough |
| Form flow | Agent must click, type and observe state | API-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](/blog/design-an-agent-control-loop), [What is an AI agent?](/blog/what-is-an-ai-agent), [Constrain AI coding agent scope](/blog/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.

## Sources

1. [ChromeDevTools/chrome-devtools-mcp README](https://github.com/ChromeDevTools/chrome-devtools-mcp)
2. [Chrome for Developers: Chrome DevTools (MCP) for your AI agent (2025-09-23)](https://developer.chrome.com/blog/chrome-devtools-mcp)
