mcpField
C
CloakMCP

CloakMCP

Local
github.com/overtimepogBrowser Automation14Updated 2d ago

About CloakMCP

CloakMCP is a browser automation MCP server for AI agents, built around source-patched Chromium and anti-detection behavior enabled by default. It uses accessibility snapshots to inspect pages and element references to interact with them.

Key features

  1. 01Source-patched Chromium
  2. 02Accessibility snapshots and element refs
  3. 03Markdown page extraction
  4. 04Annotated screenshots
  5. 05Humanized input and click retries
  6. 06Capability-gated network, cookie, and PDF tools

Use cases

  1. 01Browse sites that require anti-detection behavior
  2. 02Click and fill pages using snapshot references
  3. 03Extract page text for an agent to read
  4. 04Inspect visual context such as charts or CAPTCHAs

MCP support

As an MCP server, it exposes browser launch, navigation, reading, and interaction tools to clients. It supports stdio and SSE transports, with network, cookie, PDF, and console tools enabled through capability options.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"overtimepog-cloakmcp": {
"command": "uvx",
"args": [
"cloakbrowsermcp"
]
}
}
}
Run commanduvx cloakbrowsermcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypicloakbrowsermcp2.0.1

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
geoipbooleanNo
proxyanyNo
localeanyNo
headlessbooleanNo
humanizebooleanNo
timezoneanyNo
extra_argsanyNo
user_agentanyNo
color_schemeanyNo
human_presetstringNo
stealth_argsbooleanNo
user_data_diranyNo
viewport_widthintegerNo
viewport_heightintegerNo
fingerprint_seedanyNo

Details

From the project README

CloakBrowser MCP

Stealth browser automation for AI agents — a Model Context Protocol server combining CloakBrowser's anti-detection with Playwright MCP-inspired architecture.

CloakBrowser is a source-level patched Chromium that passes Cloudflare Turnstile, reCAPTCHA v3 (0.9 score), FingerprintJS, BrowserScan, and 30+ bot detection services.

Why CloakBrowser MCP?

FeaturePlaywright MCPCloakBrowser MCP
Anti-detection❌ None✅ Source-patched Chromium
Cloudflare bypass❌✅
reCAPTCHA v3❌✅ 0.9 score
Snapshot-first✅✅
Markdown extraction❌✅ Readability-style
Annotated screenshots❌✅ browser-use style
Smart page settlingBasic✅ MutationObserver + networkidle
Auto-retry clicks❌✅
Humanized input❌✅ Mouse curves, keyboard timing
Capability gating✅ --caps✅ --caps

Quick Start

Install
pip install cloakbrowsermcp
Use with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "cloakbrowser": {
      "command": "cloakbrowsermcp"
    }
  }
}
Use with VS Code / Cursor

Add to .vscode/mcp.json:

{
  "servers": {
    "cloakbrowser": {
      "command": "cloakbrowsermcp",
      "args": ["--caps", "all"]
    }
  }
}
Use with Hermes Agent

Add to ~/.hermes/config.yaml:

mcp_servers:
  cloakbrowser:
    command: cloakbrowsermcp
    args: ["--caps", "all"]
    timeout: 120

How It Works

Snapshot-First Architecture

CloakBrowser MCP uses accessibility tree snapshots as the primary way for AI models to understand web pages — not screenshots, not raw HTML.

1. cloak_launch()           → Start stealth browser
2. cloak_navigate(pid, url) → Go to page (auto-waits for settle)
3. cloak_snapshot(pid)      → Get interactive elements with [@eN] refs
4. cloak_click(pid, '@e5')  → Click element by ref
5. cloak_type(pid, '@e3', 'hello')  → Type into input
6. cloak_read_page(pid)     → Get content as clean markdown
7. cloak_close()            → Done

Each interactive element gets a [@eN] ref ID. All interaction tools use these refs — no CSS selectors needed.

Three Ways to See a Page
  1. cloak_snapshot() — Accessibility tree with [@eN] refs. Fast, cheap, reliable. Use this.
  2. cloak_read_page() — Clean markdown extraction. For reading content, not interacting.
  3. cloak_screenshot() — Annotated screenshot with element indices. For visual context (images, charts, CAPTCHAs).
Stealth by Default

All anti-detection features are ON by default:

  • Source-patched Chromium binary (not Playwright patches — actual Chromium source modifications)
  • Human-like mouse curves, keyboard timing, and scroll patterns (humanize=True)
  • Stealth fingerprint arguments (consistent canvas, WebGL, audio fingerprints)
  • Proxy support with GeoIP-based timezone/locale detection

Tools

Core Tools (20 — always available)
ToolDescription
cloak_launchStart stealth browser (all anti-detection ON)
cloak_closeClose browser and release resources
cloak_snapshotPRIMARY — accessibility tree with [@eN] refs
cloak_clickClick element by ref (auto-retry)
cloak_typeType into input by ref (with submit option)
cloak_selectSelect dropdown option by ref
cloak_hoverHover over element by ref
cloak_checkCheck/uncheck checkbox by ref
cloak_read_pagePage content as clean markdown
cloak_screenshotAnnotated screenshot with element indices
cloak_navigateGo to URL (auto-waits for settle)
cloak_backNavigate back in history
cloak_forwardNavigate forward in history
cloak_press_keyPress keyboard key
cloak_scrollScroll page up/down
cloak_waitWait for page to settle
cloak_evaluateExecute JavaScript in page
cloak_new_pageOpen new page/tab
cloak_list_pagesList all open pages
cloak_close_pageClose a specific page
Capability-Gated Tools (enabled via --caps)

Enable with cloakbrowsermcp --caps network,cookies,pdf,console or --caps all.

ToolCapabilityDescription
cloak_network_interceptnetworkBlock/mock/passthrough requests
cloak_network_continuenetworkRemove interception rule
cloak_get_cookiescookiesGet all cookies
cloak_set_cookiescookiesSet cookies
cloak_pdfpdfSave page as PDF
cloak_consoleconsoleGet browser console output

Configuration

CLI Options
cloakbrowsermcp [--caps CAPS] [--transport {stdio,sse}] [--port PORT]
  • --caps: Comma-separated capabilities: network, cookies, pdf, console, all
  • --transport: MCP transport — stdio (default) or sse
  • --port: Port for SSE transport (default: 8931)
Environment Variables
VariableDefaultDescription
CLOAKBROWSER_LOG_LEVELINFOLog level
CLOAKBROWSER_LOG_FILE~/.cloakbrowser/logs/server.logLog file path
CLOAKBROWSER_LOG_STDERRfalseAlso log to stderr
Launch Options
cloak_launch(
    headless=True,        # False for headed mode (some sites require it)
    proxy="http://...",   # Residential proxy recommended
    humanize=True,        # Human-like input (ON by default)
    stealth_args=True,    # Stealth fingerprints (ON by default)
    timezone="America/New_York",
    locale="en-US",
    geoip=False,          # Auto-detect from proxy IP
    fingerprint_seed="my-identity",  # Consistent fingerprint across sessions
    user_data_dir="/path",  # Persistent profile
)

Backend note: SessionConfig.backend is deprecated. CloakBrowser 0.4.0 removed the patchright backend (it broke proxy auth and add_init_script without improving stealth), so current versions ignore the setting and log a one-time warning. If you still need it, pip install "cloakbrowsermcp[patchright]" pins cloakbrowser<0.4, where the old backend still works, but it carries those upstream bugs.

Architecture

cloakbrowsermcp/
├── server.py      # FastMCP server, tool registration, error handling
├── session.py     # Browser lifecycle, page management, ref storage
├── snapshot.py    # Accessibility tree JS, ref resolution
├── markdown.py    # Readability-style HTML-to-markdown extraction
├── vision.py      # Annotated screenshots with element indices
├── waiting.py     # Smart wait, page settle, retry logic
├── stealth.py     # Stealth config inspection
├── network.py     # Network intercept, cookies (capability-gated)
├── __init__.py
└── __main__.py
Design Principles
  1. Snapshot-first — Tool descriptions steer models to use cloak_snapshot() as the primary page understanding tool
  2. Ref-based only — No CSS selector tools. All interaction via [@eN] refs from snapshots
  3. Stealth by default — Anti-detection, humanization, and stealth args all ON without configuration
  4. Auto-snapshot after actions — Click, type, navigate all return an updated snapshot
  5. Smart waiting — Auto-wait on navigation (networkidle + MutationObserver settle), auto-retry on failed clicks
  6. Capability gating — Advanced tools (network, cookies, PDF) off by default to keep tool count low
  7. Clean content extraction — Markdown for reading, snapshot for interaction, annotated screenshots for vision

Development

git clone https://github.com/overtimepog/CloakMCP
cd CloakMCP
pip install -e ".[dev]"
pytest

License

Apache-2.0

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.