MCP Browser 控制器

@co-browser/browser-use-mcp-server
12 Stars 4.8k 次浏览 co-browser 更新于 2026-08-23

一个MCP服务器,它通过自然语言命令使AI助手能够控制网络浏览器,允许它们通过SSE传输浏览网站和提取信息。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "browser-server": {
      "args": [
        "run",
        "server",
        "--port",
        "8000",
        "--stdio",
        "--proxy-port",
        "9000"
      ],
      "command": "browser-use-mcp-server",
      "env": {
        "OPENAI_API_KEY": "your-api-key"
      }
    },
    "browser-use-mcp-server": {
      "url": "http://localhost:8000/sse"
    }
  }
}

服务介绍

➡️ browser-use mcp server

browser-use MCP Server with SSE transport

要求

  • uv
curl -LsSf https://astral.sh/uv/install.sh | sh

快速开始

uv sync
uv pip install playwright
uv run playwright install --with-deps --no-shell chromium
uv run server --port 8000
  • .env 文件需要以下内容:
OPENAI_API_KEY=[your api key]
CHROME_PATH=[only change this if you have a custom chrome build]
PATIENT=false # Set to true if you want api calls to wait for tasks to complete (default is false)
  • 我们将增加对其他 LLM 提供商的支持,以支持 browser-use(例如 Claude, Grok, Bedrock 等)

在构建 Docker 镜像时,您可以使用 Docker 秘钥来设置 VNC 密码:

# With Docker secrets (recommended for production)
echo "your-secure-password" > vnc_password.txt
docker run -v $(pwd)/vnc_password.txt:/run/secrets/vnc_password your-image-name

# Or during development with the default password
docker build .

工具

  • SSE 传输
  • browser_use - 使用 URL 和操作启动浏览器任务
  • browser_get_result - 获取异步浏览器任务的结果
  • VNC 服务器 - 将容器化的浏览器流式传输到客户端

VNC

Dockerfile 中包含一个默认密码为 browser-use 的 VNC 服务器。连接方法如下:

docker build -t  browser-use-mcp-server .
docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server
git clone https://github.com/novnc/noVNC
cd noVNC
./utils/novnc_proxy --vnc localhost:5900

支持的客户端

  • cursor.ai
  • claude desktop
  • claude code
  • windsurf (windsurf 目前还不支持 SSE)

使用方法

运行服务器后,在您的客户端界面中添加 http://localhost:8000/sse,或者在 mcp.json 文件中添加:

{
  "mcpServers": {
    "browser-use-mcp-server": {
      "url": "http://localhost:8000/sse"
    }
  }
}

cursor

  • ./.cursor/mcp.json

windsurf

  • ~/.codeium/windsurf/mcp_config.json

claude

  • ~/Library/Application Support/Claude/claude_desktop_config.json
  • %APPDATA%\Claude\claude_desktop_config.json

然后尝试向您的 LLM 提出以下请求:

打开 https://news.ycombinator.com 并返回排名最高的文章

帮助

对于问题或兴趣,请联系 @ https://cobrowser.xyz

星标

相关 MCP 服务