invisible-playwright-mcp
This MCP server exposes an anti-detect Firefox browser that passes bot-detection tests, allowing LLMs to automate web interactions with humanized clicks and fingerprint randomization.
README
invisible-playwright-mcp
An MCP server that exposes
invisible_playwright — an
anti-detect Firefox that passes every bot-detection test — to LLMs.
Your assistant can launch a fingerprint-randomized browser, navigate, click, type, read the DOM, and take screenshots through it, using the standard Playwright surface, but with a patched Firefox engine under the hood.
The patched Firefox binary is a one-time ~100 MB download (
python -m invisible_playwright fetch, or thefetch_binarytool).
How it works
invisible_playwrightis a drop-in Playwright replacement that patches Firefox at the C++ level (navigator, GPU/WebGL, canvas, fonts, audio, WebRTC, timezone, network) and humanizes mouse motion in the driver.- An MCP server is a resident process, which is exactly what a stateful
browser needs. This server keeps long-lived sessions in-process; each
session owns an
InvisiblePlaywrightinstance plus one or more pages. Tools operate on the session's active page unless told otherwise.
LLM ──MCP/stdio──► server ──► InvisiblePlaywright ──► patched Firefox
▲ (async API)
sessions held in-process
Install
pip install -e . # or: pip install invisible-playwright-mcp
python -m invisible_playwright fetch # one-time ~100 MB, SHA256-verified
Requires Python 3.11+. Supported platforms: Windows x86_64, Linux x86_64/arm64, macOS arm64/x86_64.
On macOS the app is ad-hoc signed (not notarized): if Gatekeeper complains, clear the quarantine flag once with
xattr -dr com.apple.quarantineon the cachedFirefox.app.
Configure your MCP client
opencode (opencode.json)
{
"mcp": {
"invisible-playwright": {
"type": "local",
"command": ["invisible-playwright-mcp"],
"enabled": true
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"invisible-playwright": {
"command": "invisible-playwright-mcp"
}
}
}
Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"invisible-playwright": {
"command": "invisible-playwright-mcp"
}
}
}
If the console script isn't on PATH, use the module form instead:
{ "command": "python", "args": ["-m", "invisible_playwright_mcp"] }
Quick start (for the LLM)
fetch_binary(once) — download the patched Firefox ifbinary_statussaysready: false.start_session→ returnssession_id,seed, and the initialpage_id. Pass aproxy_serverfor residential/socks proxies.gotoa URL, thenquery_elements/get_text/screenshotto understand the page.click/fill/press_keyto act. Mouse motion is humanized.close_sessionwhen done (or just let the server shut down — the lifespan cleans up all Firefox processes).
Log the seed to replay an identical fingerprint later (start_session with
the same seed).
Tool reference
Setup / binary
| Tool | Description |
|---|---|
binary_status |
Is the patched Firefox cached? Does not download. |
fetch_binary |
Download + SHA256-verify the binary (~100 MB, one-time). force=True to re-download. |
Session lifecycle
| Tool | Description |
|---|---|
start_session |
Launch a browser with a fresh/seeded fingerprint. Returns session_id, seed, page_id. |
close_session |
Close a session and free its Firefox process. |
list_sessions |
Active session ids. |
session_info |
Pages, active page, current url/title for a session. |
Pages
| Tool | Description |
|---|---|
new_page |
Open a new tab; becomes the active page. |
close_page |
Close a page (active by default). |
switch_page |
Change the active page. |
list_pages |
Pages in a session. |
Navigation
goto, go_back, go_forward, reload
Interaction (humanized)
click, fill, type_text, press_key, keyboard_press, select_option,
hover, focus, check, uncheck, scroll
Reading
get_url, get_title, get_text, get_html, get_attribute,
query_elements, is_visible
query_elements returns a structured snapshot (tag, id, name, type, role, href,
text, value, placeholder, visible, bounding rect) so the LLM can decide what to
click without scraping raw HTML.
Screenshot
screenshot → returns image content directly to the LLM. Defaults to JPEG
(quality=85) to keep payloads small; image_format="png" for lossless.
full_page=True captures the whole scrollable page.
Waiting
wait_for_selector, wait_for_timeout
Advanced
evaluate — run arbitrary JavaScript in the page and return its value. Powerful;
use sparingly.
start_session parameters
| Param | Default | Notes |
|---|---|---|
seed |
random | Reproducible fingerprint when set. |
headless |
true |
Windows/macOS self-cloak the window. |
proxy_server |
"" |
socks5://host:1080, http://..., etc. DNS routes via proxy. |
proxy_username / proxy_password |
"" |
Proxy auth. |
timezone |
"" |
IANA zone; empty = auto from egress IP. |
locale |
"auto" |
auto = from egress country, or e.g. en-US. |
humanize |
true |
Bezier mouse paths + human timing. |
profile_dir |
"" |
Persistent profile path (enables persistent context). |
prep_recaptcha |
false |
Pre-seed reCAPTCHA cookies (non-persistent only). |
Notes & caveats
- IP matters. The browser fingerprint is handled; ~90% of captchas that remain are from known/blocked proxy IPs. Use clean residential IPs.
- First
start_sessionneeds network to resolve geo/timezone (and to download the binary if you skippedfetch_binary). - Humanized clicks are slower than vanilla Playwright — raise
timeout_msif needed. evaluateruns arbitrary JS — only enable for trusted use.- All logging goes to stderr so it never corrupts the stdio JSON-RPC stream.
- Calls against a single session must be sequential (the natural LLM pattern: the model waits for each tool result before sending the next). Concurrent calls to one session are not supported.
License
MIT. The patched Firefox binary is MPL-2.0 (Firefox upstream). This wrapper does not redistribute the binary; it downloads it on demand from the upstream releases.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。