Camoufox MCP
A local MCP server for authorized browser automation using Camoufox, managing multiple tabs and providing 21 browser tools for interaction.
README
Camoufox MCP
Camoufox MCP is a local stdio MCP server for authorized browser automation. Use it only on sites and systems that you own or are permitted to test. It does not grant permission to bypass site policies, access controls, or legal restrictions.
The server embeds one Camoufox browser session, manages multiple tabs, and exposes 21 browser tools to MCP clients. Debian/Linux is the primary supported runtime target. Linux and Docker use Xvfb-backed virtual headful mode by default.
Pinned versions
- Python package:
cloverlabs-camoufox==0.6.0 - Default installed build selector:
150.0.2-alpha.26 - Default release provenance: release tag
v150.0.2-beta.25
Release tags are provenance labels only. Python and Docker installations use the same manifest-pinned default build. CAMOUFOX_MCP_BROWSER_VERSION accepts only selectors listed in browser_builds.json. Startup verifies the selected local build; it never downloads a browser, changes the selection, reads Camoufox's global active version, or silently falls back.
Install with Python
Python 3.12, uv, and a Debian/Linux runtime are required.
uv sync --frozen
uv run python -m playwright install-deps firefox
uv run python -m camoufox sync
uv run camoufox-mcp-install-browser
uv run camoufox-mcp
camoufox-mcp-install-browser reads browser_builds.json, downloads the pinned build, selects it, and validates the executable, runtime library, and version metadata. In a non-TTY environment it suppresses repetitive addon percentage output while preserving error diagnostics. playwright install-deps firefox installs system libraries only. Do not run playwright install firefox; Camoufox uses its own browser builds. Xvfb is required for the default virtual display mode on Linux. The Python startup preflight is supported on Linux and checks the selected build in the XDG Camoufox cache ($XDG_CACHE_HOME, or ~/.cache when unset). The default preflight is not supported on non-Linux platforms.
Install with Docker
The image supports Linux amd64 only and contains the manifest-pinned browser build. Docker Desktop users must start the Docker daemon and select Linux containers before building or running it.
docker build --platform linux/amd64 -t camoufox-mcp:dev .
docker run --rm -i camoufox-mcp:dev
Use -i for MCP stdio and do not allocate a TTY with -t. The image runs as UID 10001 under tini. Browser files are stored in /home/camoufox/.cache/camoufox and are installed at image build time. Runtime startup performs local installation checks only.
MCP client configuration
Python checkout:
{
"mcpServers": {
"camoufox": {
"command": "uv",
"args": ["run", "python", "-m", "camoufox_mcp"]
}
}
}
Docker:
{
"mcpServers": {
"camoufox": {
"command": "docker",
"args": ["run", "--rm", "-i", "camoufox-mcp:dev"]
}
}
}
All protocol data uses stdout. Diagnostics and logs use stderr only.
Hermes
Hermes 应直接启动虚拟环境生成的 camoufox-mcp 可执行文件,不需要传递 args。这样可以避开 Hermes 对重复 --args 和列表配置的解析限制:
hermes mcp add camoufox --command "/absolute/path/to/.venv/bin/camoufox-mcp"
对应的 YAML 配置无需 args 字段:
mcp_servers:
camoufox:
command: /absolute/path/to/.venv/bin/camoufox-mcp
当前清单默认选择 150.0.2-alpha.26,因此无需额外设置 CAMOUFOX_MCP_BROWSER_VERSION。只有在清单未来重新加入其他已验证构建时,才需要用该环境变量显式切换。
Tools
Lifecycle:
browser_start: Start the managed browser and return its status.browser_status: Return state, build selector, display mode, active page, and page count.browser_stop: Close all pages and release browser and display resources.
Tabs:
page_new: Create a tab and optionally navigate it to a URL.page_list: List registered pages and active-page metadata.page_select: Select a registered page as active.page_close: Close a specified page or the active page.
Navigation:
page_navigate: Navigate to an allowed URL.page_back: Navigate backward in history.page_forward: Navigate forward in history.page_reload: Reload a page.
Observation:
page_snapshot: Return a bounded semantic snapshot.page_screenshot: Return a bounded PNG image and page metadata.
Interaction:
page_click: Click one uniquely resolved target.page_fill: Replace the value of one uniquely resolved target.page_type: Type text sequentially with an optional delay.page_press: Press a key on one uniquely resolved target.page_hover: Hover over one uniquely resolved target.page_select_option: Select an option by value.page_wait: Wait on a discriminatedcondition:sleepfor 1 through 10000 milliseconds,load_stateforload,domcontentloaded, ornetworkidle, ortargetforattached,detached,visible, orhidden. Sleep waits do not accepttimeout_ms. Other waits default to the configured action timeout, capped at 60000 milliseconds; an explicittimeout_msmust be between 1 and 60000. The wait holds the selected page's operation lock for its full duration.page_evaluate: Evaluate arbitrary JavaScript in the selected page context with JSON-compatible input. Expressions default to a 100000-character limit, encoded arguments to 1000000 bytes, and results and evaluation error messages toCAMOUFOX_MCP_MAX_EVALUATE_BYTES. JavaScript can read storage available to the page and make requests permitted by the browser, so this tool assumes a trusted, authorized MCP client. Error-message length limiting is a resource boundary, not secret removal.
Target JSON
Role and accessible name are preferred:
{
"target": {
"kind": "role",
"value": "button",
"name": "Sign in",
"exact": true
}
}
Supported kind values are role, label, placeholder, text, test_id, css, and xpath. The optional zero-based index selects an explicit match. Without index, zero matches return TARGET_NOT_FOUND and multiple matches return TARGET_NOT_UNIQUE.
Environment variables
CAMOUFOX_MCP_BROWSER_VERSION: Browser build selector. Default150.0.2-alpha.26; only selectors inbrowser_builds.jsonare accepted.CAMOUFOX_MCP_DISPLAY_MODE:virtual,headful, orheadless. Defaultvirtual.CAMOUFOX_MCP_ACTION_TIMEOUT_MS: Action timeout, 1 to 300000. Default30000.CAMOUFOX_MCP_NAVIGATION_TIMEOUT_MS: Navigation timeout, 1 to 300000. Default30000.CAMOUFOX_MCP_MAX_SNAPSHOT_CHARS: Snapshot limit, 1 to 200000. Default50000.CAMOUFOX_MCP_MAX_EVALUATE_EXPRESSION_CHARS: Evaluation expression limit, 1 to 1000000 characters. Default100000.CAMOUFOX_MCP_MAX_EVALUATE_ARGUMENT_BYTES: Encoded evaluation argument limit, 1 to 5000000 bytes. Default1000000.CAMOUFOX_MCP_MAX_EVALUATE_BYTES: Encoded evaluation result and error-message limit, 2 to 5000000 bytes. Default1000000.CAMOUFOX_MCP_MAX_SCREENSHOT_BYTES: Screenshot limit, 1 to 50000000. Default10000000.CAMOUFOX_MCP_LOG_LEVEL: Python log level. DefaultINFO.
Configuration is loaded once at process startup. Invalid values fail startup instead of silently falling back or reading Camoufox's global active version.
Tests
uv run python -m pytest tests/unit tests/contract -q
uv run ruff check src tests
docker build --platform linux/amd64 -t camoufox-mcp:dev .
uv run python -m pytest tests/integration/test_docker_smoke.py -m integration -q
The integration test serves a deterministic local page, drives the container through the official MCP stdio client, and verifies the pinned browser build. It skips with an explicit reason when the Docker daemon is unavailable.
Initial release limitations
- One browser session per MCP server process.
- No persistent profile, cookies, or login state.
- No HTTP or SSE transport.
- No proxy pool, file upload, or download management.
- No automated CAPTCHA handling.
- Only
http,https, andabout:blanknavigation is allowed. - No automatic browser upgrades or fallback after startup failure.
- No guarantee of bypassing anti-bot systems or site risk controls.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。