chrome-devtools-mcp-mux
This server is a multiplexer for chrome-devtools-mcp, allowing multiple MCP clients to share a single Chrome instance while maintaining isolated tab ownership per client (shared cookies/logins/extensions, no cross-client interference).
Page & Tab Management
list_pages,new_page,close_page,select_page,navigate_page– open, close, list, select, and navigate tabs (back/forward/reload)
Interaction & Input
click,hover,drag– interact with page elementsfill,fill_form– fill inputs and formstype_text,press_key– simulate keyboard inputupload_file– upload files via file inputshandle_dialog– accept or dismiss browser dialogswait_for– wait for specific text to appear on the page
Inspection & Capture
take_snapshot– capture an a11y tree text snapshot with element UIDstake_screenshot– screenshot the full page, viewport, or a specific elementevaluate_script– execute arbitrary JavaScript and return resultsresize_page– resize the browser window
Network & Console Debugging
list_network_requests,get_network_request– list and inspect network requests (including request/response bodies)list_console_messages,get_console_message– list and inspect console messages
Performance, Memory & Auditing
performance_start_trace,performance_stop_trace,performance_analyze_insight– record and analyze performance traces (Core Web Vitals, page load)take_memory_snapshot– capture a heap snapshot to debug memory usage/leakslighthouse_audit– run Lighthouse audits for accessibility, SEO, and best practices
Emulation
emulate– emulate viewport, user agent, color scheme, geolocation, CPU throttling, or network conditions
Uses Puppeteer's bundled Chromium binary by default to control Chrome DevTools Protocol, providing browser automation capabilities through MCP.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chrome-devtools-mcp-mux open a new tab and navigate to example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chrome-devtools-mcp-mux
Drop-in replacement for chrome-devtools-mcp that lets many MCP clients share one Chrome instance and one profile without stepping on each other's tabs. Each client — a separate
Claude Code session, for example — gets its own isolated set of tabs, while
they all run against the same single browser and profile.
Agent 1:
❯ google
Called chrome-devtools-nightly (ctrl+o to expand)
⏺ Google loaded.
✻ Sautéed for 4s
❯ list tabs
Called chrome-devtools-nightly (ctrl+o to expand)
⏺ You have 1 tab open:
- Page 2: https://www.google.com/Agent 2:
❯ open netflix
Called chrome-devtools-nightly (ctrl+o to expand)
⏺ Now on Netflix!
✻ Churned for 5s
❯ list tabs
Called chrome-devtools-nightly (ctrl+o to expand)
⏺ You have 1 tab open:
- Page 3: Netflix (https://www.netflix.com/ca/) [currently selected]When agents get killed, their tabs are automatically closed.
What problem does this solve
chrome-devtools-mcp exposes Chrome DevTools to an MCP client. It works
perfectly for one client, but if two clients connect at once (two Claude Code
windows, a Claude Code plus a Gemini CLI, a coding agent plus a test runner —
anything using the same config) they step on each other's tabs: list_pages
shows everything, select_page races, new_page lands in the wrong window,
close_page can shut down another client's work.
cdmcp-mux sits between the clients and chrome-devtools-mcp and tracks who
owns which tab. Each client sees only its own tabs; cross-client collisions
are rejected before they ever reach the browser.
Related MCP server: ultimate-playwright-mcp
vs. vanilla chrome-devtools-mcp
Concern |
|
|
Config shape |
|
|
Tools exposed to clients | full vanilla surface | identical (pageId stays stripped; |
Chrome profile / cookies / logins / extensions | one | same |
Headless vs. headful by default | headful | headful (matches vanilla; force headless with |
Single client running alone | fine | fine — no behavior change, no overhead worth worrying about |
Two+ clients against one Chrome | collide: shared | isolated at the tool layer: |
| passes through | passes through (you can still opt in to per-tab isolation if you want it) |
CLI flag pass-through ( | ✓ | ✗ not yet — see drop-in gaps |
| ✓ | ✗ not yet |
Upstream version | latest every | pins a tested |
Maintained by | Chrome DevTools team | this repo (thin wrapper over upstream) |
Runtime overhead | zero | one long-lived daemon process, one unix socket hop per tool call |
Rule of thumb: if you only ever run one MCP client at a time, stick with vanilla. If you run two or more — different Claude Code sessions, an agent plus your own debugger, parallel test runners, etc. — the mux stops them from corrupting each other's state.
Drop-in gaps
A small number of vanilla behaviors aren't plumbed through the mux yet. Open an issue if one matters to you:
Arbitrary CLI args passed in
"args"(e.g.--viewport=1920x1080) are currently ignored. The mux spawns upstream with a fixed set of flags.--browserUrl,--wsEndpoint,--autoConnect— the mux always launches its own Chromium; it doesn't yet know how to attach to one that's already running.Upstream version is pinned per release. If upstream ships a new tool, the mux needs a version bump to expose it.
For anything not on this list, the mux is behaviorally indistinguishable from vanilla for a single client, and strictly better for many.
Install and configure
If your .mcp.json currently looks like this (the canonical upstream setup):
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}change chrome-devtools-mcp@latest to chrome-devtools-mcp-mux@latest and
you're done:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp-mux@latest"]
}
}
}The first client to connect auto-spawns a shared daemon; subsequent clients
attach to the same daemon. Each gets its own view of tabs, but they all live
in the same Chrome profile — so your cookies, logins, and extensions are the
same as with vanilla chrome-devtools-mcp.
git clone https://github.com/ochen1/chrome-devtools-mcp-mux
cd chrome-devtools-mcp-mux
npm install
npm run build
npm link # exposes `cdmcp-mux` on PATHThen "command": "cdmcp-mux" in .mcp.json.
How to verify it's working
Start two MCP clients with the config above. In each, ask the model to:
Open a different URL via
new_page.Run
list_pages.
Each client should see only its own page. On the host, run cdmcp-mux status
to see both contexts side-by-side in the daemon.
For a full scripted demo with a recorded video, see demo/.
Environment variables (optional)
Variable | Purpose |
| Chromium binary (defaults to bundled Puppeteer) |
| Override Chrome profile directory |
| Override unix socket path for the daemon |
|
|
|
|
Debugging
All out-of-band; the mux never exposes debug tools to MCP clients.
Command | What it does |
| daemon pid, upstream state, contexts, owned pages |
| stream the structured mux log |
The log lives at ~/.local/state/cdmcp-mux/mux.log.
How it works
flowchart TB
subgraph clients["one process per MCP client"]
direction LR
C1["Claude Code #1"] -- "stdio (MCP)" --> S1["cdmcp-mux shim"]
C2["Claude Code #2"] -- "stdio (MCP)" --> S2["cdmcp-mux shim"]
end
subgraph shared["shared — auto-spawned on first connect"]
direction TB
D["mux daemon<br/><i>per-connection ownership table</i><br/>(socket fd → ctxId → owned pageIds)"]
U["chrome-devtools-mcp subprocess<br/><code>--experimentalPageIdRouting</code><br/><code>--userDataDir <fixed></code>"]
B["Chromium<br/><i>one instance, one profile<br/>cookies shared across clients</i>"]
D -- "stdio (MCP)<br/>rewrite + filter" --> U
U -- "CDP" --> B
end
S1 -- "unix socket" --> D
S2 -- "unix socket" --> D
classDef client fill:#e3f2fd,stroke:#1976d2
classDef shim fill:#fff3e0,stroke:#f57c00
classDef core fill:#f3e5f5,stroke:#7b1fa2
classDef browser fill:#e8f5e9,stroke:#388e3c
class C1,C2 client
class S1,S2 shim
class D,U core
class B browserEach MCP client spawns its own cdmcp-mux shim (that's how .mcp.json works —
one child per client). The shim is a pure byte pipe between the client's stdio
and a unix socket; the first shim to connect auto-spawns the shared daemon,
later shims attach to it. The daemon owns one chrome-devtools-mcp
subprocess driving one Chromium with one --userDataDir.
The daemon advertises the same tool schemas as vanilla chrome-devtools-mcp.
Every connection gets its own ownership table of pageIds it created; the
daemon filters list_pages to that set and rejects cross-context calls to
close_page, select_page, and other page-scoped tools. pageId is stripped
from the advertised schemas and re-injected internally on every tools/call,
so concurrent calls from different clients always target the right tab —
backed by upstream's --experimentalPageIdRouting.
Tabs are not forced into isolated browser contexts — all clients share the
same Chrome profile, so your cookies and logins work the same as with vanilla
chrome-devtools-mcp. The isolatedContext parameter on new_page stays
exposed exactly like upstream: if a client wants an incognito-style context,
it passes it, and the mux forwards it verbatim. When a client disconnects, the
daemon closes every tab it owned and the rest keep running.
Development notes
This project was written end-to-end by a Claude-Code agent in a single working session, driven by live conversational requirements. The full test plan is tiered for functional correctness (58 tests, ~19 s, all passing), and the multiplexer was then visually demonstrated via a VNC-automated reproducer.
For the PRD-to-test mapping see DEMO.md. For the full agentic
development log — requirements discovery, architecture iteration, test
tiering, and the three takes of the video demo — see
demo/README.md.
Testing
# requires a Chromium binary; the smoke/e2e tests need it
CDMCP_MUX_CHROMIUM=/usr/bin/chromium npm testExpected: 8 files, 58 tests, all passing.
Releasing
CI runs on every push and PR against main using Node 22 and 24, building,
typechecking, and executing the full 58-test suite (including the real-Chromium
smoke and binary-e2e tests).
Publishing is automated via .github/workflows/publish.yml, which runs on a
GitHub release being published:
Bump
versioninpackage.json, commit, tag asv<version>.gh release create v<version> --generate-notes.The workflow builds, tests, and runs
npm publishwith npm provenance (signed via GitHub OIDC, the workflow hasid-token: write).
NPM_TOKEN is the only required repo secret. The package is published with
publishConfig.provenance: true, so the --provenance flag is implicit.
Once this repo is registered as a trusted publisher at npmjs.com, the
NPM_TOKEN secret can be removed entirely.
License
Apache-2.0 — see LICENSE. Same as upstream chrome-devtools-mcp.
Available Tools
29 toolsclickB
Clicks on the provided element
Inputs: uid (required), dblClick, includeSnapshot.
close_pageB
Closes the page by its index. The last open page cannot be closed.
Inputs: pageId (required).
dragB
Drag an element onto another element
Inputs: from_uid (required), to_uid (required), includeSnapshot.
emulateC
Emulates various features on the selected page.
Inputs: networkConditions, cpuThrottlingRate, geolocation, userAgent, +2 more.
evaluate_scriptA
Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON, so returned values have to be JSON-serializable.
Inputs: function (required), args, dialogAction.
fillA
Type text into an input, text area or select an option from a element.
Inputs: uid (required), value (required), includeSnapshot.
fill_formB
Fill out multiple form elements at once
Inputs: elements (required), includeSnapshot.
get_console_messageARead-only
Gets a console message by its ID. You can get all messages by calling list_console_messages.
Inputs: msgid (required).
get_network_requestA
Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.
Inputs: reqid, requestFilePath, responseFilePath.
handle_dialogA
If a browser dialog was opened, use this command to handle it
Inputs: action (required), promptText.
hoverB
Hover over the provided element
Inputs: uid (required), includeSnapshot.
lighthouse_auditA
Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace
Inputs: mode, device, outputDirPath.
list_console_messagesARead-only
List all console messages for the currently selected page since the last navigation.
Inputs: pageSize, pageIdx, types, includePreservedMessages.
list_network_requestsARead-only
List all requests for the currently selected page since the last navigation.
Inputs: pageSize, pageIdx, resourceTypes, includePreservedRequests.
list_pagesARead-only
Get a list of pages open in the browser.
Inputs: no named parameters.
new_pageB
Open a new tab and load a URL. Use project URL if not specified otherwise.
Inputs: url (required), background, isolatedContext, timeout.
performance_analyze_insightARead-only
Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.
Inputs: insightSetId (required), insightName (required).
performance_start_traceA
Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.
Inputs: reload, autoStop, filePath.
performance_stop_traceA
Stop the active performance trace recording on the selected webpage.
Inputs: filePath.
press_keyA
Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).
Inputs: key (required), includeSnapshot.
resize_pageA
Resizes the selected page's window so that the page has specified dimension
Inputs: width (required), height (required).
select_pageARead-only
Select a page as a context for future tool calls.
Inputs: pageId (required), bringToFront.
take_memory_snapshotA
Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.
Inputs: filePath (required).
take_screenshotB
Take a screenshot of the page or element.
Inputs: format, quality, uid, fullPage, +1 more.
take_snapshotA
Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).
Inputs: verbose, filePath.
type_textA
Type text using keyboard into a previously focused input
Inputs: text (required), submitKey.
upload_fileB
Upload a file through a provided element.
Inputs: uid (required), filePath (required), includeSnapshot.
wait_forARead-only
Wait for the specified text to appear on the selected page.
Inputs: text (required), timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Tools have distinct purposes: interaction (click, drag, fill), page management (new_page, close_page), and diagnostics (performance, console, network). Some overlap exists between fill, type_text, and press_key, but descriptions clarify their specific use cases. Snapshot vs screenshot are clearly differentiated.
All tools follow a consistent verb_noun snake_case pattern (e.g., list_console_messages, take_screenshot, performance_start_trace). No mixed conventions or vague verbs like 'process' or 'do_thing' are present.
29 tools is on the higher end but appropriate given the broad scope of Chrome DevTools functionality covered (interaction, performance, network, memory). Each tool serves a distinct need, and the count is justified even if slightly above the typical 15-tool comfort zone.
The surface covers core DevTools workflows: page navigation, element interaction, script evaluation, console/network inspection, performance tracing, and screenshots. Minor gaps exist (e.g., cookie management, network interception) but can be worked around via evaluate_script.
Maintenance
Related MCP Connectors
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Share one project context across ChatGPT, Claude, Telegram and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP Server for Chrome DevTools, following the Chrome DevTools Protocol. Integrates with Claude Desktop and Claude Code.316MIT
- AlicenseAqualityDmaintenanceMulti-agent Playwright MCP server with tab isolation via targetId, enabling multiple agents to share a single Chrome browser while maintaining isolated tab groups and shared sessions.1412 npm3MIT
- AlicenseNot gradedqualityCmaintenanceShares one Chrome browser across multiple AI coding sessions via an MCP proxy, adding lifecycle management, tool filtering, and anti-detection while wrapping the upstream chrome-devtools-mcp server.2MIT
- AlicenseNot gradedqualityCmaintenanceIt enables a single stdio MCP endpoint to multiplex calls by session_id to dedicated, isolated @playwright/mcp child processes, giving each session or subagent its own separate Chrome browser with isolated profiles and cookies.MIT