Chrome DevTools for agents
Unofficial low-memory fork
This fork targets roughly 200 MiB for all MCP service processes combined
during ordinary automation. Chrome and the coding agents themselves are
excluded. Clients connect directly to one shared HTTP MCP process, without
per-pane stdio processes. This is a measurement target, not an enforced limit
or a guarantee for arbitrary pages and traces.
Representative macOS ARM64 measurements with eight clients, two fixture
pages, 250 requests and 1,000 console messages per page:
| Architecture | After every client snapshots both pages | After 65 seconds idle |
|---|
| Shared daemon, eight stdio frontends, normal collection | 595.6 MiB | 584.1 MiB |
| Direct HTTP, low-memory collection | 201.2 MiB | 127.4 MiB |
The direct-HTTP process's lifetime peak was 210.9 MiB. These are separate
isolated synthetic runs; real sites and allocator timing vary. Raw reports:
comparison and
final HTTP run.
Build from this repository with npm run sync and npm run build.
Start the service once with
node build/src/bin/chrome-devtools-mcp-http.js <browser connection flags>.
This launcher enables --lowMemory, disables usage statistics, and exits
after printing the HTTP URL and private bearer-token file path. Configure
each MCP client with that URL and a bearer token read from the printed file.
The default endpoint is http://127.0.0.1:9335/mcp.
HTTP uses stateful, initialize-based Streamable HTTP sessions. SDK clients
using automatic negotiation can fall back to this protocol; clients pinned
to a modern discover-only protocol are not supported by this entry point.
The service binds only to loopback, requires its private token, rejects
browser origins and unexpected Host headers, and limits request bodies to
1 MiB. Token contents never appear in startup output or memory reports.
Tokens persist across reboots in
$XDG_STATE_HOME/chrome-devtools-mcp/<session>/http-token, defaulting to
~/.local/state/chrome-devtools-mcp/<session>/http-token.
For clients that only support stdio, the alternative entry point is
node build/src/bin/chrome-devtools-mcp-shared.js with the same connection
flags. Each such client adds its own frontend process, which counts against
the combined target. Existing chrome-devtools-mcp and chrome-devtools
entry points remain available. Choose HTTP to avoid this per-client cost.
- Shared low-memory daemons attached with
browserUrl or wsEndpoint
disconnect from Chrome after 15 minutes without a queued or running tool
call. Chrome stays running; the next browser call reconnects. Re-list pages
after reconnection because page IDs and snapshots can change. Traces,
screencasts, dialogs and isolated contexts prevent idle disconnect.
Requesting emulation, logpoints or WebAuthn disables idle disconnect for
that daemon lifetime to preserve state. This releases debugger attachment
so a tab-discard extension can make its own independent safety decision.
- Page discovery does not initialize the selected page until a tool uses it.
Enabling WebMCP or third-party tool discovery requires initialization.
- Each initialized page retains one navigation, 100 network requests and
200 console entries. Entries expire after 60 seconds and idle caches are
swept every 30 seconds. Issue aggregation has a separate bounded cache.
- Source maps are disabled in low-memory mode, including after config reload.
- Calls are serialized across clients. Selected pages, filesystem roots and
accessibility snapshots are restored per client. At most 16 clients and
two snapshots per client are retained; idle client state expires after
ten minutes, with a one-minute sweep. After eviction, take a fresh snapshot.
- HTTP sessions are also capped at 16. At capacity, an inactive session idle
for over a minute can be replaced; other idle sessions expire after ten
minutes. Reinitialize the HTTP connection after session expiry. Clients
should send DELETE when ending their HTTP session.
Clients still share the same browser, cookies and live page state. Navigating
or closing a shared page affects every client using it. This is not a browser
or security isolation boundary. Long recordings, large snapshots, retained
debugger state and many initialized pages can exceed the memory target.