wraith-mcp

wraith-mcp

An AI-native stealth browser MCP server that uses AI vision navigation and bot detection bypass, enabling natural language browser automation.

Category
访问服务器

README

wraith-mcp

PyPI License: MIT

AI-native stealth browser MCP server. Tell it what to do — it figures out how.

Browser Use (AI vision navigation) + Patchright (bot detection bypass).

Why This One?

wraith-mcp playwright-mcp stealth-browser-mcp browser-use-mcp-server
Navigation AI vision (self-healing) CSS selectors CSS selectors AI vision
Bot detection bypass Patchright (binary-level) None nodriver None
Tools 17 — keyless navigate/snapshot/click/type_text/… + AI browse/extract 20+ 90+ via Agent
Keyless (no API key) Yes — client AI drives low-level tools directly Yes Yes No
Site layout changes Adapts automatically Breaks Breaks Adapts
LLM providers 6 (Anthropic, OpenAI, OpenRouter, Google, Ollama, +compatible) N/A 1 1

One command does it all — no selectors, no step-by-step scripting:

"Log into my dashboard and download the monthly report"

Quick Start

Add wraith-mcp as MCP server

Install

pip install wraith-mcp

Setup

Add to your MCP config (.mcp.json, .cursor/mcp.json, .windsurf/mcp.json, etc.):

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

Works with any MCP client: Cursor, Windsurf, VS Code, Cline, Roo Code, OpenCode, Codex, and more.

The browser window is visible by default. Set "HEADLESS": "true" in env to run it headless — recommended for servers, CI, and Docker (the Docker image already sets it).

These clients call Wraith over MCP. The low-level tools work with no API key — your client's AI drives them directly. The autonomous browse/extract tools use MCP sampling when supported, otherwise a fallback key (see below).

Do I Need an API Key?

No — for the low-level tools. navigate, snapshot, click, type_text, scroll, press_key, get_content, screenshot, pdf, and tabs need no API key: your MCP client's model (Claude Code, Codex, OpenCode, …) calls them directly and is the brain, exactly like playwright-mcp.

Only the autonomous Agent toolsbrowse and extract, which plan the steps themselves — need a model. They use MCP sampling when the client supports it, otherwise a fallback provider key. Note that many clients, including Claude Code today, do not implement MCP sampling, so browse/extract need a fallback key there (ANTHROPIC_API_KEY, OPENROUTER_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, or Ollama via OLLAMA_MODEL). The low-level tools work either way.

Tools

Keyless — your client's AI drives the browser directly, no API key:

Tool Description
navigate Open a URL; returns the page's interactive elements
snapshot List interactive elements as [index] <tag> text
click Click an element by index (from snapshot)
type_text Type text into an element by index
scroll Scroll the page
press_key Press a key or chord (e.g. Enter, Control+a)
get_content Current page as clean markdown
screenshot Capture a page as base64 PNG
pdf Render a page to base64 PDF (headless only)
tabs List, open, or close tabs
list_downloads List files downloaded this session (saved to ./downloads by default)
save_storage_state Save cookies + localStorage to a file (restore via BROWSER_STORAGE_STATE)
list_sessions / close_session / close_all_sessions Manage persistent sessions

Autonomous AI Agent — needs MCP sampling or a fallback key:

Tool Description
browse Execute any browser task in natural language
extract Pull structured data from a page

The low-level tools share a persistent browser via session_id (default "default"): call navigate once, then snapshot/click/type_text/… reuse the same page. browse/extract also accept session_id.

Fallback LLM Providers

Use these only when your MCP client does not support sampling, or when you want to force Wraith to use an explicit provider.

Provider Key
Anthropic (default) ANTHROPIC_API_KEY
OpenRouter OPENROUTER_API_KEY
OpenAI OPENAI_API_KEY
DeepSeek / Groq / Together OPENAI_API_KEY + OPENAI_BASE_URL
Google Gemini GOOGLE_API_KEY
Ollama (local) OLLAMA_MODEL

Set BROWSER_USE_MODEL to override the default model or provide a sampling model hint to the MCP client.

Browser Options

Wraith keeps its default browser profile unless optional env vars are set. It can forward Browser Use profile knobs for domain policy (BROWSER_ALLOWED_DOMAINS, BROWSER_PROHIBITED_DOMAINS, BROWSER_BLOCK_IP_ADDRESSES=true for Browser Use's direct-IP navigation block), session/artifacts (BROWSER_STORAGE_STATE, BROWSER_USER_DATA_DIR, BROWSER_DOWNLOADS_PATH, BROWSER_RECORD_HAR_PATH, BROWSER_RECORD_VIDEO_DIR, BROWSER_TRACES_DIR), and permissions, viewport, or wait timing (BROWSER_PERMISSIONS, BROWSER_VIEWPORT, BROWSER_MINIMUM_WAIT_PAGE_LOAD_TIME, BROWSER_WAIT_FOR_NETWORK_IDLE_PAGE_LOAD_TIME, BROWSER_WAIT_BETWEEN_ACTIONS) when the installed Browser Use BrowserProfile supports those fields. Domain/IP policy env vars fail closed on unsupported Browser Use versions.

Locale & timezone (stealth): by default Wraith pins neither — it inherits the host locale and timezone so they stay consistent with your exit IP. Forcing en-US on a non-US IP is itself a bot signal, so set these only when routing through a proxy: point BROWSER_LOCALE and BROWSER_TIMEZONE at the proxy's region (e.g. en-US + America/New_York) so locale, timezone, and IP agree. BROWSER_TIMEZONE is applied via CDP (Emulation.setTimezoneOverride) because Browser Use's BrowserProfile has no timezone field.

Downloads: files save to ./downloads (relative to the server's working directory) by default so they persist — Browser Use otherwise uses a temp dir that gets cleaned up on session stop, losing the file. Override with BROWSER_DOWNLOADS_PATH, and use the list_downloads tool to retrieve the saved paths after a click/navigate triggers a download.

Docker

docker build -t wraith-mcp .
docker run -i --rm wraith-mcp

SSE mode for local-only testing:

docker run -p 127.0.0.1:8808:8808 wraith-mcp --transport sse --host 0.0.0.0 --port 8808

Do not expose the SSE port directly to an untrusted network. If you need remote access, put it behind an authenticated proxy or SSH tunnel and restrict browsing with BROWSER_ALLOWED_DOMAINS plus BROWSER_BLOCK_IP_ADDRESSES=true.

SSE Transport

wraith-mcp --transport sse --host 127.0.0.1 --port 8808

The SSE host defaults to 127.0.0.1. Binding to 0.0.0.0 is only appropriate behind an authenticated proxy or another trusted network boundary.

How It Works

Keyless (low-level tools) — your MCP client's AI is the brain:

Client AI -> MCP Server -> Patchright Chromium
  1. navigate opens a page and returns its interactive elements
  2. The client AI reads the [index] <tag> text snapshot and decides what to do
  3. It calls click/type_text/scroll/… by index — no model runs in Wraith
  4. Patchright executes without triggering bot detection

Autonomous (browse/extract) — Wraith drives a Browser Use Agent:

AI Agent -> MCP Server -> Browser Use Agent -> Patchright Chromium
  1. Describe a task in natural language
  2. Browser Use asks the MCP client model through sampling, or a fallback provider
  3. Browser Use sees the page (screenshot + DOM) and decides actions
  4. Patchright executes without triggering bot detection

Security

  • URL scheme validation (http/https only)
  • max_steps capped at 50 server-side
  • Input length capped at 4000 chars
  • Task timeout (default 120s, configurable via BROWSER_TASK_TIMEOUT)
  • Proxy support via PROXY_SERVER
  • SSE transport binds to 127.0.0.1 by default; do not expose it directly without authentication
  • Browser Use page context is sent to the MCP client model via sampling, or to the configured fallback provider

Limitations

  • Binary-level stealth only (no Runtime.enable CDP fix)
  • Enterprise WAFs may still block without residential proxies
  • Fresh browser per call (~3s startup)
  • The low-level tools (navigate/snapshot/click/…) are keyless — no model needed
  • browse/extract need MCP sampling or a fallback key; many clients (incl. Claude Code) don't implement sampling, so a fallback key is required there

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选