camofox-browser-mcp

camofox-browser-mcp

MCP server for controlling a local camofox-browser instance, enabling LLM agents to perform web automation tasks such as navigation, interaction, snapshotting, and content extraction.

Category
访问服务器

README

<p align="center"> <img src="./logo.png" alt="camofox-browser-mcp" width="200"> </p>

<h1 align="center">camofox-browser-mcp</h1>

<p align="center"> MCP server for controlling a local camofox-browser instance. </p>

<p align="center"> <img src="https://img.shields.io/badge/license-MIT-green" alt="license"> <img src="https://img.shields.io/badge/language-typescript-blue" alt="language"> <a href="https://www.npmjs.com/package/camofox-browser-mcp"><img alt="npm" src="https://img.shields.io/npm/v/camofox-browser-mcp.svg" /></a> <a href="https://www.npmjs.com/package/camofox-browser-mcp"><img alt="npm downloads" src="https://badgen.net/npm/dt/camofox-browser-mcp" /></a> <img src="https://img.shields.io/badge/mcp-sdk-orange" alt="mcp"> <a href="https://github.com/Microck/opencode-studio"><img src="https://img.shields.io/badge/opencode-studio-brown?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABiElEQVR4nF2Sv0tWcRTGPyeVIpCWwmyJGqQagsqCsL2hhobsD3BvdWhoj%2F6CiIKaoqXBdMjKRWwQgqZ%2BokSvkIhg9BOT9xPn9Vx79cD3cu6953zP8zznCQB1V0S01d3AKeAKcBVYA94DjyJioru2k9SHE%2Bqc%2Bkd9rL7yf7TUm%2BpQ05yPUM%2Bo626Pp%2BqE2q7GGfWrOpjNnWnAOPAGeAK8Bb4U5D3AJ%2BAQsAAMAHfVvl7gIrAf2Kjiz8BZYB3YC%2FwFpoGDwHfgEnA0oU7tgHiheEShyXxY%2FVn%2Fn6ljye8DcBiYAloRcV3tAdrV1xMRG%2Bo94DywCAwmx33AJHASWK7iiAjzNFOBl7WapPYtYdyo8RlLqVpOVPvq9KoH1NUuOneycaRefqnP1ftdUyiOt5KS%2BqLWdDpVzTXMl5It4Jr6u%2BQ%2FnhyBc8C7jpowGxGvmxuPqT9qyYuFIKdP71B8WT3SOKexXLrntvqxq3BefaiuFMQ0wqZftxl3M78MjBasfiDN%2FSAi0kFbtf8ACtKBWZBDoJEAAAAASUVORK5CYII%3D" alt="Add with OpenCode Studio" /></a> </p>


quick installation

paste this into your llm agent session:

Install and configure camofox-browser-mcp by following the instructions here:
https://raw.githubusercontent.com/Microck/camofox-browser-mcp/refs/heads/main/INSTALL.md

npm (recommended)

npm install -g camofox-browser-mcp

MCP server for controlling a local jo-inc/camofox-browser instance.

This server exposes the full practical camofox-browser workflow to LLM agents: tab lifecycle, navigation, interaction, snapshots, screenshots, links, stats, cookie import, session cleanup, YouTube transcript extraction, and high-level composite helpers (navigate_and_snapshot, scroll_and_snapshot, fill_form, type_and_submit, batch_click, web_search).

Prerequisites

  1. Node.js 22+ (required for the npm package)
  2. Optional: Bun (recommended for local development): https://bun.sh/docs/installation
  3. A running camofox-browser server (default http://127.0.0.1:9377)
  4. Optional, depending on tools used:
    • CAMOFOX_API_KEY for cookie import
    • CAMOFOX_ADMIN_KEY for browser stop endpoint

Installation

Local development checkout

git clone https://github.com/Microck/camofox-browser-mcp.git
cd camofox-browser-mcp
bun install
bun run typecheck
bun run build

npm package

npm install -g camofox-browser-mcp

# optional smoke-run (most users just configure their MCP client)
camofox-browser-mcp

Configuration

Set these environment variables in your MCP client config.

Variable Required Default Purpose
CAMOFOX_BASE_URL yes http://127.0.0.1:9377 Base URL of running camofox-browser server
CAMOFOX_URL alias unset Compatibility alias for CAMOFOX_BASE_URL
CAMOFOX_TIMEOUT_MS no 30000 HTTP timeout for camofox calls
CAMOFOX_TIMEOUT alias unset Compatibility alias for CAMOFOX_TIMEOUT_MS
CAMOFOX_DEFAULT_USER_ID no default-user Default userId when omitted
CAMOFOX_DEFAULT_SESSION_KEY no default-session Default sessionKey when omitted
CAMOFOX_API_KEY for camofox_import_cookies unset Bearer key for /sessions/:userId/cookies
CAMOFOX_ADMIN_KEY for camofox_stop_browser unset Admin key sent as x-admin-key for /stop
CAMOFOX_AUTOSTART_SERVER no true When baseUrl is localhost and server is unreachable, try to spawn camofox-browser automatically
CAMOFOX_AUTOSTART_COMMAND no camofox-browser Command used to spawn the camofox-browser HTTP server
CAMOFOX_AUTOSTART_TIMEOUT_MS no 15000 Max time to wait for the spawned server to answer /health

Example MCP config (local build)

{
  "mcpServers": {
    "camofox-browser-mcp": {
      "command": "bun",
      "args": ["/absolute/path/to/camofox-browser-mcp/dist/index.js"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "CAMOFOX_BASE_URL": "http://127.0.0.1:9377",
        "CAMOFOX_DEFAULT_USER_ID": "default-user",
        "CAMOFOX_DEFAULT_SESSION_KEY": "default-session",
        "CAMOFOX_API_KEY": "",
        "CAMOFOX_ADMIN_KEY": ""
      }
    }
  }
}

Tool coverage

The MCP toolset maps to camofox-browser endpoints and includes compatibility aliases for common camofox-mcp prompts.

Server and session tools

MCP tool Endpoint Notes
camofox_health GET /health Runtime and browser status
server_status alias of camofox_health Compatibility alias
camofox_start_browser POST /start Starts browser engine
camofox_stop_browser POST /stop Requires admin key
camofox_close_session DELETE /sessions/:userId Closes all tabs/context for user
camofox_import_cookies POST /sessions/:userId/cookies Requires API key

Tab lifecycle tools

MCP tool Endpoint Notes
camofox_list_tabs GET /tabs Lists open tabs by user
list_tabs alias of camofox_list_tabs Compatibility alias
camofox_create_tab POST /tabs Creates tab with optional URL
create_tab alias of camofox_create_tab Compatibility alias
camofox_close_tab DELETE /tabs/:tabId Closes one tab
close_tab alias of camofox_close_tab Compatibility alias
camofox_close_tab_group DELETE /tabs/group/:listItemId Closes all tabs in group
camofox_get_stats GET /tabs/:tabId/stats Usage stats and visited URLs

Navigation and interaction tools

MCP tool Endpoint Notes
camofox_navigate_tab POST /tabs/:tabId/navigate URL or macro navigation
navigate alias of camofox_navigate_tab Compatibility alias
navigate_and_snapshot composite Navigate, wait, then snapshot
camofox_wait POST /tabs/:tabId/wait Wait for page readiness
camofox_wait_for_text POST /act (kind=wait) Wait for text appearance
camofox_get_snapshot GET /tabs/:tabId/snapshot Ref-based accessibility snapshot
snapshot alias of camofox_get_snapshot Compatibility alias
scroll_and_snapshot composite Scroll, then snapshot
camofox_click POST /tabs/:tabId/click Click by ref or selector
batch_click composite Execute multiple clicks sequentially
camofox_type POST /tabs/:tabId/type Type text by ref/selector
type_text alias of camofox_type Compatibility alias
type_and_submit composite Type then press submit key
fill_form composite Fill multiple fields + optional submit click
camofox_hover POST /act (kind=hover) Hover by ref or selector
camofox_press POST /tabs/:tabId/press Keyboard press
camofox_scroll POST /tabs/:tabId/scroll Vertical scroll
camofox_scroll_element POST /act (kind=scrollIntoView) Scroll referenced element into view
camofox_back POST /tabs/:tabId/back History back
go_back alias of camofox_back Compatibility alias
camofox_forward POST /tabs/:tabId/forward History forward
go_forward alias of camofox_forward Compatibility alias
camofox_refresh POST /tabs/:tabId/refresh Page reload
refresh alias of camofox_refresh Compatibility alias
camofox_get_links GET /tabs/:tabId/links Extract page links
camofox_screenshot GET /tabs/:tabId/screenshot Returns base64 PNG
web_search macro wrapper around navigate Multi-engine search helper

Content extraction tools

MCP tool Endpoint Notes
camofox_youtube_transcript POST /youtube/transcript Extracts YouTube captions

Supported web_search engines

web_search maps engine values to backend macros:

  • google, youtube, amazon, reddit, wikipedia, twitter, yelp
  • spotify, netflix, linkedin, instagram, tiktok, twitch

Compatibility notes

  • list_profiles, save_profile, load_profile, and delete_profile are not exposed yet because current jo-inc/camofox-browser APIs do not provide cookie export/profile endpoints.

Typical workflow

  1. camofox_start_browser
  2. camofox_create_tab (or camofox_list_tabs + reuse)
  3. camofox_navigate_tab
  4. camofox_get_snapshot
  5. Interact with refs: camofox_click, camofox_type, camofox_press, camofox_scroll
  6. Re-run camofox_get_snapshot after major page changes
  7. Cleanup with camofox_close_tab or camofox_close_session

Macro support

camofox_navigate_tab passes macro and query through to camofox-browser. Upstream macros include:

  • @google_search
  • @youtube_search
  • @amazon_search
  • @reddit_search
  • @reddit_subreddit
  • @wikipedia_search
  • @twitter_search
  • @yelp_search
  • @spotify_search
  • @netflix_search
  • @linkedin_search
  • @instagram_search
  • @tiktok_search
  • @twitch_search

Troubleshooting

  • camofox_health fails: check CAMOFOX_BASE_URL and confirm backend is running.
  • camofox_import_cookies 403: set CAMOFOX_API_KEY in both backend and MCP env.
  • camofox_stop_browser 403: set CAMOFOX_ADMIN_KEY in both backend and MCP env.
  • Missing refs after navigation: call camofox_get_snapshot again.

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选