
Cloak Browser Mcp
io.github.devinwang由 GitHub 帳號 devinwang 發布v0.2.0更新於 Nov 4, 2026
Playwright-compatible MCP server on CloakBrowser stealth Chromium: 86 tools, humanized input.
概覽
以隱蔽版 Chromium 為基礎、相容 Playwright 的瀏覽器自動化 MCP 伺服器,提供 86 個工具,目標是通過機器人偵測。
- 可以做什麼
- 瀏覽網頁、管理分頁與歷史紀錄,並重新取得頁面的無障礙樹快照
- 點擊、輸入、懸停、拖曳、放置、選擇選項、按鍵、填表、捲動與處理對話框
- 檢視頁面狀態:截圖、主控台訊息、等待、調整視窗、媒體模擬與頁面內 JS 求值
- 可選能力群組:網路請求檢查與路由模擬、Cookie 與本機/工作階段儲存、像素座標滑鼠、儲存 PDF、Playwright 測試定位器、追蹤與錄影、設定
- 隱蔽層:設定指紋、時區、語言、地理位置與代理,執行偵測測試與隱蔽性稽核,檢查請求訊號,管理持久化設定檔與瀏覽器二進位檔
- 適用情境
- 當助理需要在部署 Cloudflare、DataDome、PerimeterX 或 FingerprintJS 等機器人偵測的網站上操作瀏覽器時適用,也適合需要持久化設定檔、代理與 GeoIP 對齊、隱蔽性稽核的情境。若不需要規避偵測,README 建議改用更輕量的原生 Playwright MCP。
- 執行需求
- 以 npm 套件形式透過 stdio 在本機執行,需要 Node.js ^20.19.0 或 >=22.12.0。首次使用時會下載約 200 MB 的 CloakBrowser Chromium 二進位檔到使用者家目錄。選用環境變數 CLOAKBROWSER_LICENSE_KEY 可啟用 Pro 版本,未設定則使用免費二進位檔。僅支援桌面端,需在 MCP 用戶端設定中透過 --caps、--profile-dir、--proxy、--allowed-domains 等命令列參數設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cloak Browser Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
cloak-browser-mcp
A Model Context Protocol (MCP) server backed by CloakHQ/CloakBrowser — a source-patched Chromium that passes Cloudflare Turnstile, reCAPTCHA v3, FingerprintJS, BrowserScan, and 30+ other bot detection services without runtime JS injection.
Drop-in replacement for @playwright/mcp with 86 tools: every Playwright MCP tool except browser_annotate (see Not implemented), plus a Cloak-exclusive stealth/profile/audit layer.
Works with Claude Code, Cursor, VS Code, Codex, Gemini CLI, Windsurf, or any MCP client.
Table of contents
- Why CloakBrowser over vanilla Playwright?
- Quick start
- Capabilities (
--caps) - CloakBrowser-exclusive tools
- CLI flags
- Tool inventory
- Target syntax for interaction tools
- Example flows
- Security model
- Changelog
- License
Why CloakBrowser over vanilla Playwright?
When you don't need stealth, @playwright/mcp is faster and lighter — use that. When the site has any bot detection (Cloudflare, DataDome, PerimeterX, FingerprintJS) — use this.
Quick start
1. Install once
The wrapper installs from npm; the CloakBrowser Chromium binary (~200 MB) downloads on first use into ~/.cloakbrowser/.
Requires Node.js ^20.19.0 || >=22.12.0 (the minimum CloakBrowser itself needs).
The binary comes in two tiers. Without a key you get the free binary. Set CLOAKBROWSER_LICENSE_KEY in the MCP server's environment to use a CloakBrowser Pro license; CLOAKBROWSER_RELEASE_CHANNEL (stable or preview) and CLOAKBROWSER_VERSION are read by the CloakBrowser library too. See cloakbrowser.dev for what each tier includes. cloak_binary_info reports the active tier.
Or run on demand without installing:
After install, the binary on PATH is cloak-browser-mcp (unscoped) — that's what you reference in MCP client configs below.
2. Wire into your MCP client
Claude Code (~/.claude.json or project .mcp.json)
Cursor / VS Code (.cursor/mcp.json or .vscode/mcp.json)
Persistent profile + proxy + humanized inputs
3. Use it
In Claude Code:
"Open example.com, click the search box, search for 'hello', take a screenshot."
The agent will call browser_navigate → browser_snapshot → browser_click → browser_type → browser_take_screenshot.
Capabilities (--caps)
--caps all enables everything (except run_code_unsafe, which additionally requires --enable-unsafe-eval).
CloakBrowser-exclusive tools (always on)
CLI flags
Tool inventory
Tools are grouped by capability. The "always-on" sections are exposed regardless of --caps; capability-gated sections require the matching --caps entry.
Always-on
Navigation
Interaction
Page state
CloakBrowser-exclusive
Capability-gated
--caps network — browser_network_requests, browser_network_request, browser_route, browser_route_list, browser_unroute, browser_network_state_set.
--caps storage — browser_cookie_set/get/list/delete/clear, browser_localstorage_*, browser_sessionstorage_*, browser_storage_state, browser_set_storage_state.
--caps vision — browser_mouse_click_xy, browser_mouse_move_xy, browser_mouse_drag_xy, browser_mouse_down, browser_mouse_up, browser_mouse_wheel.
--caps pdf — browser_pdf_save.
--caps testing — browser_verify_element_visible, browser_verify_text_visible, browser_verify_list_visible, browser_verify_value, browser_generate_locator.
--caps devtools — browser_highlight, browser_hide_highlight, browser_start_tracing, browser_stop_tracing, browser_start_video, browser_stop_video, browser_video_chapter, browser_resume, browser_video_show_actions, browser_video_hide_actions, browser_start_recording, browser_stop_recording.
--caps config — browser_get_config, browser_close, browser_run_code_unsafe (also needs --enable-unsafe-eval).
--caps humanize — cloak_humanize_set.
Not implemented
browser_annotate from Playwright MCP is not provided. It opens Playwright's dashboard window and waits for a person to draw on the page, and Playwright runs that as an internal process that this server does not launch.
Target syntax for interaction tools
The target argument accepts:
eNref from a priorbrowser_snapshot— e.g.e7. Most reliable.- CSS selector — e.g.
button.primary. xpath=…— e.g.xpath=//button[contains(., "Submit")].text=…— e.g.text=Sign in.role=…[name="…"]— e.g.role=button[name="Submit"].
After any navigation or significant DOM mutation, call browser_snapshot again to refresh refs.
Example flows
1. Take a screenshot of a Cloudflare-protected page
Vanilla @playwright/mcp fails the Turnstile check; cloak-browser-mcp passes it automatically because the stealth patches are below the JS layer.
2. Sign into a SaaS dashboard, persist auth, reopen later
Phase 1 — initial sign-in with a fresh profile:
Phase 2 — reopen later, all cookies still present:
3. Probe how stealth is doing
You'll see all green if stealth is intact.
4. Switch geolocation/timezone mid-session via proxy
5. Mock an API response while testing a frontend
6. Export storage state, replay in a fresh session
7. Run a Playwright trace for human review
Security model
Read this before deploying on any machine that has production credentials.
TL;DR
Threats this package introduces
1. Supply-chain compromise
Three packages are pulled at install/run time: @modelcontextprotocol/sdk, playwright-core, and cloakbrowser + its downloaded Chromium binary. If CloakHQ's npm publish token or cloakbrowser.dev is compromised, an attacker could push a malicious binary that runs under your user account.
Mitigations:
- Pin a known-good
cloakbrowserversion. - Set
CLOAKBROWSER_BINARY_PATHto an audited binary. - Leave
CLOAKBROWSER_SKIP_CHECKSUMat default (false). - Audit
~/.cloakbrowser/and any--profile-diryou use.
2. Agent-driven browser navigation
By default browser_navigate accepts any URL. An LLM agent can be prompt-injected into navigating somewhere malicious.
Mitigations:
--allowed-domains <csv>(supports*.example.com).--blocked-domains <csv>(checked first).- Use a dedicated ephemeral
--profile-dir, not your real browser profile. --max-pages <n>caps tab explosion.
3. Arbitrary JS execution
browser_evaluate— runs JS in the page sandbox. Cannot read your local filesystem. Always available.browser_run_code_unsafe— runs JS in this Node.js server process. Can do anything Node can. Double-opt-in: needs--caps configAND--enable-unsafe-eval.
Mitigation: never combine --enable-unsafe-eval with a machine that has prod credentials in env vars.
4. File system reach
browser_file_upload and browser_drop can attach any file you have read access to. Use --upload-allow-dir <path> to restrict.
Write-side: browser_take_screenshot --saveAs, browser_pdf_save, browser_storage_state, browser_start_tracing write files at agent-chosen paths. If you don't want this, omit --caps pdf / storage / devtools.
5. Persistent profile leakage
A --profile-dir accumulates cookies/localStorage/IndexedDB. If synced to cloud storage, every site you've signed into via the agent becomes accessible to anyone with that sync token. Default path ~/.cloak-browser-mcp/profiles/<name> lives outside common cloud-sync roots.
6. Prompt-injection-driven exfil
A malicious page can prompt-inject the agent into navigating elsewhere with stolen state, or POST DOM secrets out. This is an LLM problem, not an MCP problem.
- Use a separate session per task —
browser_closebetween unrelated jobs. - Prefer ephemeral over persistent profiles for sensitive flows.
- Review agent tool calls when the task touches anything authenticated.
7. Network egress
The wrapper does not phone home and does not collect telemetry.
Recommended deployment profiles
"Tight" (sensitive machine — has prod credentials):
No --enable-unsafe-eval. No vision cap (xy clicks bypass allow-listing).
"Open" (research / personal browsing):
"Untrusted" (you don't fully trust the upstream binary yet) — run inside a Docker container or a fresh macOS user account with no Keychain access and no .env files mounted.
Reporting vulnerabilities
If you find a security issue in cloak-browser-mcp (not in the upstream cloakbrowser package or its binary): open a private security advisory at https://github.com/devinwang/cloak-browser-mcp/security/advisories/new.
For issues in upstream CloakBrowser: https://github.com/CloakHQ/CloakBrowser/security/advisories/new.
Changelog
[0.2.0] - 2026-10-21
- Upgraded
cloakbrowserfrom 0.3.x to 0.6.3. The new releases add Pro licensing, release channels, and signed download verification. Nothing the server used was removed. No new MCP tools; the tool count stays at 80. - Fix: library log lines could corrupt the stdio stream.
cloakbrowserreports some events (for example auto-encoding of special characters in proxy credentials) withconsole.info, which Node writes to stdout, where an MCP client expects only JSON-RPC.console.log,console.infoandconsole.debugare now routed to stderr while the server runs. - Node requirement is now
^20.19.0 || >=22.12.0(was declared as>=18). CloakBrowser 0.3.30 already required Node 20 or newer, and 0.6.x needs 20.19 or newer. CI no longer tests Node 18. - Six tools added for parity with Playwright MCP 0.0.83 (80 → 86):
browser_find— search the snapshot for text or a regex.browser_emulate_media— color scheme, reduced motion, forced colors, contrast, media type.nullclears an override.browser_video_show_actions/browser_video_hide_actions(devtools) — annotate actions on the page while recording or screencasting.browser_start_recording/browser_stop_recording(devtools) — record what the user does in the browser and return it as Playwright code.
browser_annotateis not provided: it launches Playwright's internal dashboard process and needs someone to draw on the page.playwright-coreminimum raised to^1.61.0, the first release withpage.screencast.showActions(); the resolved version moves from 1.60.0 to 1.64.1.- Input schemas now advertise nullable parameters as
{ oneOf: [<type>, null] }(the converter used to drop the null), whichbrowser_emulate_medianeeds. - Added
mcpNametopackage.jsonand aserver.jsonfor the official MCP Registry, including the optionalCLOAKBROWSER_LICENSE_KEYvariable.
[0.1.4] - 2026-08-23
- Fix:
browser_evaluatewithouttargetalways failed. The function was passed to Playwright as a string expression, so the function object came back instead of its result, which serialized toundefinedand failed MCP result validation. It is now invoked, and a function that legitimately returnsundefinedreports the string"undefined".
[0.1.3] - 2026-08-23
- Fix: a failed browser launch could not be retried. A rejected launch promise was cached and re-awaited forever, so one transient error forced a process restart. It is now cleared on failure.
- Clearer errors. A stale CloakBrowser process holding the profile directory used to surface as "No active page". There is now a
NO_BROWSERerror (BrowserNotLaunchedError) that carries the underlying launch error and the command to find stale processes, and aTAB_NOT_FOUNDerror for an unknown tab id.NoActivePageErrorno longer tells the caller to run the call that is itself failing.
[0.1.2] - 2026-08-03
- No behaviour change. Release-pipeline only: publishes via npm trusted publishing (OIDC) instead of an
NPM_TOKENsecret. A long-lived token expires silently, and npm answers an unauthorized publish with404 Not Found - PUT— which reads like a missing package rather than an auth failure. OIDC has nothing to expire. - Dropped
registry-urlfromactions/setup-node: it writes an.npmrccontaining_authToken=${NODE_AUTH_TOKEN}and, with no token supplied, exports NODE_AUTH_TOKEN as the literal placeholderXXXXX-XXXXX-XXXXX-XXXXX, so npm authenticates with a bogus token instead of falling through to OIDC. - The release job pins npm to the
11.xline before publishing — OIDC needs >= 11.5.1 and Node 22 still bundles 10.x. Provenance is automatic under trusted publishing, so the explicit--provenanceflag is gone; attestation coverage is unchanged.
[0.1.1] - 2026-05-24
- BREAKING (UX): default is now headed (visible browser) instead of headless. An interactive MCP server should let the user watch the agent work. Pass
--headlessexplicitly for batch/CI usage. Smithery default flipped to match.
[0.1.0] - 2026-05-24
- Initial release. ~62 MCP tools backed by CloakHQ/CloakBrowser, covering full Playwright-MCP parity plus a Cloak-exclusive stealth/profile/audit/binary-management layer.
- CLI:
--caps,--profile-dir,--headless/--headed,--proxy,--timezone,--locale,--user-agent,--viewport,--geoip,--humanize,--fingerprint-seed,--allowed-domains,--blocked-domains,--enable-unsafe-eval,--upload-allow-dir,--download-dir,--max-pages,--self-test. - Smithery YAML for one-click integration.
- MIT-licensed wrapper; upstream CloakBrowser Chromium binary remains proprietary-free-redistribute-prohibited.
License
- Wrapper code: MIT (this package).
- CloakBrowser Chromium binary: proprietary, free to use, no redistribution. See https://github.com/CloakHQ/CloakBrowser/blob/main/BINARY-LICENSE.md.
Acknowledgments
- CloakHQ/CloakBrowser — the patched Chromium that does the real work.
- @playwright/mcp — tool naming and accessibility-tree-first design inspired this server.
- @modelcontextprotocol/sdk — the MCP plumbing.
來源:README.md,提交 54de25c
工具
0版本歷史
1- v0.2.0最新Oct 21, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。