Skip to main content

MCP server for CloakBrowser - stealth browser automation via Model Context Protocol

Project description

CloakBrowser MCP Server

English | 中文

Stealth browser automation via Model Context Protocol, powered by CloakBrowser.

A drop-in MCP server that wraps CloakBrowser's stealth Chromium with 57 source-level C++ fingerprint patches — not JS injection. Passes all 30/30 bot detection tests (reCAPTCHA v3 score: 0.9, Cloudflare Turnstile: PASS, FingerprintJS: PASS).

Features

  • 22 browser tools — navigate, click, type, screenshot, console, evaluate JS, form filling, drag & drop, and more
  • Stealth by defaultnavigator.webdriver = false, real Chrome TLS fingerprint, no CDP detection
  • Human-like behaviorhumanize=True enables Bézier mouse curves, per-character keyboard timing
  • Proxy support — HTTP & SOCKS5 with GeoIP auto-detection
  • Session persistence — save/load cookies and localStorage
  • Compatible with any MCP client — Hermes Agent, Claude Desktop, Cursor, etc.

Quick Start

Install

pip install cloakbrowser-mcp

Run

# As a stdio MCP server
cloakbrowser-mcp

# Or directly
python -m cloakbrowser_mcp.server

Use with Hermes Agent

Add to ~/.hermes/config.yaml:

mcp_servers:
  cloakbrowser:
    command: "python"
    args: ["-m", "cloakbrowser_mcp.server"]
    timeout: 120

Restart Hermes Agent. Tools will be registered as mcp_cloakbrowser_browser_*.

Use with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "cloakbrowser": {
      "command": "cloakbrowser-mcp"
    }
  }
}

Available Tools

Tool Description
browser_launch Launch a stealth CloakBrowser instance
browser_close Close the browser and clean up
browser_navigate Navigate to a URL, return compact snapshot
browser_snapshot Get accessibility tree with ref IDs
browser_click Click element by ref (e.g. @e5)
browser_type Type text into input field by ref
browser_press Press keyboard key (Enter, Tab, Escape...)
browser_scroll Scroll page up/down
browser_back Navigate back in history
browser_forward Navigate forward in history
browser_console Get console logs or evaluate JS
browser_get_images List all images with URLs and alt text
browser_screenshot Take PNG screenshot
browser_wait_for Wait for element or text to appear
browser_evaluate Evaluate JavaScript expression
browser_get_content Get text/HTML of page or element
browser_extract_links Extract all links as JSON
browser_fill_form Fill multiple form fields at once
browser_hover Hover over element by ref
browser_select_option Select options in <select> elements
browser_drag Drag element to another element
browser_save_storage_state Save cookies/localStorage to file
browser_load_storage_state Load cookies/localStorage from file
browser_info Get current page URL, title, viewport

Tool Usage Examples

Navigate and Interact

# Launch browser
await call_tool("browser_launch", {"headless": True, "humanize": True})

# Navigate to a page
await call_tool("browser_navigate", {"url": "https://example.com"})

# Get snapshot to see interactive elements
snapshot = await call_tool("browser_snapshot", {})
# Shows: [@e1] <a>Link text, [@e2] <input>[type: text]...

# Click a link
await call_tool("browser_click", {"ref": "@e1"})

# Type into search box
await call_tool("browser_type", {"ref": "@e2", "text": "hello world", "submit": True})

# Take screenshot
await call_tool("browser_screenshot", {})

Fill a Login Form

await call_tool("browser_fill_form", {
    "fields": [
        {"ref": "@e1", "value": "username"},
        {"ref": "@e2", "value": "password123"},
    ],
    "submit_ref": "@e3",
})

Advanced: Custom Fingerprint & Proxy

await call_tool("browser_launch", {
    "headless": True,
    "humanize": True,
    "proxy": "socks5://user:pass@proxy:1080",
    "fingerprint_seed": "my-unique-seed-123",
    "geoip": True,
    "locale": "zh-CN",
})

Save/Restore Session

# Save session after login
await call_tool("browser_save_storage_state", {"path": "session.json"})

# Later: restore session
await call_tool("browser_load_storage_state", {"path": "session.json"})

Architecture

MCP Client (Hermes/Claude/etc.)
    │ stdio (JSON-RPC)
    ▼
cloakbrowser-mcp server
    │
    ▼
CloakBrowser (Playwright-compatible API)
    │
    ▼
Stealth Chromium (57 C++ patches)

The server maintains a single browser instance (singleton pattern). All tools operate on the current page. The browser is auto-launched on first tool call if not explicitly launched.

Development

git clone https://github.com/MiwooMiwoo/cloakbrowser-mcp.git
cd cloakbrowser-mcp
pip install -e ".[dev]"

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_cloakbrowser-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_cloakbrowser-0.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_cloakbrowser-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_cloakbrowser-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mcp_cloakbrowser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aeb76e2edd02d6ce16e526a97df4974f689a6faace386316bad2b99e60978555
MD5 3d71375c408ca664c41ac38102dfc2cc
BLAKE2b-256 de765485aa3c62c79a15a1cfb3ed9502ce7e35e6c104ffbf922decff7d9667ef

See more details on using hashes here.

File details

Details for the file mcp_cloakbrowser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_cloakbrowser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 708a56ad1f661e6d87b2cd1be9a50a4000a42c484a9c0c1d830aeef496233d2a
MD5 92f536383d7a6ac7356960ae4031f6ba
BLAKE2b-256 90b36fe0301041e59e40221015e550b39fea79289ee7953cbf5d31e4fd161ffe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page