SafetyCard Request a review

Chrome DevTools MCP

Chrome DevTools for coding agents (debug, inspect, automate browser)

github.com/ChromeDevTools/chrome-devtools-mcp · 2026-10-03 · b2f522c

Defense-in-depth score

2.7 / 10

Chrome DevTools MCP gives an agent a real Chrome browser with JavaScript execution, navigation (including local file: URLs) and input on by default, and it returns page content to the model unlabelled. Its own file writes are well confined to the temp directory or client roots, but a hijacked agent can still read local secrets through the browser, send data anywhere and act on any site signed into the persistent profile, with nothing in the server asking a human. The biggest structural problem is configuration integrity: security-relevant configuration is not integrity-protected in how it is sourced and applied.

Safest setup

Chrome DevTools MCP keeps its own file writes inside the temp directory or your client's roots, marks every powerful tool as not read-only for your host's approval prompt, and caps each call at 60 seconds. As shipped it gives the agent a persistent browser profile with JavaScript, local file navigation and unredacted headers on, so the safest setup narrows the accounts and tools, turns on the isolation and redaction options the server already has, and contains the browser.

SetupHowWhat it gives you
Test accounts onlySign the agent's browser into only the test or low-privilege accounts the task needsAny action the agent takes on a website reaches only those accounts, whatever the model asks for C1
An inspection-only tool set--javascriptEvaluation=false and --fileNavigations=false when the task doesn't need scripts or local pagesScripts stop running in pages and the navigation tools refuse file: URLs C3
Only the tool groups neededSet --categoryInput=false and the other category flags to false for tool groups the task doesn't use, leaving the off-by-default groups offThe model sees a smaller set of tools, with extensions, page-provided tools and WebMCP left out C3
A fresh profile per session--isolatedA temporary browser profile, deleted on close, so cookies and sign-ins don't carry across sessions C6
Header redaction--redactNetworkHeaders=trueHeaders the server treats as sensitive are redacted before network details reach the model C8
Chrome's renderer sandboxKeep the default launch arguments, with no --no-sandbox in --chromeArgModel-written JavaScript stays inside Chrome's sandboxed renderer, away from the server process C4
Its own container or VMRun the server and its Chrome in a container or VM that holds no SSH keys or cloud credentials, with network access limited to the sites the task needsAn outer boundary around the browser that keeps home-directory secrets out of reach and narrows where data can go C5
A tool-call log--logFile <path> with a path outside any project directoryA timestamped record of every tool call and its parameters C9

Approving with confidence

  • Read each prompt and approve calls one at a time; script, navigation, input and file-writing tools are the ones marked not read-only.
  • A form submission or click on a signed-in site can't be undone, so check the page and the target before approving it.

Handling data

  • The log holds full tool parameters; store it like other sensitive logs.
  • Usage statistics are on by default and content-free; --usageStatistics=false or CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS turns them off.

Key gaps (1)

  1. Worst case under prompt injection: default tools allow reading local files via file: URLs and unredacted headers, exfiltrating via scripted fetch, and irreversible actions on signed-in sites, with no server-side gate (C5-WORSTCASE). C5 · Untrusted input blast radius

Criteria

C1 Identity & least privilege

0.25 / 1.00

The server holds no API keys or tokens of its own and does not forward client tokens. By default it launches Chrome with a dedicated profile under ~/.cache/chrome-devtools-mcp rather than the user's everyday Chrome profile, which is the only real narrowing of authority. That profile is persistent and shared across every session and project, the Chrome process inherits the full environment, and the browser can open any local file the OS user can read. Configuration handling that affects the profile, executable and connection target is not integrity-protected.

C2 Approval gates

0.53 / 1.00

As a tool server, the host owns approval; this server's contribution is risk signalling. Every tool definition must declare readOnlyHint and the registration passes it to the client, and powerful tools (evaluate_script, navigation, input, file-writing tools) are marked not read-only. There is no destructiveHint, no preview or dry-run, and no server-enforced read-only mode or confirmation step. A wrongly approved call can submit forms or act on any site signed into the persistent profile, with no undo.

C3 Tool & action scoping

0.45 / 1.00

File paths handled by the server itself are validated well: canonical realpath containment against client roots or the OS temp directory, and writes opened with O_NOFOLLOW and mode 0600. URLs, however, are only checked against a small scheme denylist, evaluate_script accepts arbitrary JavaScript, and file: navigation is allowed by default, which lets the browser read files the path checks would have refused. The default tool set includes JavaScript execution, navigation and input; categories can be disabled but most are on.

C4 Code-execution isolation

0.25 / 1.00

Model-written JavaScript (evaluate_script, initScript, javascript: URLs) runs inside Chrome's page renderer rather than in the Node server, so the isolation comes from Chrome's own renderer sandbox, which this repo leaves enabled by default. That code still runs with the page's network access and the persistent profile's cookies. The sandbox is controlled by Chrome flags, and how launch options are sourced is not integrity-protected, which caps this criterion.

C5 Untrusted input blast radius

0.00 / 1.00

Page content (accessibility snapshots, console messages, network bodies, dialog text) is returned to the model as plain markdown-like text, in places right next to the server's own instructions, with no untrusted marker. Structured output exists but is experimental and off by default, and the project's security policy tells users to use trusted content or rely on the client. If a page hijacks the agent, the default tools let it read local files through file: URLs and read unredacted cookies and headers, send data anywhere with scripted fetches, and act on signed-in sites, all without the server asking anyone.

C6 Memory, context & configuration integrity

0.00 / 1.00

The server has no memory store. Configuration discovery and loading does not protect the integrity of security-relevant server options.

C7 Third-party extensions

0.07 / 1.00

By default the server loads no plugins, but it has several paths for running third-party code: installing unpacked Chrome extensions, executing tools a web page exposes, WebMCP tools, an ffmpeg binary, and any Chrome executable path. The extension and page-tool categories are off by default. Nothing is pinned or integrity-checked, and configuration that can set the executable or enable these categories is not integrity-protected. A substituted executable runs as the same user with the full environment.

C8 Secrets & sensitive-data protection

0.35 / 1.00

Usage telemetry is on by default but content-free: string parameters are reduced to length buckets and only tool names, latency and success are sent. Header redaction for network requests exists but is off by default, so cookies and Authorization headers go to the model provider in the default flow. The optional debug log records full tool parameters, and connection credentials are not reliably kept out of it. Because file: navigation is allowed, the model can also read long-lived keys such as SSH or cloud credentials from the user's home directory.

C9 Audit & traceability

0.28 / 1.00

The server keeps no record of what it did unless the operator passes --logFile or sets NODE_DEBUG. When enabled, each tool call is written as a timestamped line with its parameters, but there is no structured format, no record of results, no actor attribution, and no tamper protection. Telemetry sent to Google is aggregate and is not an audit trail.

C10 Limits & kill switch

0.55 / 1.00

Every tool call is serialised through one mutex and bounded by a hard-coded 60-second timeout that configuration and the model cannot raise. Output sizes are capped for network bodies, console messages and request lists. The timeout only stops waiting: the abandoned browser work keeps running, and the server ignores MCP cancellation. Closing stdin or sending a signal shuts the server down and closes the launched browser, with a 5-second forced exit.