cloakbrowser-mcp
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., "@cloakbrowser-mcp Get the text from https://example.com"
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.
cloakbrowser-mcp
把 CloakBrowser(在原始碼層改過、繞過 bot 偵測的隱形 Chromium)包成 MCP server,讓 Claude Code(或任何 MCP client)直接拿來做網頁檢索。
底層是真正修改過二進位的 Chromium,連 headless 模式都能通過 sannysoft 的 WebDriver 進階偵測,比 JS 注入式的 stealth 方案穩。
工具
工具 | 用途 |
| 開網址回傳渲染後的可見純文字(餵 LLM 分析);可給 |
| 回傳渲染後 HTML 原始碼(結構化解析 / 抽連結) |
| 整頁或單一元素截圖存 PNG |
| 單一 session 內依序執行 click/fill/scroll/wait… 再擷取 |
每個工具都吃共用反偵測參數:
參數 | 預設 | 說明 |
|
| 模擬人類滑鼠曲線 / 鍵盤時序 |
|
| 代理 URL,例如 |
|
| 依代理 IP 自動對齊時區 / 語系 |
|
| 有些站會偵測 headless,硬站設 |
|
| 手動指定 IANA 時區 / BCP 47 語系 |
要繞 Cloudflare / reCAPTCHA / FingerprintJS 時建議組合:住宅 proxy + geoip=true + humanize=true,再不行加 headless=false。
每次呼叫都是「開瀏覽器 → 做事 → 關閉」的無狀態模式;需要跨步驟(登入、填表、翻頁)請用一次 cloak_interact 把動作串起來。
Related MCP server: Local-MCP-server
需求
Python ≥ 3.10(建議 3.12)
macOS arm64/x64、Linux x86_64/arm64、Windows x86_64
首次執行會自動下載隱形 Chromium 二進位(~200MB,快取在
~/.cloakbrowser/)
安裝
git clone https://github.com/Oliver0804/cloakbrowser-mcp.git
cd cloakbrowser-mcp
python3.12 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/python -c "import cloakbrowser as cb; cb.ensure_binary()" # 預先下載 Chromium註冊到 Claude Code
claude mcp add --scope user cloakbrowser "$(pwd)/.venv/bin/cloakbrowser-mcp"確認連線:
claude mcp list | grep cloakbrowser # 應顯示 ✔ Connected註冊後重開一次 Claude Code session,mcp__cloakbrowser__* 四個工具就會出現。
在 Claude Code 內使用
直接用自然語言叫工具即可,例如:
用 cloak_get_text 幫我抓 https://news.ycombinator.com 的標題
把 https://example.com 用 cloak_screenshot 截整頁存到 /tmp/shot.png
這個站有 Cloudflare,請帶 proxy 跟 humanize 再抓cloak_interact action 格式
actions 是動作清單,第一個通常是 goto:
[
{"type": "goto", "url": "https://example.com", "wait_until": "domcontentloaded"},
{"type": "fill", "selector": "#email", "value": "a@b.com"},
{"type": "type", "selector": "#q", "value": "hello", "delay": 40},
{"type": "press", "selector": "#q", "keys": "Enter"},
{"type": "click", "selector": "button#go"},
{"type": "select", "selector": "#country", "value": "TW"},
{"type": "scroll", "dy": 1500},
{"type": "wait_selector", "selector": ".results", "timeout_ms": 15000},
{"type": "wait_ms", "ms": 1500}
]extract:text|html|none(最終回傳形式)selector:extract=text時只取此元素文字screenshot_path:給定則動作跑完後再截一張整頁圖
其他 MCP client
任何支援 stdio 的 MCP client 都能用,把指令指到 entrypoint:
{
"mcpServers": {
"cloakbrowser": {
"command": "/abs/path/cloakbrowser-mcp/.venv/bin/cloakbrowser-mcp"
}
}
}授權
本倉庫包裝程式碼:MIT
CloakBrowser 二進位:免費使用但禁止重新發佈(見上游 BINARY-LICENSE.md)。本倉庫不含二進位,安裝時由
cloakbrowser套件自動下載。
Available Tools
4 toolscloak_get_htmlA
開啟 url 並回傳渲染後的 HTML 原始碼(適合做結構化解析 / 抽取連結)。
selector 省略時回傳整頁 page.content();給 selector 則回傳該元素 outerHTML。 其餘反偵測參數同 cloak_get_text。
Inputs: url (required), selector, wait_selector, wait_ms, +9 more. Returns: result
cloak_get_textA
用隱形 Chromium 開啟 url 並回傳可見純文字(適合餵給 LLM 分析)。
會執行 JavaScript,能拿到 SPA / 動態渲染後的內容。需要繞過 Cloudflare / reCAPTCHA 時,設定 proxy(住宅代理)+ geoip=True + humanize=True,必要時 headless=False。
Args: url: 目標網址。 selector: 只取此 CSS selector 的 innerText;省略則取整個 。 wait_selector: 導航後等待此元素出現再擷取(給動態內容用)。 wait_ms: 導航後額外固定等待毫秒數。 wait_until: load | domcontentloaded | networkidle | commit。 max_chars: 內容上限,超過會截斷並標記 truncated。 humanize / proxy / geoip / headless / timezone / locale: 反偵測設定。
Inputs: url (required), selector, wait_selector, wait_ms, +9 more. Returns: result
cloak_interactA
在單一 session 內依序執行多個瀏覽器動作,最後擷取結果。
actions 是動作清單,第一個通常是 goto。每個動作是一個 dict,type 可為: {"type":"goto","url":"...","wait_until":"domcontentloaded"} {"type":"click","selector":"button#login"} {"type":"fill","selector":"#email","value":"a@b.com"} {"type":"type","selector":"#q","value":"hello","delay":40} {"type":"press","selector":"#q","keys":"Enter"} {"type":"select","selector":"#country","value":"TW"} {"type":"scroll","dy":1500} {"type":"wait_selector","selector":".results","timeout_ms":15000} {"type":"wait_ms","ms":1500}
extract: text | html | none(最終要回傳的內容形式)。 selector: extract=text 時只取此元素文字。 screenshot_path: 給定則動作跑完後再截一張整頁圖。 其餘反偵測參數同 cloak_get_text;表單 / 登入流程建議 humanize=True。
Inputs: actions (required), extract, selector, screenshot_path, +8 more. Returns: result
cloak_screenshotA
開啟 url 並截圖存成 PNG 到 path(回傳實際存檔路徑)。
full_page=True 截整頁;給 selector 則只截該元素。path 請用絕對路徑。 其餘反偵測參數同 cloak_get_text。
Inputs: url (required), path (required), full_page, selector, +10 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_html returns raw HTML, get_text returns visible text, interact performs multi-step browser actions, and screenshot captures images. No overlap exists.
All tools share the 'cloak_' prefix and follow a consistent verb_noun pattern (get_html, get_text, interact, screenshot), making naming predictable and intuitive.
With only 4 tools, the server is well-scoped for browser automation. Each tool covers a core operation without redundancy or unnecessary complexity.
The tool set covers the full lifecycle of browser automation: loading pages (HTML/text), interacting with dynamic content, and capturing screenshots. No obvious gaps for typical scraping tasks.
Maintenance
Related MCP Connectors
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Turn any public website into an MCP server for agents to search, read and navigate.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that provides LLMs with stealth browser automation capabilities via CloakBrowser to bypass bot detection services like Cloudflare and reCAPTCHA. It supports full page interaction, content extraction, and human-like behavior through 30 specialized tools.2052 PyPI14Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables tool-calling LLMs to search the internet, capture website images, extract webpage text, and more via a local MCP server.16-
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps Playwright to give AI agents eyes on the web, enabling browser search, navigation, extraction, and interaction with intelligent LLM-based DOM extraction and skill caching.11 npmMIT
- FlicenseNot gradedqualityCmaintenanceMCP server that wraps agent-browser to let LLMs control a real browser, providing tools for navigation, interaction, reading page content, accessibility snapshots, screenshots, and session management.1-