chrome-devtools-mcp-rebrowser
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-rebrowser Open example.com, accept the cookie banner, and screenshot the page"
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 with Rebrowser Anti-Detection Patches
This project wraps chrome-devtools-mcp with rebrowser-patches to make AI agents undetectable by anti-bot systems like Cloudflare and DataDome.

π€ AI
Yes, I used AI. I also committed the full conversations as the real design documents (.ai-conversations/ - private submodule, ask me for access).
They're private because I haven't scrubbed my file paths and trash talk, not because I'm hiding anything.
Code is MIT. What license applies to human-AI conversation transcripts is an open question. Literally. Nobody knows yet.
Related MCP server: Chrome for AI
Quick Start
Prerequisites
Node.js β₯ 20.19.0 LTS
Chrome running with remote debugging enabled (go to
chrome://inspect/#remote-debugging)
Usage via npx (recommended)
No cloning or manual setup needed. Just configure your MCP client:
{
"mcpServers": {
"chrome-devtools-mcp-rebrowser": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@liqi0816/chrome-devtools-mcp-rebrowser@latest",
"--auto-connect",
"--performance-crux=false",
"--usage-statistics=false",
"--category-emulation=false",
"--category-performance=false",
"--category-network=false"
]
}
}
}That's it. The postinstall script automatically applies all patches after npm install.
Usage from source (development)
git clone <repo-url>
cd chrome-devtools-mcp-rebrowser
npm install # postinstall applies patches automaticallyThen configure the MCP server to use the local entry point:
{
"mcpServers": {
"chrome-devtools-mcp-rebrowser": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "node",
"args": [
"/path/to/launch.mjs",
"--auto-connect",
"--performance-crux=false",
"--usage-statistics=false",
"--category-emulation=false",
"--category-performance=false",
"--category-network=false"
]
}
}
}How It Works
chrome-devtools-mcp is Google's official MCP server for Chrome DevTools. It bundles its own copy of Puppeteer internally. This project intercepts its puppeteer.connect() and puppeteer.launch() calls and redirects them through a separately installed, rebrowser-patched version of puppeteer-core.
Architecture
launch.mjs (entry point)
β
ββ Imports patched puppeteer-core (node_modules/puppeteer-core)
β ββ puppeteer-core@24.40.0 + rebrowser-patches applied
β
ββ Imports bundled puppeteer from chrome-devtools-mcp
β ββ node_modules/chrome-devtools-mcp/build/src/third_party/index.js
β
ββ Monkey-patches bundled puppeteer's connect()/launch() methods
β to redirect through the patched puppeteer-core
β
ββ Delegates to chrome-devtools-mcp's main entry point
postinstall.mjs (runs after npm install)
β
ββ Applies rebrowser-patches to puppeteer-core (with --fuzz=10)
β
ββ Applies DevToolsConnectionAdapter.js patch to chrome-devtools-mcp
DevToolsConnectionAdapter.js (patched)
β
ββ Blocks Runtime.enable calls from DevTools Universe models
to prevent CDP detection via the separate CDP sessionWhy the Monkey-Patching?
chrome-devtools-mcpbundles Puppeteer in a single rollup file (third_party/index.js), so you can't simply swap outpuppeteer-coreviapackage.json.rebrowser-puppeteer(the drop-in replacement) is only available up to v24.8.1, but recentchrome-devtools-mcpreleases require newer Puppeteer APIs (e.g.,page.emulateFocusedPage()from v24.39+).Solution: install a compatible
puppeteer-coreseparately, applyrebrowser-patchesto it, then redirect the bundled Puppeteer's calls through the patched version.
Why puppeteer-core and rebrowser-patches are pinned to exact versions
You'll see "puppeteer-core": "24.40.0" and "rebrowser-patches": "1.0.19" (no caret) in package.json. This is deliberate β these two must move in lockstep:
rebrowser-patches is a set of line-by-line unified diffs against puppeteer-core's compiled output. Any upstream puppeteer-core release can add/remove lines near a hunk and make the patch stop applying β even patch-level releases. For example, rebrowser-patches@1.0.19 was cut against puppeteer-core 24.40.x, and newer puppeteer-core (24.41+) adds fields to IsolatedWorld.js that break hunks (see issue #4). Conversely, a newer rebrowser-patches release could target a different puppeteer-core line layout and stop applying to 24.40.0.
Both pins are bumped together whenever a new rebrowser-patches release catches up to a newer puppeteer-core. The remaining dependencies (chrome-devtools-mcp, diff) still float on ^ ranges because their APIs are stable and the patches we apply use fuzzy matching.
Flags
All flags from chrome-devtools-mcp are passed transparently. Key ones:
Flag | Description |
| Connect to a running Chrome instance (requires remote debugging enabled) |
| Connect via HTTP URL |
| Connect via WebSocket |
| Run in headless mode (Warning: more detectable) |
| Disable telemetry |
Rebrowser Patches Environment Variables
You can fine-tune the anti-detection patches:
Variable | Values | Default |
|
|
|
| Any string, or |
|
| Any string, or |
|
|
| (disabled) |
What the Patches Fix
rebrowser-patches (applied to puppeteer-core)
Runtime.Enableleak β The primary detection vector. Anti-bot systems detect thatRuntime.Enablewas called (used by Puppeteer/Playwright). The patch avoids calling it and uses alternative methods to manage execution contexts.sourceURLfingerprint β Puppeteer adds//# sourceURL=pptr:...to evaluated scripts. The patch changes it to//# sourceURL=app.js.Utility world name β The default
__puppeteer_utility_world__name is changed toutil.Browser
_connection()method β Exposes the CDP connection for advanced use cases (not detectable by websites).
DevToolsConnectionAdapter.js (applied to chrome-devtools-mcp)
DevTools Universe
Runtime.Enableleak β Even with rebrowser-patches applied to puppeteer-core,chrome-devtools-mcpcreates a separate CDP session per page viapage.createCDPSession()inDevtoolsUtils.jsand feeds it to a DevTools Universe. The Universe's RuntimeModel then callsRuntime.enableon that session β completely bypassing the patched puppeteer-core. We patchDevToolsConnectionAdapter.jsto intercept and blockRuntime.enablecalls in thesend()method, consistent with how rebrowser-patches handles it inside Puppeteer's FrameManager.
What the DevTools Universe CDP session is used for
chrome-devtools-mcp creates a per-page DevTools Universe (a lightweight instance of Chrome DevTools' SDK) for source-map-aware stack trace symbolication and error introspection:
Feature | Model | What it does |
Stack trace resolution |
| Receives |
Exception details |
| Calls |
Skip-all-pauses |
| Immediately calls |
Tradeoff of blocking Runtime.enable
Blocking Runtime.enable on the Universe session means the RuntimeModel won't receive execution context events, which degrades getExceptionDetails() (error cause chain resolution in get_console_message). However:
Core MCP tools are unaffected β
evaluate_script, page snapshots, navigation, clicking, typing, screenshots all use Puppeteer APIs directly, not the Universe session.Console message collection is unaffected β
PageCollectorlistens on Puppeteer's own CDP session (page._client()), not the Universe session.Stack traces from
DebuggerModelstill work βDebugger.enableis not blocked, so source-map-aware stack traces continue to function.Only error cause chains degrade β The recursive
.causelookup viaRuntimeModel.getExceptionDetails()may fail silently, omitting cause details from console error output.
This is an acceptable tradeoff since Runtime.enable is the primary CDP detection vector used by anti-bot systems.
Troubleshooting
"Could not connect to Chrome"
Make sure Chrome is running
Enable remote debugging: go to
chrome://inspect/#remote-debuggingCheck that
DevToolsActivePortfile exists in Chrome's user data directory
Patch fails with "FAILED" hunks
The installed
puppeteer-coreversion drifted past whatrebrowser-patchesknows how to patch.postinstall.mjsprints the exact installed versions and a link to issue #4 when this happens. Re-run withnpx -y @liqi0816/chrome-devtools-mcp-rebrowser@latestβ the pinnedpuppeteer-coreandrebrowser-patchesinpackage.jsonshould keep the install reproducible.
"emulateFocusedPage is not a function" (or similar)
Version mismatch: ensure
puppeteer-coreinpackage.jsonis a version whose API is supported by the bundled Puppeteer insidechrome-devtools-mcp(see the Version Compatibility table below).
Version Compatibility
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: to_uid (required), from_uid (required), includeSnapshot.
emulateC
Emulates various features on the selected page.
Inputs: viewport, userAgent, colorScheme, geolocation, +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: types, pageIdx, pageSize, includePreservedMessages.
list_network_requestsARead-only
List all requests for the currently selected page since the last navigation.
Inputs: pageIdx, pageSize, 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), timeout, background, isolatedContext.
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: insightName (required), insightSetId (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: uid, format, quality, filePath, +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
Most tools target clearly distinct browser/devtools actions, such as page lifecycle, console/network inspection, performance tracing, and screenshots. The main ambiguity is among input tools: fill vs type_text, fill vs fill_form, and click/hover/press_key can occasionally be confused, though descriptions mostly clarify usage.
Names are consistently snake_case and most follow an action-first pattern such as list_pages, get_console_message, and take_screenshot. There are minor deviations with bare verbs (click, hover, fill) and resource-prefixed performance tools (performance_start_trace, lighthouse_audit), but the set remains readable and predictable.
At 29 tools, the surface is well above the recommended range and feels heavy, with many fine-grained operations across input, page management, network, performance, and memory. While the breadth of Chrome DevTools justifies many of them, some grouping or consolidation would make the set easier to navigate.
Coverage is strong across page lifecycle, navigation, element interaction, forms, screenshots/snapshots, console, network, performance tracing, Lighthouse, and memory snapshots. Minor gaps remain around storage/cookies, network manipulation, and richer waiting/assertion patterns, but core workflows are covered.
Maintenance
Related MCP Connectors
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Undetectable cloud browser sessions for AI agents and scrapers. Navigate, extract, click, captcha.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Browser agents and stealth cloud browsers for AI: run web tasks, fill forms, extract data.
Related MCP Servers
- AlicenseAqualityDmaintenanceStealth browser automation for AI agents, using source-patched Chromium to bypass bot detection systems like Cloudflare, reCAPTCHA, and FingerprintJS.28Apache 2.0
- AlicenseBqualityCmaintenanceEnables AI agents to drive real Google Chrome with stealth and captcha handling, using Patchright to avoid bot detection.70Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents and developers to automate real Chrome/Chromium browsers through the Chrome DevTools Protocol, with token-efficient snapshots, multi-action batching, shadow DOM traversal, system-page control, extension management, and network/WebSocket inspection.951MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to drive a Chromium-based browser for web research, testing, and automation with Playwright-compatible tools, persistent profiles, proxy matching, extension loading, and humanized input across local or containerized deployments.297 npmMIT