Skip to main content
Glama
real-browser-mcp-server
by codeiva11

🦁 Real Browser MCP

npm version Node.js Version Build & Test License: ISC

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.

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 --list
NOTE

Thepostinstall 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 chromium

To 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 mcp

Running 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:latest

Related 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 null on untrusted script-initiated window.open calls 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-playwright block 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 with async: true to 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

  1. Open Cursor Settings βž” Features βž” MCP Servers.

  2. Click + Add New MCP Server.

  3. Fill in:

    • Name: real-browser

    • Type: command

    • Command: npx -y real-browser-mcp-server@latest mcp

  4. 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

browser_init

Initialize or reconfigure a Patchright browser session with ad blocking, AI healing, fingerprint profiles, and WebRTC guards.

headless, proxy, enableBlocker, aiHealing, widgetAssist, spoofFingerprint, blockWebRTCLeaks

browser_close

Gracefully shut down browser session and release active system handles.

force

🧭 2. Navigation & Tabs (1 Tool)

Tool Name

Description

Key Parameters

navigate

Navigate to URL or manage tabs (list, switch, new, close). Supports auto-switch on popups and waitForChallenge for Cloudflare interstitial challenges.

url, tabAction, tabIndex, autoSwitchNewTab, waitUntil, timeout, waitForChallenge, challengeTimeout

πŸ‘† 3. Natural Human Interaction (6 Tools)

Tool Name

Description

Key Parameters

click

Natural click or drag-and-drop (dragTo) using BΓ©zier curve movements, hover-first, and iframe support.

selector, annotationId, dragTo, humanLike, hoverFirst, iframe, autoDetectPlayer

type

Natural typing with human-like keystroke intervals, smart clearing, and iframe support.

selector, annotationId, text, clear, pressEnter, iframe

solve_captcha

Form and embedded verification widget assistant for authorized page testing.

type, captchaSelector, formData, submit, preferTextFallback

random_scroll

Natural scrolling with lazy-load trigger detection and physics-based easing.

direction, amount, smooth, aiDetectLazyLoad, iframe, iframeSelector

press_key

Keyboard key combination press with modifiers (Control, Shift, Alt, Meta).

key, modifiers, count

execute_js

Execute JavaScript in page context, or execute session-replayed HTTP fetch calls.

code, action, url, method, headers, body, async, iframe

πŸ“„ 4. Extraction & Content (3 Tools)

Tool Name

Description

Key Parameters

get_content

Retrieve page content formatted as html, text, markdown, rawHttp, or structured elements.

format, selector, xpath, saveAs

extract_data

Extract structured data using regular expressions, JSON extraction, meta tags, or link discovery.

type, pattern, source, transformKey

media_extractor

Detect, extract, and control video/audio playback streams (HLS, DASH, MP4).

action, types, quality, playerAction

πŸ“‘ 5. Network & Traffic Control (2 Tools)

Tool Name

Description

Key Parameters

redirect_tracer

Trace complete HTTP 301/302, JavaScript, and meta-refresh redirect chains.

url, maxRedirects, decodeURLs

network_recorder

Capture and inspect HTTP/WebSocket traffic, export HAR archives, block unwanted asset patterns, and mock API endpoints.

action, patterns, mock, captureXhrBody

🧠 6. Deep Analysis & Storage (2 Tools)

Tool Name

Description

Key Parameters

deep_analysis

Deep inspection of DOM hierarchy, scripts, technologies, SEO meta, web vitals, and console error logs.

types, detailed, detectAccessControls, includeWebPerf, includeConsole

storage_inspector

Inspect and manage cookies, localStorage, sessionStorage, IndexedDB, and encrypted state files.

action, sessionPath, passphrase, enabled

πŸ‘οΈ 7. AI Vision & Multi-Step Task Runner (1 Tool)

Tool Name

Description

Key Parameters

see_page

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 steps[] (click, type, hover, scroll, wait, extract) without repetitive roundtrips.

fullPage, annotate, includePageText, scanIframes, steps[], captureBefore, captureAfter, stopOnError

πŸ› οΈ 8. Utilities & Background Processing (2 Tools)

Tool Name

Description

Key Parameters

wait

Smart wait for selectors, navigation lifecycle events, or fixed duration timers.

type, value, timeout

async_job

Poll status or cancel background jobs dispatched with async: true (budget up to 10 minutes without MCP timeouts).

action, jobId


βš™οΈ Environment Variables

Configure default behavior globally from your MCP client's env block:

Variable

Values

Default

Description

HEADLESS

true / false

false (desktop) / true (CI)

Run browser in headless mode or visible window

AI_HEALING

true / false

true

Auto-repair broken CSS selectors in click/type

ENABLE_BLOCKER

true / false

true

Block ads, tracking trackers, and cookie notices

TURNSTILE

true / false

false

Auto-assist with Cloudflare Turnstile & WAF challenges

REAL_BROWSER_ALLOW_PRIVATE_NETWORK

true / false

false

Allow targeting localhost and private intranet IPs (SSRF protection)

REAL_BROWSER_TOOL_TIMEOUT_MS

milliseconds

120000

Hard watchdog budget per tool execution

REAL_BROWSER_JOB_TIMEOUT_MS

milliseconds

600000

Budget for background async_job executions (10 minutes)

INSPECT_DELAY_MS

milliseconds

0 (smart auto)

Hold delay for visual inspection during test suite runs

REAL_BROWSER_LOG_LEVEL

debug / info / warn / error

info

Logging verbosity on stderr


πŸ›‘οΈ 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

navigator.webdriver, chrome runtime, permissions, plugins

🟒 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

npm start

Launch the MCP server over standard STDIO transport.

npm run mcp

Launch the MCP server.

npm run mcp:verbose

Launch the MCP server with verbose tool catalog output on stderr.

npm run list

Print all 19 registered MCP tools with categories.

npm run build

Compile TypeScript (tsc) and generate CJS & ESM distributions.

npm test

Run the full test suite across both CJS and ESM (14 tests total).

npm run cjs_test

Run CommonJS test suite with smart adaptive inspection delay.

npm run esm_test

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 tools
async_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

    B3.4/5.0

    Scored across 19 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Stealth browser automation for AI agents, using source-patched Chromium to bypass bot detection systems like Cloudflare, reCAPTCHA, and FingerprintJS.
      28
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables 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 npm
      MIT