Zendriver MCP
It provides a stealthy headed-Chrome browser-automation MCP server with a core browse loop plus a searchable catalog of 112 browser tools.
Launch, stop, and check the status of a real headed Chrome browser; it refuses headless mode.
Navigate pages with built-in settling, manage tabs/history, and target tabs per call.
Inspect interactive elements with numeric IDs; click, type text, press keys, scroll, and wait for elements using trusted input events.
Read visible page text, take screenshots, save artifacts as MCP resources, and execute JavaScript as an escape hatch.
Discover and run the full tool catalog with
search_tools,describe_tool,call_tool,batch, and backgroundjobs.Cover advanced automation: forms, iframes, shadow DOM, dialogs, cookies, storage, network/console logs, request blocking/mocking, proxies, headers, emulation, permissions, accessibility, tracing, heap snapshots, Lighthouse, screencasts, PDF, Cloudflare challenges, and security audits.
Emphasize stealth: isolated JavaScript world, no DOM markers, trusted clicks/keys, and headed Chrome, with documented detectable exceptions.
Serve MCP over stdio or Streamable HTTP with structured results/errors, resources, prompts, progress/cancellation, tokens, host/origin checks, and rate limits.
Provides a real, headed Google Chrome browser controlled over the Chrome DevTools Protocol, with tools for navigation, element interaction, forms, tabs, cookies and storage, network and console inspection, emulation, screenshots, tracing, and browser automation.
Enables running Lighthouse audits against pages through the browser, exposing a tool for page audit tasks.
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., "@Zendriver MCP Open news.ycombinator.com and get the top 5 story titles"
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.
Zendriver MCP
A Model Context Protocol server that gives an AI agent a real, headed Chrome, driven over the Chrome DevTools Protocol through zendriver, and built so the page it is looking at cannot tell an agent is there.
115 browser tools behind a small fixed tool list: navigation, elements, iframes, forms, tabs, dialogs, downloads, cookies and session export, network logs and response bodies, mocking and blocking, emulation, accessibility, tracing, Lighthouse, screencasts, PDF and more.
Hard to detect by design. Helper scripts and element ids live in an isolated JavaScript world, nothing is written into the DOM, and clicks and keys are trusted input events.
Built for the current MCP spec. It serves 2026-07-28 and the 2025 handshake versions from one server. Every tool returns structured results, carries annotations, and fails with an error code and a recovery hint.
Contents
Related MCP server: browser-control-mcp-server
Quick start
Requirements: Python 3.10+, Google Chrome or Chromium, and a display. On a headless Linux
host, run Xvfb (Xvfb :99 & and DISPLAY=:99). The server never runs Chrome headless; see
why.
Claude Code
claude mcp add browser -- uvx --from git+https://github.com/coffeegrind123/zendriver-mcp-next zendriver-mcpAny MCP client (stdio):
{
"mcpServers": {
"browser": {
"command": "uvx",
"args": ["--from", "git+https://github.com/coffeegrind123/zendriver-mcp-next", "zendriver-mcp"],
"env": { "DISPLAY": ":99" }
}
}
}From a checkout
git clone https://github.com/coffeegrind123/zendriver-mcp-next
cd zendriver-mcp-next
uv sync
uv run zendriver-mcp # stdio
uv run zendriver-mcp --help # transports, tokens, optionsHow an agent uses it
The server sends the model short instructions when it connects. The core loop is:
start_browser → navigate(url) → get_interaction_tree → click / type_text / press_key
→ get_text_content or screenshot → stop_browsernavigatewaits for the page to settle. It waits fordocument.readyStateto reach complete, then for the network to go idle, and reports which of the two happened.Elements are addressed by CSS selector, or by the numeric id that
get_interaction_treeassigns. Ids stay valid while the element exists. A stale id fails with codestale_idinstead of hitting the wrong element.Iframes, same-origin and cross-site, are walked too: their elements carry a frame number
f, and clicks, typing and ids work inside them as in the page.fill_formfills any kind of field (text, checkbox, radio group, select, multi-select, combobox, range, date, time, file), found by selector, id, or the label a person reads.get_interaction_tree(only_changed=true)after an action returns only what it changed, plus the ids it removed.Long pages.
get_interaction_tree(view="summary")gives one line per region (nav:Primary,form:login,dlg:Cookie consent), with repeated labels folded into the first id and a count (Add to cart x30), select options previewed and an h1–h3 outline. It is about a tenth of the list view on a long page, and every id in it still works.within="<rid>"lists one region in full;withinalso takes any selector or id.find_elements("Sign in button in header")ranks the tree's elements against a description and returns the best ids, without listing the page. The default ranker matches words (label, kind, input type, region, link target).ranker="folate"rescores with the Folate ONNX cross-encoder, from thefolateextra (pip install 'zendriver-mcp-next[folate]'). On 31 descriptions across four live sites, words found 28 at 0.03 s a call and Folate 27 at 1.6 s, so Folate is opt-in.hoveropens hover menus with trusted pointer moves.dragdrops one element on another, or moves it by a distance. Sliders get pointer events, anddraggableelements get a real HTML5 drag with its data.Dialogs. An
alertorconfirmfreezes its tab; tools on it fail at once withdialog_openuntilhandle_dialoganswers it, orset_dialog_policyanswers them all.Waiting on single-page apps:
wait_for_elementwithstate(visible, attached, hidden, detached),wait_for_text(or its disappearance) andwait_for_url.Reading:
get_text_content(format="markdown")keeps headings, lists, links, tables and code;get_response_bodyreturns the API responses a page fetched.Tabs. Every page tool takes an optional
tab="tab_2", which acts on that tab for one call without switching to it. Tabs the page opens itself (popups,target=_blank) are picked up automatically.Everything else is one search away.
search_tools("block requests")finds the tool, andcall_toolruns it.batchruns a known sequence in one call. A later step can read an earlier result as"$N.field", or as"${N.field}"inside a longer string.jobsruns a slow tool in the background (Lighthouse, heap snapshots, video export) and records its progress.
Every result has structured content plus a text summary. Every failure is an isError result
shaped like this:
{ "error": "Something covers #buy at (640, 412): <div#cookie-banner>.",
"code": "element_obscured",
"hint": "Close the overlay on top (a cookie banner, a modal) or scroll so the element is unobstructed. force=true clicks at that point anyway." }Tools
The default tools/list has 20 entries: the core loop below, plus search_tools,
describe_tool, call_tool, batch and jobs. The core tools are tagged
anthropic/alwaysLoad so that Claude Code's tool search never defers them. Set
ZENDRIVER_MCP_SURFACE=full to list all 120 directly.
Core (always listed) | Reached through |
| tabs and history · element queries · shadow DOM · forms · hover and drag · human-like mouse and typing · per-page and whole-browser cookies · local storage · network and console logs · request blocking, extra headers, mocking and failure injection · proxy · user agent, locale, timezone, geolocation · device, CPU and network emulation · permissions · accessibility tree · tracing and heap snapshots · Lighthouse · screencast to MP4 · Cloudflare challenge handling · security audit |
The full list, with each tool's effect, parameters and summary, is in docs/tools.md. That file is generated from the code.
Resources. Files that tools write are served back as resources, so a remote client can fetch them:
browser://artifacts/{name}: screenshots, traces, heap snapshots, videos, cookie exports;browser://tabs;browser://tabs/{tab}/info,/consoleand/network.
{tab} and {name} support completion. On 2026-07-28 clients, opening or closing a tab
publishes resources/list_changed to subscriptions/listen streams.
Prompts. read_page, fill_form_task and audit_page.
What a page can and cannot see
Pages detect automation by looking for side effects. Each row below is a side effect that
other CDP tools leave behind and this server avoids. Each claim is checked by the live test
in tests/test_live.py, which records events from a listener inside the page itself.
Signal a page can check | Common CDP tooling | This server |
|
|
|
Marker attributes in the DOM ( | Written onto every element | None; ids live in an isolated world |
Helper code in the page's JS world (wrapped | Runs in the main world | Runs in an isolated world the page cannot reach |
Injected highlight elements and CSS rules | zendriver's | Never called |
| Common | Refused: every launch is headed |
| Historically observable | Measured not observable on Chrome 157 with the classic stack-getter probe |
The remaining exposure is documented, not hidden:
execute_javascriptruns in the page's own world by design. Prefer the dedicated tools.select_optionsets a native<select>by script, so itschangeevent is untrusted.fill_formchanges a select with arrow keys, which is trusted.fill_formsets colour, month and week inputs by script (Chrome opens a native picker for them), and falls back to a script for any field whose trusted route did not take. Each such field is reported withtrusted: false.The bundled "I Still Don't Care About Cookies" extension adds classes such as
idc0_343to<html>on http(s) pages. That is the extension's own marker, readable by the page.A full-page
screenshotscrolls through the page and back with trusted wheel gestures, so the page sees scrolling, as for a person reading it. It does not usecaptureBeyondViewport, which resizes the viewport and fires aresizeevent in the page.dragon adraggableelement intercepts Chrome's native drag (Input.setInterceptDrags) and finishes it at the target. Measured: the page seesdragenter, twodragovers anddropon the target, thendragendon the source, all trusted. A person's drag also sends a stream ofdragovers, anddragenter/dragleaveto every element it crosses. A page that counts those could tell the difference. Pointer drags (sliders, sortable lists) get every pointer move.block_resourcesmakes images (or other types) fail to load, which a page can notice.start_browser(low_memory=true)adds container-friendly flags such as--disable-gpu, which produce detectable software WebGL. Use it only where Chrome cannot start without it.
Configuration
All settings are optional environment variables.
Variable | Default | Effect |
|
|
|
| – | Restricts which tools exist: |
| – | Comma-separated tool groups to keep (the group names are in docs/tools.md). |
| – | Exact tool names to keep or remove. |
| off | Starts Chrome on the first call that needs it, and replaces a browser that died. |
|
| Per-call time budget, in seconds. A hung CDP call returns an error rather than hanging the session. |
| budget − reserve | Time allowed for Chrome to start. |
| off | Refuses actions that would submit a form or press a send, pay, buy, delete or publish control (code |
| – | Extra directories, besides |
| off | Skips the X display pre-flight check before launching. |
| – | A local copy of the Folate weights for |
|
| Where HTTP tokens are stored. |
|
| Where the bundled extensions are kept (uBlock Origin Lite and I Still Don't Care About Cookies, downloaded on first launch). Falls back to the temp dir when the cache cannot be written; a launch never fails over an extension. |
ZENDRIVER_MCP_GATEWAY=1 and ZENDRIVER_MCP_PROFILE=gateway are still accepted, and mean
SURFACE=catalog.
Running over HTTP
stdio gives each client its own browser. To let several clients share one long-lived browser, use Streamable HTTP:
zendriver-mcp --create-token laptop # prints the token once; only its hash is stored
zendriver-mcp --transport streamable-http --host 127.0.0.1 --port 8931
claude mcp add --transport http browser http://127.0.0.1:8931/mcp \
--header "Authorization: Bearer zmcp_..."Tokens. Bearer tokens are compared in constant time and stored as SHA-256 hashes with mode 0600. Each token's name becomes the caller identity, so one client cannot see or drive another client's tabs.
Without tokens. The server runs unauthenticated on loopback only. It refuses to bind any other address.
Host and Origin checks protect against DNS rebinding. Add LAN names with
--allowed-host.Rate limit. 600 requests per minute per token by default (
--rate-limit), answered with429andRetry-After.
Protocol support
Spec revision | Supported | Notes |
2026-07-28 | yes | Stateless, |
2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 | yes | Initialize handshake; |
Features used:
tool annotations and titles;
outputSchemawithstructuredContent;isErrorresults with codes;resources, resource templates and completions;
prompts;
progress notifications, and cancellation that stops child processes;
resources/list_changed;server instructions, kept under Claude Code's 4,096-character limit.
The jobs tool gives every client, whatever it supports, a way to poll long-running work.
Architecture
MCP client ──stdio / Streamable HTTP──► MCPServer (SDK 2.3)
│ auth middleware: token → caller (HTTP only)
▼
┌──────────── catalog.py ────────────┐
│ core tools · search · call · batch │
│ jobs · resources · prompts │
└──────────────┬─────────────────────┘
▼
tools/*.py ── ToolBase._register: annotations, budget,
tab handle, Result → structured + text,
exception → {error, code, hint}
▼
dom.py: isolated world, element ids, trusted input, CDP geometry
session.py: browser, tabs and owners, logs, Fetch (proxy auth + interception)
▼
zendriver ──CDP──► headed ChromeDevelopment
uv sync --dev
uv run ruff check . && uv run ruff format --check .
uv run mypy zendriver_mcp
uv run pytest # unit, contract and protocol tests
DISPLAY=:99 ZENDRIVER_MCP_LIVE=1 uv run pytest tests/test_live*.py # real Chrome
# find_elements(ranker="folate") live test: needs the extra and a ~107 MB model download
uv sync --dev --extra folate
DISPLAY=:99 ZENDRIVER_MCP_LIVE=1 ZENDRIVER_MCP_LIVE_FOLATE=1 uv run pytest tests/test_live_find.py
uv run python scripts/gen_tool_docs.py # regenerate docs/tools.mdThe test suite enforces the conventions every tool must follow:
every tool has a title, annotations, an output schema and described parameters;
no tool returns an error as a success string;
no selector is interpolated into page JavaScript;
the default surface stays under a size budget;
the instructions name only tools that exist and stay under the size limit.
CI runs all of this, plus the live test under Xvfb.
Acknowledgements
Built on zendriver and the MCP Python SDK. The tool set started from Zendriver-MCP by Shubham Choulkar; the MCP layer, element access, error model, HTTP security and test suite were rewritten for this project.
License
Available Tools
19 toolsbatchRun stepsADestructive
Run a batch of several tools in one call, in order, passing results forward.
Saves a round trip per step for sequences you already know, such as navigate, fill a form, submit, read the result. Each step is validated when it runs, and nothing is rolled back: a browser cannot undo a click. At most 50 steps per call; refer to an earlier step's result as "$N.field". Returns every step's outcome; failed_at names the step that stopped it.
Inputs: steps (required), stop_on_error. Returns: steps, summary, completed, failed_at
call_toolCall toolADestructive
Invoke any tool of this server by name, with the same validation and results as calling it directly.
Find the name with search_tools (describe_tool for the exact schema).
Failures come back as errors with a code and a hint, exactly as from the
tool itself. Its read-only/destructive nature is the called tool's, shown
in search_tools' effect. Returns exactly what the named tool returns.
Inputs: name (required), arguments.
clickClick elementA
Click one element, located by selector, numeric id, or visible text.
Pass exactly one of selector or text. The click is a real mouse event (move, press, release at the element's centre, scrolled into view), so the page sees exactly what a user's click produces. Numeric ids come from get_interaction_tree and are the most reliable route on complex pages; an id stays valid while its element exists and expires on navigation. Fails with element_obscured, naming what is on top, when another element covers the target; pass force=true to click anyway. Returns the target, its tag, and its numeric id when matched by text.
Inputs: tab, text, force, selector. Returns: id, tag, target, summary
describe_toolDescribe toolARead-only
Show one tool's full description, argument schema, result schema and hints.
Use when a search_tools line is not enough to call the tool correctly, or to learn which result fields a batch $N reference can read. Returns the description, input schema, output schema and annotations.
Inputs: name (required). Returns: name, title, summary, annotations, +3 more
execute_javascriptRun JavaScriptA
Execute JavaScript in the page's own context and return its value as JSON.
The escape hatch for anything the dedicated tools do not cover: reading
page globals, calling page functions, extracting structured data in one
pass. Takes an expression, or a statement block that uses return (run
as the body of an async function, so await works too). It runs in the
page's main world, so it sees the page's variables and the page could
in principle observe it; prefer the dedicated tools where they apply.
Nothing is rolled back: whatever the script changed before it threw
stays, and a script that times out may still be running in the page.
Inputs: script (required), tab, timeout. Returns: value, summary, has_value
get_browser_statusBrowser statusARead-only
Check whether the browser is running, and list its open tabs.
Use to decide whether start_browser is still needed, or to recover tab ids after losing track. Returns whether it is running and every open tab with its id, URL and whether it is the active one.
Inputs: no named parameters. Returns: tabs, running, summary
get_interaction_treeInteractive elementsARead-only
List the page's interactive elements, each with a short numeric id.
The cheapest way to see what can be clicked or typed into: it walks the DOM including shadow roots for buttons, links, and inputs. The numeric ids it assigns are accepted directly by click, type_text, and the other element tools in place of a CSS selector. An id stays valid while its element exists, survives later walks, and expires on navigation; an expired one fails with stale_id. The walk runs in an isolated world and leaves no trace in the page. Returns the elements (capped at limit), the total, and whether the cap cut the list short.
Pass links=true to get each link's target as h — a path when it is
same-origin, a full URL otherwise. Following a link then means a navigate
instead of a click-and-hope, which matters when the link text is
unhelpful or missing. It is off by default because it roughly doubles the
output; measured at +116% on a 125-link search page. Nothing is emitted
for javascript: handlers, bare "#" anchors, or links back to the current
page, none of which can take you anywhere.
Inputs: tab, limit, links. Returns: total, summary, elements, truncated
get_text_contentPage textARead-only
Get the page's visible text, without any HTML markup.
Use for reading or extracting page copy. Text hidden by CSS is excluded, and no selectors are returned, so use get_interaction_tree if you intend to interact. Same pagination contract as get_content. An empty result carries a diagnosis saying whether the page is still loading, has no body, keeps its text in iframes or shadow roots, or really is blank. Returns one page of text plus the offset to continue from.
Inputs: tab, offset, max_chars. Returns: end, text, total, offset, +3 more
jobsBackground jobsADestructive
Run a slow tool in the background and follow it: start, then wait or get.
For calls that can outlast a client's request timeout (Lighthouse audits, heap snapshots, screencast exports, long waits) or that you want to run while doing something else. Progress the tool reports is recorded on the job. Finished jobs are kept for an hour. Returns the affected jobs with their id, state, progress, and result once finished.
Inputs: action (required), tool, job_id, timeout, +1 more. Returns: jobs, summary
list_tabsList tabsARead-only
List every open tab with its id and current URL.
Use to discover tab ids before switch_tab or close_tab, or to find a tab opened by the page itself (target=_blank, popups get ids here too). Returns every tab with its id, URL and whether it is the active one.
Inputs: no named parameters. Returns: tabs, summary
press_keyPress keyA
Press one key as a real keyboard event, with its native effect.
The browser produces keydown, keypress (for printable keys) and keyup, all trusted, and does what the key does: Enter submits the enclosing form or activates a focused button, Tab moves focus, Backspace deletes. Use when a framework listens for key events that type_text's bulk insert does not fire. Focuses selector first when given. Returns the key pressed and the element focused first, if any.
Inputs: key (required), tab, selector, modifiers. Returns: key, target, summary
screenshotScreenshotARead-only
Take a screenshot of the visible viewport as an image you can look at directly.
The fastest way to understand a page's actual layout when selectors and text are not enough. Set window_size and device_scale_factor on start_browser first — the default viewport is roughly 800x600, which is why screenshots come out small. The returned image is JPEG quality 60, downscaled to 1024px wide unless full_resolution is set; save_path files keep full resolution and are also published as a resource. Returns the image plus its returned and full dimensions and any saved file.
Inputs: tab, save_path, full_resolution. Returns: files, width, format, height, +4 more
scrollScroll pageA
Scroll the page vertically by a pixel amount.
Use to reach content below the fold or to trigger lazy loading. To reach one known element instead, scroll_to_element is more reliable. Scrolls with a synthesized wheel gesture, as a user would. Returns the vertical scroll position afterwards.
Inputs: tab, amount, direction. Returns: target, summary, scroll_y
search_toolsSearch toolsARead-only
Find a browser tool by capability, among those not listed directly.
This server lists only the core browse loop (start, navigate, read, click, type, screenshot, tabs). Everything else is found here: cookies, storage, network logs and interception, request blocking, headers, proxies, device and network emulation, geolocation, timezone, locale, permissions, accessibility, tracing, heap snapshots, Lighthouse, screencasts, Cloudflare challenges, security audits, human-like input, shadow DOM. Run a match with call_tool, several with batch, or a slow one with jobs.
Inputs: query (required), limit, detail. Returns: matches, summary
start_browserStart browserA
Launch the browser and start a session. Required before every other tool.
Every other tool in this server operates on the browser this starts, and fails without it. One browser at a time; call stop_browser before starting another with different options. Returns a confirmation naming the mode and any options applied.
Inputs: proxy, headless, low_memory, window_size, +2 more. Returns: mode, options, summary, headless_ignored
stop_browserStop browserADestructive
Stop the browser, close every tab, and release all session resources.
Call when finished, or before start_browser to relaunch with different options. Unsaved page state and non-persisted cookies are lost. Returns a confirmation string.
Inputs: no named parameters. Returns: Base of every tool result.
type_textType textA
Type text into an input via the browser's own text insertion.
Focuses the element with a real click first (programmatic focus when something decorative covers it), then inserts the text through CDP, so the page receives genuine input events and no page JavaScript runs. Appends to any existing value: call clear_input first to replace it. Use press_key or human_type when a page needs per-key events. Returns the target, its tag, and a summary with the character count.
Inputs: text (required), selector (required), tab. Returns: id, tag, target, summary
wait_for_elementWait for elementARead-only
Wait until an element appears on the page, polling until it does.
The right way to synchronise with a single-page app after a click or navigation — more reliable than wait with a guessed duration. Returns how long it took, or an error naming why it never matched (absent, or present but hidden, with similarly named ids as suggestions).
Inputs: selector (required), tab, timeout, visible. Returns: found, elapsed, summary, selector
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools carve out a clearly distinct purpose (navigate, click, type_text, press_key, screenshot, execute_javascript), and the descriptions actively steer between near-neighbours like type_text vs press_key and scroll vs scroll_to_element. The main overlap is list_tabs vs get_browser_status, which both return tab ids/URLs/active flag, and the meta-layer (search_tools / describe_tool / call_tool) is three tools in service of one lookup flow, though their roles are spelled out.
Snake_case throughout, and most names are verb_noun (start_browser, get_text_content, wait_for_element, execute_javascript). A handful of bare verbs (navigate, click, scroll) and bare nouns (screenshot, batch, jobs, navigate) break the pattern, but the underlying convention is uniform and readable.
19 tools is high but defensible: 13 form a tight browse loop and the remaining meta-tools (search_tools, describe_tool, call_tool, batch, jobs) exist specifically to keep the directly-listed surface small while exposing a much larger capability set. Each listed tool maps to a real step in an agent's workflow rather than padding.
Browser lifecycle (start/stop/status), navigation, tabs, reading, interaction, key input, JS escape hatch and screenshots are all covered, and gaps like cookies, network, emulation and accessibility are reachable via search_tools + call_tool. Minor friction: tools referenced by name in descriptions (switch_tab, close_tab, clear_input, scroll_to_element, human_type) are not listed directly, so an agent must take a discovery detour to reach them.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Let your AI agent operate any website through a real, logged-in browser session.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to directly control your real Chrome browser with full context including login sessions, cookies, and open tabs. It provides tools for page scanning, JavaScript execution, CDP control, screenshots, and physical mouse/keyboard input for authentic browser automation.20243MIT
- AlicenseAqualityDmaintenanceEnables AI agents to fully control a browser for web automation, including navigation, clicking, typing, scrolling, screenshots, and DOM inspection, with session persistence and anti-bot bypass.4028 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a real, authenticated Chrome browser through native tools for navigation, DOM interaction, form filling, scraping, screenshots, and human-in-the-loop checkpoints while minimizing tokens and latency.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to control and inspect a live Chrome browser for reliable automation, in-depth debugging, performance analysis, and high-speed batched or parallel workflows.Apache 2.0