Chrome DevTools MCP for agents: we tested it and here's how it handles dialogs and console ✅ yoDEV Tested

Chrome DevTools MCP 1.12 alerts your AI agent when the page opens a JavaScript alert and preserves the console when changing routes. We tested it with real Chrome.

:white_check_mark: yoDEV Tested · November 3, 2026
chrome-devtools-mcp 1.12.0 with Chrome for Testing 153 headless on Linux, and the DevTools menu on Chrome 156 on macOS. The results we report as ours come from that test.

Google’s post “New in DevTools: November 2026”, published on October 20, opens with a section called DevTools for Agents. Despite the name, almost nothing is new DevTools interface: these are changes in chrome-devtools-mcp, the open-source MCP server that lets Claude Code, Gemini CLI, Copilot, Cursor, and other agents control and inspect a real Chrome. The only new thing within DevTools is a menu entry.

What is Chrome DevTools MCP?

Chrome DevTools MCP is a Model Context Protocol server, maintained by the Chrome DevTools team, that gives an AI agent the same tools a front-end developer uses by hand: navigate, click, fill forms, read the console and network log, take snapshots and screenshots, record performance traces, and run Lighthouse. Under the hood it uses Puppeteer to control the browser. Your agent launches it locally with npx, and the server starts and controls its own Chrome instance.

In the version we tested (1.12.0, released on npm on October 22), the server exposes 32 tools, including click, fill_form, handle_dialog, list_console_messages, get_css_styles, list_network_requests, performance_start_trace, lighthouse_audit, and take_heapsnapshot.

We covered it for the first time when it launched as public preview in 2025: Give your AI eyes: Introducing Chrome DevTools MCP.

What changed for agents in Chrome 155 and 156?

The Chrome blog lists six updates under DevTools for Agents:

  • Dialog handling: JavaScript dialogs that open during an input action are handled automatically.
  • Persistent console: the history of console messages is preserved across navigations within the same document.
  • CSS inspection: a new tool, get_css_styles, returns computed styles and applicable rules, with pagination.
  • Config file and path control: a file for server flags and custom filesystem roots.
  • Chunked traces: large performance recordings are processed in chunks, with a 1.2 GB trace buffer by default.
  • Settings menu: a Get Chrome DevTools for agents entry in the main DevTools menu.

Chrome 155 and 156 are on the stable channel, not just Canary or Beta. The server is published to npm on its own schedule, so you get server changes by updating the package, not updating Chrome.

How did we test it?

We ran chrome-devtools-mcp@1.12.0 on Linux with Node 22 against Chrome for Testing 153 in headless mode, using the official MCP TypeScript SDK as a client, the same protocol that Claude Code speaks. The test page had buttons that open an alert, a confirm, and a prompt, and another that calls history.pushState. We checked the menu entry separately on Chrome 156.0.8078.80 on macOS.

What happens when the page opens a JavaScript alert, confirm, or prompt?

The server detects the dialog and returns control to the agent immediately, but doesn’t accept or close it on its own. “Handled automatically” means that, and it’s the right call.

When our agent clicked the alert button, the click call responded in about 100 ms with:

The element was clicked and it opened a dialog.
# Open dialog
alert: hello from the page.
Call handle_dialog to handle it before continuing.

Until the agent responds, any other action fails with Error: A dialog is open. The agent then calls handle_dialog with action: "accept" or "dismiss", and can pass promptText to respond to a prompt(). In our test, accepting a prompt with the text “Greg” and dismissing a confirm left prompt=Greg and confirm=false in the console, as expected.

Why it matters: the changelog for version 1.7.0 fixed a 180-second timeout when a dialog opened during an action. Before, an unexpected alert() could freeze the agent for three minutes. Now it sees it in the same response and decides what to do, which is exactly what you want when the dialog is a “Delete this?”.

Does the agent preserve Chrome’s console when navigating?

Yes for navigations within the page, and yes on request for full page loads.

  • Navigation within the same document (a #hash change or history.pushState, which is how most SPA routers change pages): list_console_messages kept returning all previous messages. Nothing was lost.
  • Full navigation to a different URL: the list by default starts fresh with the new page. With includePreservedMessages: true it returns messages from the last three navigations, with message IDs in sequence. The --maxNavigationSaved flag changes that window, from 1 to 25.

For debugging an app in React or Vue, this means an error logged on the previous route is still there when the agent goes to fetch it.

What does get_css_styles return?

It returns the CSS rules that apply to an element, in cascade order and with their location in the stylesheet. You pass it the uid of the element you get from take_snapshot. In our test, for a button with a class rule and another inside a media query, it returned the @media (min-width: 100px) block first, then the .btn rule with index:1 as location, and then the browser stylesheet with overridden properties marked as [overloaded]. Results come in pages of 10 rules by default (pageSize, pageIdx), which prevents a large stylesheet from filling the agent’s context.

How does the new config file work?

You can now put server options in a JSON file instead of a long list of arguments. The server looks, in this order: for a file indicated with --config, then cd4a.config.json in $PLUGIN_DATA when running as a plugin for an agent, and then a global file:

macOS and Linux: ~/.config/cd4a/config.json
Windows:       %LOCALAPPDATA%/Google/cd4a/config.json

It uses only the first one it finds (doesn’t merge files) and command-line flags take priority over the file. Option names go in camelCase.

We tested the global file with:

{
  "headless": true,
  "isolated": true,
  "viewport": "800x600",
  "usageStatistics": false
}

With none of those options on the command line, the page reported an 800×600 window and a headless browser, so the file applied. The documentation warns that neither the file nor its folder should be writable by the agent; otherwise the agent could rewrite its own permissions.

What errors will you run into using it?

There are two behavior changes worth knowing before you plug it into your scripts.

All tools now ask for a pageId. Page ID routing comes on by default (--pageIdRouting). Our first run failed on every call with pageId: Invalid input: expected number. Agents like Claude Code read the tool schema and figure it out on their own, but if you use the server directly from a script, call list_pages first and pass the ID.

File access is limited to the temp folder if your client doesn’t support MCP roots. On startup, the server warned that the client “did not negotiate the MCP roots capability” and that tools that read or write local files are restricted to the system’s temp folder. This affects, for example, saving screenshots, traces, and heap snapshots to your project. The solution is to allow specific folders with --filesystemRoot (can be repeated) or, only with a trusted local client, --allowUnrestrictedPaths. Google’s blog says the separate chrome-devtools CLI activates unrestricted paths by default; the MCP server documentation indicates false as the default value, which is what we saw.

Can the agent measure your page’s LCP?

Yes, with a single call. performance_start_trace with reload: true and autoStop: true reloaded our page, stopped itself after about six seconds, and returned the LCP (Largest Contentful Paint: 440 ms, split into 7 ms TTFB and 433 ms rendering delay), the CLS, and a list of insights that the agent can explore in detail. Chunked processing happens internally and isn’t visible from outside: with a small test page we can’t verify the 1.2 GB buffer or the chunking, so that’s Google’s description.

By default, trace URLs are sent to Google’s CrUX API to fetch real user data. Disable it with --no-performance-crux if you’re testing internal URLs.

What does “Get Chrome DevTools for agents” do?

On Chrome 156, the entry is in the DevTools three-dot menu. Clicking it opens the project repository on GitHub. It’s a shortcut to the installation instructions, not an installer within DevTools.

How to install Chrome DevTools MCP on Claude Code, Gemini CLI, and VS Code?

You need current LTS Node.js, npm, and stable Chrome or newer.

Claude Code:

/plugin marketplace add ChromeDevTools/chrome-devtools-mcp
/plugin install chrome-devtools-mcp@chrome-devtools-plugins

Gemini CLI:

gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcp

Copilot on VS Code: run “Chat: Install Plugin From Source” and enter ChromeDevTools/chrome-devtools-mcp.

Any other MCP client (Cursor, Codex, and others), with the standard config block:

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

Useful flags to add: --isolated for a temporary profile that gets deleted when you close the browser, --headless to not open a window, --slim for a reduced set of three tools (navigation, script execution, and screenshots), and --no-usage-statistics to not send usage data.

A warning from the project itself: the server exposes your browser’s content to the MCP client. Don’t point it at sessions with data you wouldn’t share with your agent, and prefer --isolated over your everyday profile.

Chrome DevTools MCP or Playwright MCP?

If your job is to debug and measure an app on Chrome, Chrome DevTools MCP; if you need Firefox or WebKit, Playwright MCP. According to its README, Playwright MCP (from Microsoft) supports Chromium, Firefox, and WebKit, works on the accessibility tree and also has tools for dialogs (browser_handle_dialog) and console (browser_console_messages); traces are optional with --caps=devtools and doesn’t mention Lighthouse or performance analysis. Chrome DevTools MCP officially supports Google Chrome and Chrome for Testing only, but brings what comes from DevTools: performance insights with LCP, lighthouse_audit, heap snapshots, and now get_css_styles. We didn’t test Playwright MCP for this note.

Is it worth updating?

Yes. The changes in dialogs and console fix two real situations where an agent got stuck or blind while testing a web app, and both behaved as Google describes in our test. The config file makes setup reproducible across your team. Just keep in mind the mandatory pageId and the temp folder restriction before integrating it into your scripts.

At the time of publishing this note, the number of tools (32), the default values, and the menu behavior correspond to version 1.12.0 and Chrome 156; the project releases frequently, so check the changelog before relying on a specific default value.


What about you? What’s the first thing you’d ask your agent to check in the browser: a console error, a network request, or performance?

What MCP server does your agent use to control the browser?
  • Chrome DevTools MCP
  • Playwright MCP
  • Still none
  • I prefer another option (tell us which)
0 votantes

Comment below or, if this article reached you by email, reply directly to the email: your reply gets published here.

Related: BrowserSkill: how to give Claude Code your real browser with the session already logged in