zendriver-rs
Async-first, undetectable browser automation via the Chrome DevTools Protocol โ drive real Chrome from Rust, or hand the keys to an LLM agent over the Model Context Protocol.
A Rust port of zendriver. Drives Chrome via raw CDP โ no WebDriver, no JS shim โ with anti-detection patches baked in by default.
๐ User guide & full documentation โ ยท ๐ฆ API reference (docs.rs) โ ยท ๐ค MCP server for AI agents โ
Quick example
use Browser;
async
More working examples in crates/zendriver/examples/.
Feature matrix
| Feature | Default? | Use case | Extra deps |
|---|---|---|---|
stealth |
yes | Anti-detection: spoofed UA/platform, isolated worlds, JS shim | (built-in to zendriver) |
interception |
no | Block/modify requests via CDP Fetch.*; rule-based + streams |
zendriver-interception |
expect |
no | Playwright-style expect_response() / expect_request() |
(in-tree, no extra crate) |
cloudflare |
no | Solve Cloudflare Turnstile challenges | zendriver-cloudflare |
fetcher |
no | Auto-download a pinned Chrome for Testing build | zendriver-fetcher + reqwest/zip |
Separate binary crate (not a feature on zendriver):
| Crate | Use case | Install |
|---|---|---|
zendriver-mcp |
Drive a stealth Chrome from any LLM agent โ Model Context Protocol server, 49 tools, stdio + streamable HTTP | cargo install zendriver-mcp (docs) |
Install
Pick the use case that matches what you're building.
Just browse:
Default stealth is on.
Stealth scraping (explicit):
Same as above โ only spell out the feature if you want it visible in Cargo.toml.
Everything:
Adds request interception, expect() matchers, Cloudflare Turnstile bypass, and the Chrome for Testing fetcher.
Drive a stealth browser from your AI agent
zendriver-mcp is a first-class Model Context Protocol server that hands the entire zendriver-rs surface to any LLM client โ Claude Desktop, Claude Code, Cursor, or your own agent loop. 49 tools, two transports (stdio + streamable HTTP), and the same stealth-by-default fingerprinting baked into the lib. Unlike generic browser MCP servers, this one bypasses Cloudflare Turnstile, ships an isolated-world JS eval that survives anti-bot detection, and lets agents persist auth state across sessions.
Claude Desktop / Claude Code config:
What agents get out of the box:
- Stealth navigation โ
browser_open,browser_goto,browser_back/forward/reload,browser_wait_for_idle, plus a runtime-swappablebrowser_set_stealth_profile(auto / native / spoof_macos / spoof_linux / spoof_windows) - Selector-based find + actions โ one
Selectorarg works acrossbrowser_find,browser_click,browser_type,browser_press,browser_set_value,browser_upload, etc., with CSS / XPath / visible-text / ARIA-role lookups and per-frame scoping - Three ways to "see" the page โ
browser_html(trimmed DOM),browser_screenshot(PNG / JPEG / WebP as inline image content),browser_element_state(visibility / geometry / attrs) - Stateful primitives agents need for real work โ
browser_cookies_persistfor save/load auth, fullbrowser_storage_*, multi-tab management, frame traversal - Anti-bot superpowers (gated cargo features, on by default for the published binary):
browser_solve_turnstileโ Cloudflare Turnstile bypass without a CAPTCHA-solving servicebrowser_intercept_*โ block/redirect/respond/modify requests via CDPFetch.*browser_expect_register / _awaitโ Playwright-style "wait for response/dialog/download" matchers, split across MCP calls so the agent can act in betweenbrowser_install_chromeโ pull a pinned Chrome-for-Testing build on demand
- Actionable errors โ every error carries an
_meta.suggested_nexthint pointing the agent at the right recovery tool (e.g.ElementNotFoundโ "trybrowser_htmlto inspect")
See the MCP chapter for the full tool reference, CLI flags, HTTP-mode operator notes, and troubleshooting guide.
Phases
Six development phases shipped into the v0.1.0 release. The mdBook covers each surface in depth.
- Foundation โ CDP transport + minimal
Browser/Tab/Element. See introduction. - Stealth โ fingerprint patches + isolated worlds + stealth JS bundle. See stealth.
- Element API completeness โ CSS/XPath/text/role selectors, actionability, input controller, screenshots. See quickstart.
Tab/Browsercompleteness โ multi-tab, cookies, storage, frames, nav history,wait_for_idle. See multi-tab + frames.- Optional gated features โ request interception,
expect()matchers, Cloudflare bypass, Chrome-for-Testing fetcher. See interception, expect, cloudflare, fetcher. - Polish + release โ trait extraction, rustdoc + mdBook, publish to crates.io.
Comparison
| Feature | zendriver-rs | chromiumoxide | fantoccini | headless_chrome | thirtyfour |
|---|---|---|---|---|---|
| API ergonomics opinion | builder + auto-wait | raw CDP types | WebDriver verbs | sync wrappers | WebDriver verbs |
| Stealth out-of-box | yes (default) | no | no | no | no |
| Multi-tab | yes (first-class) | yes | yes | yes | yes |
| Interception | yes (Fetch.* wrapper) |
yes (raw) | no (proxy-only) | partial | no (proxy-only) |
| Cloudflare bypass | yes (zendriver-cloudflare) |
no | no | no | no |
| MCP server for AI agents | yes (zendriver-mcp, 49 tools) |
no | no | no | no |
| License | MIT OR Apache-2.0 | MIT OR Apache-2.0 | Apache-2.0 | MIT | MIT |
| Async runtime | tokio | tokio / async-std | tokio | sync | tokio |
Subjective rows marked *opinion. All claims accurate as of the 0.1.0 release; check upstream changelogs before relying on them.
Contributing
See CONTRIBUTING.md. Issues and PRs welcome.
License
Dual-licensed under MIT (LICENSE-MIT) and Apache-2.0 (LICENSE-APACHE) at your option.