Skip to main content
Glama
Capmonster MCP Browser Automation

Capmonster MCP Browser Automation

Official

capmonster-mcp-patchright: Stealth Browser MCP Server for AI Agents

Building an AI agent that has to work on anti-bot protected sites? Pair this stealth browser with the CapMonster Cloud MCP server, a cost-effective capsolver alternative and 2captcha alternative: reCAPTCHA v3 starts at $0.90 per 1,000 solves, which is up to 38% cheaper than 2Captcha and 10% cheaper than Capsolver. See the pairing example and the comparison below.

Stealth browser MCP server for AI agents — 66 tools, Patchright-powered, reduced CDP automation signals.

Built for automation on sites protected by Cloudflare, Akamai, Kasada and DataDome. When the page shows a CAPTCHA, pair it with the CapMonster Cloud MCP server: this server drives the browser, CapMonster Cloud solves the CAPTCHA. Use the 66 browser_* tools for AI-agent web scraping and browser automation with Claude, GPT and other MCP clients, powered by Patchright, a patched Playwright with reduced automation signals. Learn more

👉 Get your CapMonster Cloud API Key


Fork of mcp-patchright that adds a per-call world: "main" option to browser_evaluate / browser_run_code_unsafe, so page-defined window globals are visible and callable. Defaults to Patchright's isolated stealth world (matching upstream); opt into main only when a page's own script needs to see or be called by your evaluated code. Everything else matches upstream mcp-patchright.

Why Patchright, not Playwright?

Playwright

Patchright

Runtime.enable

✅ sends (detectable)

❌ removed

Console.enable

✅ sends

❌ removed

--enable-automation flag

✅ present

❌ removed

navigator.webdriver

true

false / undefined

Anti-bot evasion

❌

✅

See the full comparison for details.

Related MCP server: Real Browser MCP

Quick start

npm i -g capmonster-mcp-patchright
capmonster-mcp-patchright --port 9321 --host 127.0.0.1

With Claude / GPT / agents

{
  "mcpServers": {
    "patchright": {
      "command": "npx",
      "args": ["capmonster-mcp-patchright", "--port", "9321", "--host", "127.0.0.1"]
    }
  }
}

🔗 Pair with CapMonster Cloud MCP for captcha solving

This server drives the browser; the CapMonster Cloud MCP server solves the CAPTCHA and the agent injects the token back into the page. Add both servers to your MCP client config:

{
  "mcpServers": {
    "patchright": {
      "command": "npx",
      "args": ["capmonster-mcp-patchright", "--port", "9321", "--host", "127.0.0.1"]
    },
    "capmonster": {
      "command": "uvx",
      "args": ["capmonster-mcp"],
      "env": {
        "CM_API_KEY": "your_api_key_here"
      }
    }
  }
}

Get your key from the CapMonster Cloud Dashboard.

Captcha solving MCP servers compared

Parameter

CapMonster Cloud MCP

CapSolver MCP

2Captcha mcp-captcha-solver

Captcha types available through MCP

reCAPTCHA v2 / v2 Enterprise / v3, Cloudflare Turnstile and Challenge, FunCaptcha, GeeTest v3 / v4, AWS WAF, DataDome, Imperva, TSPD, Binance, Prosopo, Yidun, TenDI, Hunt, Altcha, Basilisk, image tasks

reCAPTCHA v2, reCAPTCHA v3, Cloudflare Turnstile

reCAPTCHA v2

reCAPTCHA v3 price per 1,000 solves (from)

$0.90

$1.00

$1.45

Disclaimer: CapSolver and 2Captcha are trademarks of their respective owners. CapMonster Cloud is not affiliated with these entities. MCP coverage of other services is based on their publicly available documentation and repositories as of 27.10.2026 and may change. Pricing comparisons are based on publicly available data and internal benchmarking conducted on 27.09.2026.

Features

  • 66 MCP tools — full browser automation surface

  • world: "main" opt-in — browser_evaluate / browser_run_code_unsafe can run in the page's real world to see/call page-defined globals (default stays isolated/stealth)

  • browser_find — search the current aria snapshot for text/regex, cheaper than a full browser_snapshot

  • browser_save_blob — save a Blob/data URL produced by page code to disk

  • 3 transports — stdio, SSE, Streamable HTTP (/mcp)

  • Persistent profiles — real Chrome profile, reuse across sessions

  • Multi-page — tab management (new, list, switch, close)

  • Owner-scoped HTTP sessions — isolate tabs per caller with owner query/header

  • CDP attach — control an already-running Chrome

  • Network tracking + interception — request list/detail, offline toggle, block/mock routes

  • Session import/export — browser_storage_save / browser_storage_load (cookies + localStorage)

  • Granular storage — per-key cookie / localStorage / sessionStorage CRUD (browser_cookie_*, browser_localstorage_*, browser_sessionstorage_*)

  • Authenticated API requests — browser_api_request reuses session cookies (hybrid scraping)

  • Text/HTML extraction — browser_get_visible_text / _html (token-light)

  • Iframe-aware — pass frameSelector to any element tool (click/fill/type/hover/press/wait_for/select/drag) to act inside an iframe

  • PDF export — browser_save_pdf via CDP (works in headed/stealth mode)

  • Video recording — browser_start with recordVideo, browser_video_save; .webm flushed on browser_close

  • Element highlight — browser_highlight / browser_hide_highlight overlays for screenshots & recordings

  • Stealth profiles — proxy / geolocation / locale / timezone / colorScheme

  • Console capture — real-time console message stream

  • Fingerprint check — browser_fingerprint_check diagnostics

  • Virtual passkeys — create, import, list, and delete WebAuthn credentials with private keys redacted by default

Tools

Full comparison HTML in /docs/tool-comparison.html.

  • browser_start

  • browser_status

  • browser_navigate

  • browser_new_page

  • browser_pages

  • browser_switch_page

  • browser_close_page

  • browser_snapshot

  • browser_find

  • browser_take_screenshot

  • browser_click

  • browser_fill

  • browser_type

  • browser_hover

  • browser_press_key

  • browser_wait_for

  • browser_evaluate

  • browser_fingerprint_check

  • browser_navigate_back

  • browser_select_option

  • browser_handle_dialog

  • browser_file_upload

  • browser_network_requests

  • browser_network_request

  • browser_console_messages

  • browser_resize

  • browser_drag

  • browser_fill_form

  • browser_run_code_unsafe

  • browser_add_init_script

  • browser_network_state_set

  • browser_api_request

  • browser_get_visible_text

  • browser_get_visible_html

  • browser_iframe_click

  • browser_iframe_fill

  • browser_route_block

  • browser_route_mock

  • browser_route_clear

  • browser_storage_save

  • browser_storage_load

  • browser_cookie_list

  • browser_cookie_get

  • browser_cookie_set

  • browser_cookie_delete

  • browser_cookie_clear

  • browser_localstorage_list

  • browser_localstorage_get

  • browser_localstorage_set

  • browser_localstorage_delete

  • browser_localstorage_clear

  • browser_sessionstorage_list

  • browser_sessionstorage_get

  • browser_sessionstorage_set

  • browser_sessionstorage_delete

  • browser_sessionstorage_clear

  • browser_passkey_install

  • browser_passkey_create

  • browser_passkey_list

  • browser_passkey_delete

  • browser_video_save

  • browser_highlight

  • browser_hide_highlight

  • browser_save_blob

  • browser_save_pdf

  • browser_close

Development

Owner-scoped HTTP sessions

HTTP mode requires a stable owner on the MCP URL (?owner=<id>) or with the X-Browser-Owner header. Page listing, switching, navigation, and closing are restricted to that owner's tabs. Delete /owners?owner=<id> to close all tabs owned by one caller without stopping the browser or clearing the profile.

npm install
npm run build
node dist/index.js

Release

Install the matching Chromium build once, then prepare a release from the exact dependency versions in package-lock.json, run the full verification suite, and inspect the package without publishing it:

npx patchright install chromium
npm run release:check
npm publish

By default, browser_start launches Chromium via patchright as headed real Chrome with a persistent profile at:

~/.maestro/stealth-playwright-mcp/profiles/default

You can override it with the userDataDir tool argument or STEALTH_PLAYWRIGHT_USER_DATA_DIR.

To attach to an already-running Chrome instead of launching one, start Chrome with remote debugging and pass cdpEndpoint to browser_start:

google-chrome --remote-debugging-port=9222 --user-data-dir=$HOME/.maestro/stealth-playwright-mcp/profiles/cdp
{ "cdpEndpoint": "http://127.0.0.1:9222" }

browser_snapshot returns Playwright's AI aria snapshot. Use [ref=eN] values from that snapshot with browser_click, browser_fill, browser_type, browser_hover, browser_press, and browser_wait_for by passing { "ref": "eN" }. CSS selectors remain supported via { "selector": "..." }.

MCP config example:

{
  "mcpServers": {
    "patchright": {
      "command": "node",
      "args": ["/path/to/capmonster-mcp-patchright/dist/index.js"]
    }
  }
}

Direction

Shipped:

  • ✅ persistent user data dirs

  • ✅ CDP attach to real Chrome

  • ✅ proxy / timezone / locale / geolocation profiles

  • ✅ accessibility snapshots for LLM-friendly page control

  • ✅ fingerprint diagnostics

  • ✅ network interception (block / mock)

  • ✅ session import/export (storageState)

  • ✅ PDF export

  • ✅ authenticated API requests (reuse browser cookies)

  • ✅ lightweight text/HTML extraction

  • ✅ iframe actions

  • ✅ world: "main" opt-in for browser_evaluate / browser_run_code_unsafe

  • ✅ aria-snapshot search (browser_find)

  • ✅ save Blob/data URL output to disk (browser_save_blob)

Next:

  • rebrowser-playwright backend

  • codegen sessions

  • coordinate-based (vision) clicks

  • tracing / video recording

❓ FAQ

What is capmonster-mcp-patchright? A stealth browser MCP server for AI agents with 66 tools, built on Patchright, a patched Playwright with reduced CDP automation signals.

Does it solve CAPTCHAs? No. This server drives the browser. Pair it with the CapMonster Cloud MCP server to solve reCAPTCHA, Cloudflare Turnstile, DataDome and other captchas.

Is CapMonster Cloud a capsolver alternative or a 2captcha alternative for AI agents? For the captcha solving part, yes. The CapMonster Cloud MCP server covers more captcha types than the CapSolver MCP server (reCAPTCHA v2, v3 and Turnstile) and the 2Captcha mcp-captcha-solver project (reCAPTCHA v2), and reCAPTCHA v3 starts at $0.90 per 1,000 solves. See the comparison above and its disclaimer.

How is it different from Playwright? Patchright removes the Runtime.enable and Console.enable calls and the --enable-automation flag, and navigator.webdriver is not true. See the comparison table above.

Can it control an already-running Chrome? Yes. Start Chrome with remote debugging and pass cdpEndpoint to browser_start.

⚖️ Responsible use

Use this server only on websites you own or have permission to automate, and in line with the terms of service of those websites and applicable law. Patchright reduces common automation signals; acceptance of automated traffic by any site is not guaranteed.

📄 License

MIT

Available Tools

66 tools
browser_add_init_scriptA

Register JavaScript that runs before any page script, on every navigation (Playwright's page.addInitScript — always in the page's main world). Unlike browser_evaluate, this is proactive: it wins the race against a site's own inline (e.g. Cloudflare/Turnstile checks that run synchronously on document parse), which a reactive evaluate call issued over the MCP connection cannot. Call this BEFORE browser_navigate to the target URL — it has no effect on a page already loaded, only on the page it's called on and future navigations of that same page. Scoped to the current page only.

Inputs: script, function.

browser_api_requestA

Make an HTTP request reusing the browser session's cookies/storage (authenticated API calls without re-login). Returns status, headers, and body.

Inputs: url (required), data, method, headers, +2 more.

browser_clickC

Click an element by CSS selector or aria ref from browser_snapshot.

Inputs: ref, timeout, selector, frameSelector.

browser_closeB

Close the browser session.

Inputs: no named parameters.

browser_close_pageA

Close a page/tab by pageId, or the active page if omitted.

Inputs: pageId.

browser_console_messagesB

List captured console messages (log / warn / error etc.).

Inputs: no named parameters.

browser_dragB

Drag an element from source to target by CSS selector or aria ref.

Inputs: source, target, timeout.

browser_evaluateA

Evaluate JavaScript in the active page. Pass 'function' for a function body, 'expression' for a plain expression, or 'script' (deprecated). By default JS runs in an isolated stealth world (DOM is shared, but the page's own window globals are NOT visible). Set world:'main' to run in the page's real world — required to read or call globals the page defined (e.g. a page-registered callback). Pass frameSelector to run inside a specific iframe (including cross-origin ones, e.g. a captcha widget hosted on a different domain) instead of the top-level page — same CSS selector browser_click/browser_fill/browser_type already accept.

Inputs: world, script, function, expression, +1 more.

browser_file_uploadA

Upload files to a by CSS selector or aria ref.

Inputs: paths (required), ref, timeout, selector, +1 more.

browser_fillC

Fill an input by CSS selector or aria ref from browser_snapshot.

Inputs: text (required), ref, timeout, selector, +1 more.

browser_fill_formB

Fill multiple form fields at once. Each field needs selector or ref, and value.

Inputs: fields (required), timeout.

browser_findA

Search the current page's aria snapshot for text or a regex. Returns matching nodes with their [ref] and a few lines of surrounding context — cheaper than a full browser_snapshot when you only need to locate an element.

Inputs: query (required), regex, context, ignoreCase, +1 more.

browser_fingerprint_checkB

Collect browser fingerprint diagnostics from the active page.

Inputs: no named parameters.

browser_get_visible_htmlB

Get page HTML, optionally scoped to a selector. Strips script/style/svg by default for token efficiency.

Inputs: selector, maxLength, removeScripts.

browser_get_visible_textA

Get the visible text (document.body.innerText) of the active page. Lighter than a full aria snapshot.

Inputs: maxLength.

browser_handle_dialogB

Accept or dismiss a JavaScript dialog (alert / confirm / prompt).

Inputs: accept (required), wait, timeout, promptText.

browser_hide_highlightA

Remove highlight overlays. Pass label/selector/ref to remove a specific one, or omit all to clear every highlight.

Inputs: ref, label, selector.

browser_highlightA

Draw a persistent highlight overlay around an element (by CSS selector or aria ref). Useful for screenshots and video recording to show what the agent is focusing on. Does not affect page behavior.

Inputs: ref, label, style, timeout, +2 more.

browser_hoverA

Hover an element by CSS selector or aria ref from browser_snapshot.

Inputs: ref, timeout, selector, frameSelector.

browser_iframe_clickA

Shorthand for clicking inside an iframe. (Most tools now accept a frameSelector directly — prefer browser_click with frameSelector.)

Inputs: selector (required), frameSelector (required), timeout.

browser_iframe_fillA

Shorthand for filling inside an iframe. (Most tools now accept a frameSelector directly — prefer browser_fill with frameSelector.)

Inputs: value (required), selector (required), frameSelector (required), timeout.

browser_localstorage_clearA

Clear all localStorage for the active page's origin.

Inputs: no named parameters.

browser_localstorage_deleteB

Delete a localStorage item by key.

Inputs: key (required).

browser_localstorage_getB

Get a localStorage item by key. Returns null if absent.

Inputs: key (required).

browser_localstorage_listA

List all localStorage key-value pairs for the active page's origin.

Inputs: no named parameters.

browser_localstorage_setB

Set a localStorage item on the active page's origin.

Inputs: key (required), value (required).

browser_navigateC

Navigate the active page to a URL.

Inputs: url (required), timeout, waitUntil.

browser_navigate_backB

Navigate back in browser history.

Inputs: no named parameters.

browser_network_requestA

Get details for a single network request by stable id from browser_network_requests. Legacy zero-based index is also accepted.

Inputs: id, index, details.

browser_network_requestsA

List captured network requests. Set activeOnly=true for in-flight only.

Inputs: activeOnly.

browser_network_state_setA

Set network state: pass offline=true to simulate offline, offline=false to restore connectivity.

Inputs: offline (required).

browser_new_pageA

Open a new page/tab and make it active. Optionally navigate to a URL.

Inputs: url.

browser_pagesA

List open pages/tabs with ids, active state, URL, and title.

Inputs: no named parameters.

browser_passkey_createA

Generate or import a virtual passkey. To import, provide all four key-material fields. Private keys are omitted unless includePrivateKey=true.

Inputs: rpId (required), id, publicKey, privateKey, +2 more.

browser_passkey_deleteA

Delete one virtual passkey by its base64url credential id.

Inputs: id (required).

browser_passkey_installA

Install Patchright's virtual WebAuthn authenticator in the current browser context. Call before a page first uses navigator.credentials.

Inputs: no named parameters.

browser_passkey_listA

List virtual passkeys, optionally filtered by rpId or credential id. Private keys are omitted unless includePrivateKey=true.

Inputs: id, rpId, includePrivateKey.

browser_press_keyC

Press a keyboard key, optionally focused on a selector or aria ref first.

Inputs: key (required), ref, timeout, selector, +1 more.

browser_resizeA

Resize the active page viewport.

Inputs: width (required), height (required).

browser_route_blockA

Block requests by resource type and/or URL pattern (e.g. block images/fonts/media to speed up loads and shrink fingerprint surface). Applies to all pages in the context.

Inputs: urlPattern, resourceTypes.

browser_route_clearA

Remove all active block/mock routes.

Inputs: no named parameters.

browser_route_mockA

Mock matching requests with a canned response (fulfill). Useful for stubbing APIs or bypassing endpoints.

Inputs: urlPattern (required), body, status, contentType.

browser_run_code_unsafeB

Execute arbitrary JavaScript in page context. Prefer browser_evaluate when possible. Runs in the isolated stealth world by default; set world:'main' to run in the page's real world (page-defined window globals visible/callable).

Inputs: script (required), args, world.

browser_save_blobA

Evaluate JavaScript in the page and write the result straight to a file on disk — the value itself never passes through this tool's response. Use this instead of browser_evaluate whenever you need to get a large/opaque blob (base64 image(s), a full page's HTML, a big JSON dump) out of the live page and into a request body: reading it via browser_evaluate and then re-typing/pasting it into another tool call's arguments (e.g. create_task's imagesBase64/htmlPageBase64) risks silently corrupting it — a dropped character or an unclosed quote partway through a multi-KB string merges what should be several array elements into one, with no clear error. Pass 'function' or 'expression' (same as browser_evaluate); pass encoding:'base64' when the value is a base64 string (a data:...;base64, prefix is stripped automatically) to write raw decoded bytes, or omit it to write the value as UTF-8 text (non-strings are JSON-stringified).

Inputs: path (required), world, encoding, function, +1 more.

browser_save_pdfB

Render the active page to PDF via CDP (works in headed/stealth mode). Saves to path, or returns base64 if path omitted.

Inputs: path, scale, format, landscape, +1 more.

browser_select_optionA

Select options from a element by CSS selector or aria ref.

Inputs: values (required), ref, timeout, selector, +1 more.

browser_sessionstorage_clearA

Clear all sessionStorage for the active page's origin.

Inputs: no named parameters.

browser_sessionstorage_deleteB

Delete a sessionStorage item by key.

Inputs: key (required).

browser_sessionstorage_getB

Get a sessionStorage item by key. Returns null if absent.

Inputs: key (required).

browser_sessionstorage_listA

List all sessionStorage key-value pairs for the active page's origin.

Inputs: no named parameters.

browser_sessionstorage_setC

Set a sessionStorage item on the active page's origin.

Inputs: key (required), value (required).

browser_snapshotA

Return a distilled AI-oriented aria snapshot (verbose /url lines dropped and data: URLs collapsed to save tokens). Use [ref=eN] values with browser_click/fill/type/hover/press/wait_for.

Inputs: maxLength, includeUrls.

browser_startB

Start a browser session. Defaults to patchright chromium headed Chrome with a persistent profile.

Inputs: proxy, width, device, height, +12 more.

browser_statusB

Return current browser status.

Inputs: no named parameters.

browser_storage_loadA

Restore a session from a storageState (cookies + localStorage). Provide a file path or an inline state object. Note: localStorage restore navigates to each origin.

Inputs: path, state.

browser_storage_saveA

Export current session (cookies + localStorage) as a Playwright storageState. Saves to path, or returns the state JSON if path omitted.

Inputs: path.

browser_switch_pageA

Switch the active page/tab by pageId from browser_pages.

Inputs: pageId (required).

browser_take_screenshotB

Take a screenshot. Returns base64 if path is omitted.

Inputs: path, scale, fullPage.

browser_typeA

Type text into an element (CSS selector or aria ref) with human-like input: real per-key events, real Shift keyDown/up for capitals & symbols, variable dwell and inter-key gaps. Verifies the result against the request for input/textarea and errors on mismatch.

Inputs: text (required), ref, delay, verify, +3 more.

browser_video_saveA

Direct the active page's session recording to a specific output path (requires the session to have been started with recordVideo). The .webm finalizes when the page or browser closes. Without a path, returns the pending video location.

Inputs: path.

browser_wait_forB

Wait for time or for selector/ref state. If no selector/ref, waits timeout milliseconds.

Inputs: ref, state, timeout, selector, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 66 tools

    Disambiguation3/5

    Most tools fall into clear categories (navigation, input, storage, network), but several pairs overlap: browser_run_code_unsafe duplicates browser_evaluate, and browser_iframe_click/browser_iframe_fill are legacy shorthands for browser_click/browser_fill with frameSelector. The detailed descriptions mitigate confusion, so boundary issues are limited to a handful of cases.

    Naming Consistency4/5

    All tools share a consistent browser_ prefix and most follow a verb-object or area-action pattern (cookie_get, storage_save, navigate, click). However, some query tools are noun-named instead of verb-named (browser_status, browser_pages, browser_network_requests) and browser_new_page breaks the verb pattern, so it is not fully uniform.

    Tool Count2/5

    66 tools is far beyond the 3-15 sweet spot and well past the 25+ threshold for too many, making the server heavy for an agent to navigate. The tools are at least organized into coherent families, but the sheer number and 15 near-identical CRUD micro-tools for cookies/localStorage/sessionStorage inflate the surface.

    Completeness3/5

    The browser automation surface is extensive, covering navigation, input, network interception, storage, and passkeys, with only minor browser gaps like reload/forward/scroll. However, the server is branded capmonster and browser_save_blob explicitly references create_task, yet no CapMonster task-creation or result-retrieval tools exist, leaving a notable dead end for the intended captcha workflow.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a real browser that bypasses bot detection (Cloudflare, Turnstile) for AI agents, enabling navigation, clicking, typing, screenshots, and data collection through MCP tools.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that attaches to already-running Chromium browsers via CDP, enabling agents to control multiple browser sessions for navigation, input, network capture, and automation while avoiding anti-bot detection with Patchright.
      26
      1
      MIT