Skip to content

Chrome DevTools MCP Server: What an Agent Gets

ILIA KARPENKO5 min read

Chrome DevTools MCP is a Model Context Protocol server from the Chrome DevTools team that gives an AI agent tools for driving and inspecting a live Chrome browser. Once it is connected, the agent can open a page, click through it, read the console, list network requests, record a performance trace, and take a text snapshot of the page, using the same instrumentation DevTools itself runs on.

That matters in testing because an agent without browser access reasons about a page from source code alone. Ask it why checkout fails on the second submit and it will read the handler, form a theory, and write a fix that compiles. With DevTools MCP attached it can load the page, submit the form twice, and read the failing response together with the console error that came with it. The gap between a plausible answer and a checked one is the whole value here.

What the server exposes

The package ships more than fifty tools grouped by category, with several groups switched off until you ask for them.

CategoryExample toolsWhat a tester uses it for
Input automationclick, fill, fill_form, hover, press_key, upload_file, handle_dialogWalking a flow the way a user would, including file uploads and native dialogs
Navigationnavigate_page, new_page, select_page, list_pages, wait_forMulti-tab flows, redirects, waiting on text instead of a fixed sleep
Debuggingtake_snapshot, list_console_messages, evaluate_script, take_screenshot, lighthouse_auditReading page state and errors without a screenshot round trip
Networklist_network_requests, get_network_requestConfirming which call failed and what the response actually contained
Performanceperformance_start_trace, performance_stop_trace, performance_analyze_insightTurning "the page feels slow" into a named insight with numbers behind it
Emulationemulate, resize_pageReproducing a bug that only shows up on a throttled connection or a narrow viewport
Memorytake_heapsnapshot, compare_heapsnapshots, get_heapsnapshot_retainersChasing a leak across a long session, which is close to untestable by hand

Two rows deserve a second look. take_snapshot returns a text representation built from the accessibility tree rather than an image, so the agent gets element references it can act on without a vision model in the loop. And the performance group has no equivalent in a normal automation framework: performance_analyze_insight reads a recorded trace and hands back the same insights the Performance panel shows a human.

Three further categories stay off unless you enable them: Chrome extensions, Progressive Web App install and launch, and third-party developer tools a page exposes about itself. The extension and PWA groups only work over a pipe connection, so they are unavailable when the server attaches to a Chrome that is already running.

Free and open sourceCasely writes these cases for youAttach a spec and one file of your team's existing test cases in Claude. Casely copies your columns, names the gaps it found in the spec, and exports a single Excel file your tracker imports in one pass.Read the install docs

Setting it up

  1. Check the prerequisites: a current Node.js LTS, npm, and a stable or newer Chrome on the machine.
  2. Add the server to your MCP client config.
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest"]
    }
  }
}
  1. Restart the client and ask for something that forces a real page load, such as checking the performance of a public URL. If the answer arrives without a browser window opening, the server is not attached.
  2. Decide how the browser runs. By default it launches headed against a dedicated profile under $HOME/.cache/chrome-devtools-mcp/chrome-profile, not your everyday one. --isolated swaps that for a temporary directory that is cleaned up on close, --headless drops the window, and --channel moves to canary, dev, or beta.
  3. Trim the tool list if the agent starts misfiring. --slim cuts down to basic browser control, and per-category flags such as --category-performance set to false remove whole groups from the schema the model has to read.

To point the server at a Chrome you already have running with remote debugging enabled, pass --browserUrl http://127.0.0.1:9222. That is the configuration for inspecting a session that is already in the broken state you care about, rather than trying to drive it back there.

Where it fits in a testing workflow

Three jobs suit it. Reproducing a bug report, where the agent walks the reported steps and reports what the network and console show instead of what the ticket claims. Verifying a fix in the browser rather than in the diff, which catches the class of fix that is correct in the handler and wrong once the page renders. And spot checks before a release: a Lighthouse pass, a trace on the slowest route, a heap comparison across a long session.

None of those produce a test artifact. The run is a conversation. When the session ends, nothing about it reruns tomorrow, which is the line between using this server and building a suite.

Where it fails

Chrome only. The project supports Google Chrome and Chrome for Testing. Other Chromium builds may work and are not guaranteed, and Firefox and WebKit are out of scope entirely. Cross-browser bugs stay outside what this server can see.

No regression artifact. Nothing the agent does becomes a spec file that CI can run. Treat it as a debugging instrument, not an automation framework.

It hands the browser to the model. The project states this plainly: the server exposes the content of the browser instance to MCP clients, which can inspect, debug, and modify any data. Attaching it to a browser logged into a production admin panel gives the model whatever is on screen. Anything with real credentials belongs behind --isolated and a throwaway profile.

Telemetry is on by default. Usage statistics go to Google unless you pass --no-usage-statistics, and the performance tools may call the Google CrUX API, which --no-performance-crux disables. Both matter when the URL under test is an unreleased internal host.

The path through the page is not stable. The agent picks which tool to call. The same prompt on Tuesday takes a different route through the flow than it did on Monday. That is acceptable for exploration and disqualifying for a release gate.

Large pages cost context. A full snapshot of a heavy DOM is a lot of tokens, and a long debugging session can exhaust the window before it reaches a conclusion. Narrow the page and the tool categories before blaming the model.

What is worth automating

Reproduction and exploratory debugging are the parts to hand over. An agent that can open the page, read the failing request, and check the console closes the loop faster than a human switching between a ticket and DevTools, and it does it without getting bored on the fifth repetition.

What stays yours is everything upstream and downstream: deciding which scenarios matter, keeping the cases that describe them, and holding a suite that runs the same way every time. An agent with browser access is very good at answering what happened on this page right now. It has no opinion about which pages deserve a test at all, and that judgment is still where most regression escapes start.

Open sourceThe skill lives on GitHubMIT licensed, no account, nothing to install on your machine. Star it if it saves you an afternoon.View the repository