real-browser-mcp-server
Summary: This MCP server gives AI agents a stealth-hardened (Patchright/Playwright) browser they can drive end-to-end β navigating, clicking, typing, extracting, recording traffic, and capturing screenshots β with anti-bot evasion, ad-blocking, and human-like input.
Browser session control:
browser_init(headless toggle, proxy, coherent fingerprint profiles, video recording, WebRTC leak protection, ad blocker, AI selector healing) andbrowser_close.Navigation & tabs:
navigatewith wait conditions, retries, tab list/switch/new/close, popup auto-switch, and optional Cloudflare/WAF challenge waiting.Human-like interaction:
click(incl. drag-and-drop, iframes, hover, video player API),type,press_keywith modifiers,random_scrollwith lazy-load triggering,solve_captchafor forms/embedded verification widgets, andexecute_js(page JS or session-authenticated HTTP fetch).Content extraction:
get_content(html/text/markdown/rawHttp/elements, save to disk),extract_data(regex, JSON/JSONPath, meta tags, API discovery, links across iframes), andmedia_extractor(video/audio/HLS/DASH URLs, iframe listing, playback control, URL decoding, batch jobs).Network & traffic:
redirect_tracer(HTTP/JS/meta-refresh chains) andnetwork_recorder(capture XHR/WebSocket/GraphQL, HAR export, block URL patterns, mock API responses).Analysis & storage:
deep_analysis(DOM, scripts, technologies, SEO, performance, access-control detection) andstorage_inspector(cookies, localStorage/sessionStorage, IndexedDB, service workers, encrypted session save/load).Vision & multi-step automation:
see_pagereturns a screenshot plus page text and annotated interactive element map, and can run a chainedsteps[]sequence (click/type/scroll/drag/hover/wait/extract) in one call, with before/after captures and baseline diffing.Background jobs & waiting:
wait(selector/navigation/networkidle/timeout) andasync_jobto poll, list, or cancel long-running tasks dispatched withasync: true(up to 10 minutes, avoiding MCP client timeouts).
Assists with Cloudflare Turnstile challenges on pages the user is authorized to access, enabling automated handling of bot-check prompts.
Integrates Ghostery's ad and tracker blocking engine to block ads and trackers during browsing, reducing distractions and improving page load times.
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., "@real-browser-mcp-server Open https://news.ycombinator.com and summarize the top 3 Hacker News stories"
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.
π¦ Real Browser MCP
A production-ready Model Context Protocol (MCP) server that equips AI agents with a reliable, controlled, and undetectable web browser for automation, scraping, and testing. Built on Patchright (a stealth-hardened Playwright fork) and integrated with Ghostery Adblocker, Ghost Cursor (natural human mouse dynamics), Web Worker Consistency, and an advanced automated solver for Cloudflare Turnstile & WAF Managed Challenges.
This server is 100% compatible with all major AI IDEs and clients (Cursor, Antigravity, Claude Desktop, VS Code, Cline, Roo Code, Windsurf, PearAI, OpenCode, and Kilo Code) using standard STDIO communication.
π See POLICY.md for acceptable use guidelines. This tool is intended for QA, testing, accessibility automation, and authorized research.
βοΈ Installation & Setup
Since this project is published on NPM as real-browser-mcp-server, you can run it instantly via npx, install it globally via npm, or build from source.
β‘ Quick Start (Recommended via npx)
Add the following to your AI client's MCP configuration file (e.g. claude_desktop_config.json, cline_mcp_settings.json, or Cursor):
{
"mcpServers": {
"real-browser": {
"command": "npx",
"args": ["-y", "real-browser-mcp-server@latest", "mcp"],
"env": {
"HEADLESS": "false",
"AI_HEALING": "true",
"TURNSTILE": "true"
}
}
}
}π Global Installation
Install globally on your system. The hardened browser (Patchright Chromium) is automatically downloaded during installation:
# 1. Install globally (auto-downloads matching Patchright Chromium)
npm install -g real-browser-mcp-server
# 2. Run the MCP server
real-browser-mcp mcp
# Or check all registered tools
real-browser-mcp --listThepostinstall step automatically runs patchright install chromium, which detects your OS and CPU architecture (Windows / Linux / macOS Γ x64 / arm64) and fetches the correct browser binary. If auto-download is skipped (e.g., in air-gapped or CI environments), run:
npx patchright install chromiumTo skip browser binary download during package builds, set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1.
π οΈ Local Development & Build (From Git Source)
To clone, develop, or run locally:
# 1. Clone the repository
git clone https://github.com/codeiva11/Real-Browser-Mcp.git
# 2. Navigate to project root
cd Real-Browser-Mcp
# 3. Install dependencies (Chromium binary auto-downloads via postinstall)
npm install
# 4. Build TypeScript to dist/ and generate ESM wrappers
npm run build
# 5. Launch MCP Server
npm run mcpRunning Local Build in MCP Config:
{
"mcpServers": {
"real-browser-local": {
"command": "node",
"args": [
"<path-to-repository>/Real-Browser-Mcp/dist/src/index.js",
"mcp"
],
"env": {
"HEADLESS": "false",
"AI_HEALING": "true"
}
}
}
}π³ Run via Docker (For Headless & Server Environments)
A production-ready Docker container is published to the GitHub Container Registry (GHCR):
# Pull the latest image
docker pull ghcr.io/codeiva11/real-browser-mcp:latest
# Run the MCP Server in interactive stdio mode
docker run -i --rm ghcr.io/codeiva11/real-browser-mcp:latestRelated MCP server: cloakbrowser-mcp
π Key Automation & Stealth Features
Undetectable Patchright Engine: Built on hardened Patchright Chromium that strips CDP runtime evaluation markers, eliminates
navigator.webdriver, preserves third-party storage partitioning, and normalizes Client Hints.Worker & Context Consistency: Guarantees that
navigator.languages, user agents, and hardware concurrency align 100% between the main page window and background Web Workers (passing Rebrowser consistency tests without discrepancy).Native Popup Blocking Emulation: Mimics authentic Chrome popup blocking by returning
nullon untrusted script-initiatedwindow.opencalls while preserving real user click navigation.Turnstile & WAF Managed Challenge Assistant: Automatically detects and assists with Cloudflare Turnstile checkboxes and WAF challenges on authorized pages, tracking dimensions, debouncing clicks, and verifying navigation.
Ghost Cursor & Physics Scrolling: Uses ghost-cursor-patchright (BΓ©zier curves) for human-like cursor velocity, overshoot, and hover behaviors, plus 60FPS Cubic Ease-Out smooth scrolling (
page.realScroll).Integrated Ad & Tracker Blocker: In-memory prebuilt filter lists via
@ghostery/adblocker-playwrightblock advertising scripts, cookie modals, and tracking beacons without disk overhead.Unified Single-Shot Vision (
see_page): Returns a screenshot, parsed page text, interactive element selectors, and iframe inventory in one call. Supports multi-step action sequences (steps[]) to execute complex tasks continuously without LLM latency pauses.Long-Running Async Jobs (
async_job): Long operations (batch extraction, multi-step navigation) can run in the background withasync: trueto prevent MCP client 60s watchdog timeouts.AI Healing Selectors: Automatically detects and attempts alternative selector heuristics if dynamic CSS classes shift.
Clean Process & State Isolation: State guards prevent memory leaks; caches and recordings write strictly to OS temp storage, keeping your repository clean.
π οΈ AI IDE & Client Configuration Guide
Since this server adheres strictly to the official Model Context Protocol (MCP) over STDIO (with all diagnostic logs routed to stderr), it connects smoothly to every modern AI IDE:
1. Claude Desktop
Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"real-browser": {
"command": "npx",
"args": ["-y", "real-browser-mcp-server@latest", "mcp"],
"env": {
"HEADLESS": "false",
"AI_HEALING": "true",
"TURNSTILE": "true"
}
}
}
}2. Cursor IDE
Open Cursor Settings β Features β MCP Servers.
Click + Add New MCP Server.
Fill in:
Name:
real-browserType:
commandCommand:
npx -y real-browser-mcp-server@latest mcp
Click Save.
3. Google Antigravity / Windsurf / Cline / Roo Code
Add to your client's MCP configuration file (e.g. mcp_config.json or cline_mcp_settings.json):
{
"mcpServers": {
"real-browser": {
"type": "stdio",
"command": "npx",
"args": ["-y", "real-browser-mcp-server@latest", "mcp"],
"env": {
"HEADLESS": "false",
"AI_HEALING": "true"
},
"disabled": false,
"autoApprove": []
}
}
}4. Kilo Code (VS Code Extension)
In ~/.config/kilo/kilo.jsonc (or project kilo.jsonc):
{
"mcp": {
"real_browser_mcp_server": {
"type": "local",
"command": ["npx", "-y", "real-browser-mcp-server@latest", "mcp"],
"environment": {
"HEADLESS": "false",
"AI_HEALING": "true"
},
"enabled": true
}
}
}π Complete MCP Tool Reference (19 Registered Tools)
The server exposes 19 specialized tools across 8 functional categories:
π 1. Browser & Session Management (2 Tools)
Tool Name | Description | Key Parameters |
| Initialize or reconfigure a Patchright browser session with ad blocking, AI healing, fingerprint profiles, and WebRTC guards. |
|
| Gracefully shut down browser session and release active system handles. |
|
π§ 2. Navigation & Tabs (1 Tool)
Tool Name | Description | Key Parameters |
| Navigate to URL or manage tabs ( |
|
π 3. Natural Human Interaction (6 Tools)
Tool Name | Description | Key Parameters |
| Natural click or drag-and-drop ( |
|
| Natural typing with human-like keystroke intervals, smart clearing, and iframe support. |
|
| Form and embedded verification widget assistant for authorized page testing. |
|
| Natural scrolling with lazy-load trigger detection and physics-based easing. |
|
| Keyboard key combination press with modifiers (Control, Shift, Alt, Meta). |
|
| Execute JavaScript in page context, or execute session-replayed HTTP fetch calls. |
|
π 4. Extraction & Content (3 Tools)
Tool Name | Description | Key Parameters |
| Retrieve page content formatted as |
|
| Extract structured data using regular expressions, JSON extraction, meta tags, or link discovery. |
|
| Detect, extract, and control video/audio playback streams (HLS, DASH, MP4). |
|
π‘ 5. Network & Traffic Control (2 Tools)
Tool Name | Description | Key Parameters |
| Trace complete HTTP 301/302, JavaScript, and meta-refresh redirect chains. |
|
| Capture and inspect HTTP/WebSocket traffic, export HAR archives, block unwanted asset patterns, and mock API endpoints. |
|
π§ 6. Deep Analysis & Storage (2 Tools)
Tool Name | Description | Key Parameters |
| Deep inspection of DOM hierarchy, scripts, technologies, SEO meta, web vitals, and console error logs. |
|
| Inspect and manage cookies, localStorage, sessionStorage, IndexedDB, and encrypted state files. |
|
ποΈ 7. AI Vision & Multi-Step Task Runner (1 Tool)
Tool Name | Description | Key Parameters |
| Single-Shot Visual & Task Engine: Captures full-page/viewport screenshot + page text + element selectors in one call. Execute an entire sequence of actions continuously via |
|
π οΈ 8. Utilities & Background Processing (2 Tools)
Tool Name | Description | Key Parameters |
| Smart wait for selectors, navigation lifecycle events, or fixed duration timers. |
|
| Poll status or cancel background jobs dispatched with |
|
βοΈ Environment Variables
Configure default behavior globally from your MCP client's env block:
Variable | Values | Default | Description |
|
|
| Run browser in headless mode or visible window |
|
|
| Auto-repair broken CSS selectors in |
|
|
| Block ads, tracking trackers, and cookie notices |
|
|
| Auto-assist with Cloudflare Turnstile & WAF challenges |
|
|
| Allow targeting localhost and private intranet IPs (SSRF protection) |
| milliseconds |
| Hard watchdog budget per tool execution |
| milliseconds |
| Budget for background |
| milliseconds |
| Hold delay for visual inspection during test suite runs |
|
|
| Logging verbosity on |
π‘οΈ Anti-Bot Detection Verification Matrix
Real-Browser-MCP is rigorously tested against industry-standard detection test suites:
Target Detector | Signal Evaluated | Status |
Rebrowser Bot Detector | CDP leak, runtime evaluate, worker consistency & popup blocking | π’ 100% Passed (All Green) |
Sannysoft WebDriver |
| π’ 100% Passed |
Cloudflare WAF | Managed Challenge & interactive human verification | π’ 100% Passed (Redirects in 13β22s) |
Cloudflare Turnstile | Embedded Turnstile iframe resolution & token delivery | π’ 100% Passed |
reCAPTCHA v3 Score | Behavioral score evaluation | π’ 100% Passed (Score β₯ 0.9) |
Pixelscan Fingerprint | Canvas/WebGL consistency & font coherence | π’ 100% Passed (No Masking Detected) |
Pixelscan Bot Check | Automation framework detection heuristics | π’ 100% Passed |
π» Programmatic Usage (Node.js SDK)
You can also import and use the real browser engine directly in your JavaScript / TypeScript projects:
CommonJS (CJS)
const { connect } = require('real-browser-mcp-server');
(async () => {
const { browser, page } = await connect({
headless: false,
turnstile: true
});
await page.goto('https://example.com');
await page.realClick('#my-button');
await page.realScroll(500); // 60FPS physics smooth scroll
await browser.close();
})();ECMAScript Modules (ESM)
import { connect } from 'real-browser-mcp-server';
const { browser, page } = await connect({
headless: false,
turnstile: true
});
await page.goto('https://example.com');
await page.realClick('#my-button');
await browser.close();β¨οΈ NPM Script Commands
Command | Purpose |
| Launch the MCP server over standard STDIO transport. |
| Launch the MCP server. |
| Launch the MCP server with verbose tool catalog output on |
| Print all 19 registered MCP tools with categories. |
| Compile TypeScript ( |
| Run the full test suite across both CJS and ESM (14 tests total). |
| Run CommonJS test suite with smart adaptive inspection delay. |
| Run ESM test suite with smart adaptive inspection delay. |
π‘οΈ License
This project is licensed under the ISC License. Developed and maintained by codeiva11.
Available Tools
19 toolsasync_jobA
Poll or cancel background jobs started with async:true on media_extractor batch_extract, see_page steps, or execute_js. Read-only except cancel.
Inputs: jobId, action.
browser_closeA
Close the browser session and release all browser resources.
Inputs: force.
browser_initA
Initialize a browser session with configurable options: headless mode, proxy, viewport, video recording, resource filtering, WebRTC leak protection, and coherent fingerprint profiles. Automatically recovers stale sessions.
Inputs: proxy, headless, aiHealing, fingerprint, +6 more.
clickA
Click or drag a page element by CSS selector or annotation ID. Supports drag-and-drop / slider manipulation via dragTo, iframe context, hover before click, video player API, and automatic retry with fallback selectors.
Inputs: delay, aiHeal, dragTo, iframe, +17 more.
deep_analysisA
Inspect the current page in depth: DOM structure, scripts, stylesheets, accessibility, performance metrics, SEO tags, response headers, loaded technologies, and content-loading strategy recommendations.
Inputs: detailed, aiInsights, detectAccessControls.
execute_jsA
Execute custom JavaScript in the page context with async support, return value capture, and iframe targeting. Also supports action="fetch" to replay HTTP requests with the page session (cookies/auth inherited, 30s timeout, structured status/headers/body output).
Inputs: url, body, code, async, +8 more.
extract_dataB
Extract structured data from the current page in multiple modes: regex, json, meta, structured, auto, apiDiscovery, parse (string conversion), transform (data format conversion), or links (all links including nested iframes).
Inputs: type, flags, types, source, +10 more.
get_contentB
Get page content in multiple formats: html, text, markdown, rawHttp, or elements. Extracts text, attributes, or bounding box coordinates. Can save directly to a file.
Inputs: text, xpath, format, saveAs, +7 more.
media_extractorB
Extract and control media from the current page. Supports 6 actions: extract (find video/audio/HLS/DASH/download URLs including nested iframes), list_iframes, switch_iframe, player_control (play/pause/seek/sources via player API), decode_url (inspect converted string and token formats), batch_extract.
Inputs: deep, urls, async, index, +11 more.
network_recorderB
Record, inspect, and control network activity. Supports 14 actions: start, stop, get, clear, get_media, get_navigations, get_api_calls, get_intercepted_apis, get_websockets, get_graphql, export_har, block_urls (block images/trackers to boost speed 3x-5x), mock_route (intercept & mock API responses), clear_routes.
Inputs: mock, limit, action, filter, +4 more.
press_keyC
Press keyboard keys with configurable modifier keys, repeat count, and keystroke delay.
Inputs: key (required), count, modifiers, humanDelay.
random_scrollA
Scroll the page with configurable direction, amount, and automatic lazy-load triggering.
Inputs: amount, iframe, smooth, direction, +2 more.
redirect_tracerA
Trace the complete redirect chain of a URL. Tracks HTTP 301/302, JavaScript navigation (window.location, setTimeout), and meta refresh tags. Returns the full path with status codes and headers.
Inputs: url (required), timeout, followJS, decodeURLs, +3 more.
see_pageA
Capture a snapshot of the current page. Returns a screenshot image together with optional full-page text, an interactive element map (buttons, links, inputs with position and selector), and an iframe inventory β all in a single call.
Workflow: Call once with fullPage:true and annotate:true. From that snapshot, run all planned actions (click, type, scroll, wait, extract) as a steps array without re-capturing the page. Call see_page again only when the page genuinely changes (new navigation, modal, or dynamic content load).
Inputs: path, async, steps, format, +15 more.
solve_captchaB
Automate form completion and interactive widget verification on web pages. Supports JavaScript-based challenge widgets, image text transcription, and intelligent form field mapping for QA and automated browsing workflows.
Inputs: lang, type, iframe, submit, +15 more.
storage_inspectorA
Inspect and manage client-side storage & sessions. Supports 7 actions: cookies (get all current cookies), save_session (persist cookies & storage state to file), load_session (restore state from file without re-logging), clear_cookies, autosave (auto-save session on every navigation), indexeddb, service_workers.
Inputs: action, enabled, passphrase, sessionPath.
typeB
Type text into an input field with configurable keystroke delay, field clearing, and iframe support.
Inputs: text (required), clear, delay, aiHeal, +6 more.
waitB
Wait for a selector, navigation event, networkidle state, or a fixed timeout before continuing.
Inputs: type, value, timeout.
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 have distinct, well-bounded roles (click, type, navigate, wait, browser_close), but there is a cluster of five overlapping page-inspection tools: get_content, extract_data, see_page, deep_analysis, and execute_js all retrieve page data with partially intersecting modes (html/text/markdown, element maps, iframe inventories, structured extraction). solve_captcha also blurs into click/type territory with its vague 'form completion and interactive widget verification' description, and redirect_tracer overlaps with navigate. Descriptions help an agent choose, but the boundaries require careful reading.
All names are lowercase snake_case with no style mixing, which is highly readable and predictable. However, the convention is not strictly verb_noun: it blends imperative verbs (navigate, wait, click, type, execute_js) with noun-style tool names (network_recorder, media_extractor, storage_inspector, redirect_tracer, deep_analysis), so the pattern is consistent in format but not in grammatical form.
Nineteen tools is on the heavy side for a browser server, but the domain genuinely spans navigation, input, extraction, network, storage, media, captcha, and async jobs. Several tools are wisely consolidated as multi-action mega-tools (network_recorder with 14 actions, media_extractor with 6, storage_inspector with 7), which keeps the count from exploding. The only mild redundancy is the page-inspection cluster, which arguably could be fewer tools.
The surface is unusually complete for browser automation: session lifecycle, navigation/tabs, input, scrolling, waiting, content extraction, screenshots, network recording/mocking, storage/session persistence, media extraction, redirect tracing, captcha solving, and async job polling are all covered. Minor gaps remain: no explicit file upload, select/option handling, browser dialog (alert/confirm) handling, or download capture, and history back/forward is only implied through navigate.
Maintenance
Related MCP Connectors
Browser agents and stealth cloud browsers for AI: run web tasks, fill forms, extract data.
Cloud browsers for AI agents: saved logins, residential IPs, live human takeover, 57 browser tools.
Undetectable cloud browser sessions for AI agents and scrapers. Navigate, extract, click, captcha.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
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
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to run Playwright-compatible browser automation against Chromium with persistent profiles, proxy matching, humanized interactions, and npm, Docker, stdio, or Streamable HTTP deployment.297 npmMIT
- 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
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to perform Playwright-compatible browser automation through unchanged upstream tools, using a Chromium runtime with persistent profiles, proxy matching, humanized interactions, and Docker or stdio/Streamable HTTP deployment options.297 npmMIT