stealth-agent-browser-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., "@stealth-agent-browser-mcp navigate to https://example.com and get hybrid snapshot"
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.
stealth-agent-browser-mcp
A Model Context Protocol (MCP) server that gives AI agents a stealth-grade Chromium browser with a hybrid Accessibility-Object-Model + Set-of-Mark vision interface. Built for Claude, works with any MCP-compatible host.
Stealth first. Uses
rebrowser-playwrightto patch theRuntime.EnableCDP leak that bypassesplaywright-extra-class stealth plugins. Passes modern bot-detection suites (CreepJS, bot.sannysoft.com) where vanilla Playwright fails.Token-lean by default.
browser_snapshotreturns Playwright aria snapshot YAML (~2–5 KB) instead of raw HTML (100KB+). Every interactive element carries a[ref=eN]id that actions consume directly — no selectors, no drift.Hybrid vision when it matters. Ask for
mode: "hybrid"and the server overlays numbered red boxes on the screenshot so the model can ground visually (Set-of-Mark prompting, Yang et al.). The ref ids on the image match the ids in the YAML. No parallel numbering scheme to go out of sync.Readability-based content extraction.
browser_scroll_readruns Mozilla Readability through JSDOM and returns clean Markdown — optionally delta-only, so re-reads cost nothing when nothing changed.Proxy-ready. Per-session proxy auth, useful with residential pools.
Authorized use only. Stealth tooling has legitimate applications (accessibility auditing, your-own-account automation, QA against sites you own or have permission to test). Do not use this server to violate a site's terms of service or applicable law. See SECURITY.md.
Install
npm install -g stealth-agent-browser-mcp
# Chromium binary is fetched automatically on first launch
npx playwright-core install chromiumOr run without install via npx stealth-agent-browser-mcp.
Related MCP server: browser-mcp
Quickstart (Claude Desktop / Claude Code / Cursor)
Add to your MCP config:
{
"mcpServers": {
"stealth-browser": {
"command": "npx",
"args": ["-y", "stealth-agent-browser-mcp"],
"env": {
"SAB_HEADLESS": "true",
"SAB_STEALTH_LEVEL": "patched"
}
}
}
}Restart the host. The agent will see the tools listed below.
Tools
Tool | Purpose |
| Navigate a URL and return a snapshot. |
|
|
| Click an element by its |
| Type into an input/textarea by ref. |
| Choose options in a |
| Scroll and return Readability Markdown (delta-only by default). |
| Wait for text or a ref to become visible. |
|
|
| Evaluate a JS expression in the page's MAIN world; JSON result. |
| Update single-proxy config (effective after |
| Replace residential proxy pool at runtime (effective after |
| Fallback captcha solver (CapSolver / 2Captcha). Detects Turnstile/hCaptcha/reCAPTCHA on the page. |
| Close + re-open the active browser session with current config. |
All action tools are addressed by the ref emitted in the last AOM snapshot. Refs are Playwright's own aria-ref=eN ids — there is no parallel numbering scheme.
Configuration
All via environment variables:
Var | Default | Notes |
|
|
|
|
|
|
| — | Single-proxy mode. e.g. |
| — | |
| — | Residential pool. Comma-separated URLs ( |
|
|
|
| — | Username template for sticky-IP providers. |
|
| Bezier-path click with pre-click hesitation. Defeats Datadome trajectory analysis. |
|
|
|
| — | Provider API key. |
| — | Persistent profile directory (cookies build reputation). |
|
| Per-action timeout. |
|
| Max labelled boxes in hybrid mode. |
|
| |
|
| |
|
| |
|
|
|
Architecture
src/
├── index.ts # Entry (stdio)
├── server.ts # MCP server + tool registration
├── tools.ts # Tool handlers
├── browser.ts # Stealth Chromium launcher (rebrowser-playwright)
├── session.ts # Per-connection browser/context/page state
├── snapshot.ts # AOM + Set-of-Mark pipeline
├── annotate.ts # SVG overlay compositing (sharp)
├── reader.ts # Readability → Markdown (pierces open shadow roots)
├── fingerprint.ts # Rotatable UA/viewport/timezone profiles
├── proxy.ts # Residential pool + rotation + sticky-session template
├── human-mouse.ts # Bezier-curve cursor paths (ghost-cursor math)
├── captcha.ts # CapSolver / 2Captcha REST adapters
├── config.ts # Zod-validated env config
└── logger.ts # pino → stderr (never stdout)All logs go to stderr — stdout is reserved for JSON-RPC. Never add console.log.
TLS / JA3 fingerprint — why there is no Node-layer spoofer here
A common ask for scrapers is: "spoof the TLS ClientHello (JA3) to look like Chrome, via curl-impersonate or node-tls-client."
That applies to Node-layer HTTP scrapers (fetch, got, axios) where the TCP connection originates from Node's OpenSSL, which emits a ClientHello signature distinct from Chrome's BoringSSL — and Cloudflare / Akamai Bot Manager drop it at the network layer before a single byte of JavaScript runs.
This MCP does not have that architecture. Every request exits through Chromium. Chromium's TLS stack is Chrome's TLS stack (literally the same BoringSSL build), so the ClientHello JA3 is Chrome's JA3 by construction. No JS-level rewriting is possible or necessary.
The one place TLS can still betray you is if you route through a proxy that terminates and re-initiates TLS (MITM). Residential proxy providers (Bright Data, DataImpulse, Oxylabs residential, SOAX) route at TCP — they do not MITM TLS — and the Chromium handshake reaches the origin unmodified. The products that do MITM TLS are managed scraping browsers (Bright Data's Scraping Browser, Oxylabs Web Unblocker), which ship their own headless Chrome and replace this MCP rather than layering on top of it.
Bottom line: with rebrowser-playwright + residential pool (P1) + human mouse (P2), the TLS fingerprint, CDP runtime, DOM surface, and behavioral layer all match real Chrome. Captcha solving (P3) is a fallback for the 1–5% of sessions that still get flagged.
Benchmarks
npm run bench:stealth launches the configured browser against public bot-detection test pages (bot.sannysoft.com, CreepJS, pixelscan, BrowserLeaks WebRTC) and reports pass/fail. These are the same harnesses used by the rebrowser-patches and Patchright projects — see rebrowser-bot-detector for the reference suite.
Typical local-fixture test run (see test/):
Test | Result |
AOM YAML contains refs for all interactive elements | ✓ |
| ✓ |
| ✓ |
Readability extracts article to Markdown | ✓ |
Delta-only scroll returns | ✓ |
Comparison
stealth-agent-browser-mcp | ||||
CDP-level stealth (Cloudflare/DataDome) | ✓ | ✗ | partial | ✗ |
Accessibility-tree snapshots | ✓ | ✓ | ✓ | ✗ |
Set-of-Mark vision (ref-labeled screenshot) | ✓ | ✗ | ✗ | pure vision |
Readability-based scroll-and-read | ✓ | ✗ | ✗ | ✗ |
Token-lean by default | ✓ | ✓ | ✗ | ✗ |
Bundled agent loop | ✗ (host's model drives) | ✗ | ✓ | ✗ |
Development
npm install
npx playwright-core install chromium
npm run build
npm testContributing
See CONTRIBUTING.md. All contributions under Apache-2.0.
License
Available Tools
13 toolsbrowser_clickB
Click an element addressed by its ref. When SAB_HUMAN_MOUSE=true (default), the cursor travels via a Bezier path with pre-click hesitation — this defeats trajectory analyzers like Datadome that flag teleporting mice.
Inputs: ref (required), button, clickCount.
browser_evalA
Evaluate a JS EXPRESSION in the page's MAIN execution world. Observable by page scripts; use sparingly. Prefer AOM + action tools.
Inputs: expression (required).
browser_restartA
Close the active browser session and start a fresh one with the current config. Required after 'browser_set_proxy' to actually route new requests through the proxy.
Inputs: no named parameters.
browser_scroll_readA
Scroll and return a Readability-extracted Markdown view. With deltaOnly=true, returns '(no change)' if nothing new became visible — keeps context windows lean.
Inputs: pixels, deltaOnly, direction.
browser_selectC
Select one or more options in a addressed by ref.
Inputs: ref (required), values (required).
browser_set_proxyB
Update the proxy config. Call 'browser_restart' after this for the change to take effect (browser-level constraint — an existing context cannot be re-routed).
Inputs: server, password, username.
browser_set_proxy_poolA
Replace the residential proxy pool at runtime. Takes effect on the next 'browser_restart'. Supports sticky sessions via SAB_PROXY_STICKY_TEMPLATE.
Inputs: pool, rotation.
browser_snapshotA
Take a snapshot of the current page. 'aom' returns the accessibility YAML (token-lean); 'hybrid' adds a Set-of-Mark screenshot with numeric red boxes matching each ref.
Inputs: mode.
browser_solve_captchaB
Fallback captcha solver. Detects Turnstile/hCaptcha/reCAPTCHA on the current page (or takes an explicit sitekey), submits to the configured provider (CapSolver or 2Captcha per SAB_CAPTCHA_PROVIDER + SAB_CAPTCHA_API_KEY), polls for a token, and injects it into the widget's response field.
Inputs: type, pageUrl, sitekey.
browser_tabsC
Manage browser tabs: list, new, close, switch.
Inputs: action (required), url, index.
browser_typeB
Type into an input or textarea addressed by ref.
Inputs: ref (required), text (required), clear, submit.
browser_wait_forB
Wait until either some text appears on the page or a given ref resolves to a visible element.
Inputs: ref, text, timeoutMs.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct action: scrolling, waiting, navigation, snapshot, clicking, typing, selecting, tab management, JS evaluation, proxy configuration, and captcha solving. No overlapping purposes.
Tools consistently use the browser_ prefix with verb or verb+noun patterns (e.g., browser_navigate, browser_set_proxy). The exception is browser_tabs (noun) which deviates slightly but remains clear.
13 tools cover the core browser automation tasks without being excessive. Each tool has a clear role, and the count is well-scoped for the server's purpose.
Covers navigation, interaction, proxy management, and captcha solving comprehensively. Minor gaps exist, such as missing back/forward navigation or visual screenshot (snapshot returns AOM only), but most workflows are supported.
Maintenance
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to automate browser testing via Chromium, providing tools for navigation, interaction, and inspection.-
- AlicenseAqualityDmaintenanceAgent-native browser control MCP server that enables AI agents to browse and interact with web pages via accessibility tree snapshots and ref ID-based commands.152MIT
- AlicenseAqualityCmaintenanceBrowser automation MCP server that uses a real browser to give agents eyes and hands—open pages, click, fill, screenshot, and run scripts via accessibility-tree snapshots.2219 npmMIT
- FlicenseBqualityBmaintenanceMCP server that enables AI agents to drive your real, logged-in browser via accessibility snapshots, with hardened credential brokering and local workflow memory.5355 npm-