关于 browser-use-mcp-server
browser-use-mcp-server 是一个 MCP 服务,让 Cursor、Windsurf、Claude 等客户端中的 AI Agent 通过 browser-use 控制网页浏览器。支持 SSE 与 stdio 两种传输方式,并可通过 VNC 实时观看浏览器操作。
主要功能
- 01AI Agent 控制浏览器执行网页操作
- 02支持 SSE 与 stdio 传输
- 03VNC 实时查看浏览器画面
- 04异步执行浏览器任务
- 05提供 Docker 运行环境
适用场景
- 01在 Cursor 中让 AI 打开网页并提取信息
- 02通过 VNC 观察自动化浏览过程
- 03在容器中运行隔离的浏览器自动化服务
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
browser-use-mcp-server
一个 MCP 服务,可借助 browser-use 让 AI Agent 控制网页浏览器。
🌐 想要随心浏览网页? 试试开源 AI 驱动的网页浏览器——Vibe Browser。
🔗 需要管理多个 MCP 服务? 使用 agent-browser 简化开发工作流。
前置条件
- uv - 快速的 Python 包管理器
- Playwright - 浏览器自动化
- mcp-proxy - stdio 模式必需
# Install prerequisites
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install mcp-proxy
uv tool update-shell
环境
创建一个 .env 文件:
OPENAI_API_KEY=your-api-key
CHROME_PATH=optional/path/to/chrome
PATIENT=false # Set to true if API calls should wait for task completion
安装
# Install dependencies
uv sync
uv pip install playwright
uv run playwright install --with-deps --no-shell chromium
使用方法
SSE 模式
# Run directly from source
uv run server --port 8000
stdio 模式
# 1. Build and install globally
uv build
uv tool uninstall browser-use-mcp-server 2>/dev/null || true
uv tool install dist/browser_use_mcp_server-*.whl
# 2. Run with stdio transport
browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000
客户端配置
SSE 模式客户端配置
{
"mcpServers": {
"browser-use-mcp-server": {
"url": "http://localhost:8000/sse"
}
}
}
stdio 模式客户端配置
{
"mcpServers": {
"browser-server": {
"command": "browser-use-mcp-server",
"args": [
"run",
"server",
"--port",
"8000",
"--stdio",
"--proxy-port",
"9000"
],
"env": {
"OPENAI_API_KEY": "your-api-key"
}
}
}
}
配置文件位置
| 客户端 | 配置路径 |
|---|---|
| Cursor | ./.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Claude (Mac) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
功能
- 浏览器自动化:通过 AI Agent 控制浏览器
- 双传输模式:同时支持 SSE 和 stdio 协议
- VNC 串流:实时查看浏览器自动化过程
- 异步任务:异步执行浏览器操作
本地开发
在本地开发和测试此软件包:
-
构建可分发的 wheel:
# From the project root directory uv build -
将其安装为全局工具:
uv tool uninstall browser-use-mcp-server 2>/dev/null || true uv tool install dist/browser_use_mcp_server-*.whl -
从任意目录运行:
# Set your OpenAI API key for the current session export OPENAI_API_KEY=your-api-key-here # Or provide it inline for a one-time run OPENAI_API_KEY=your-api-key-here browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000 -
修改后,重新构建并安装:
uv build uv tool uninstall browser-use-mcp-server uv tool install dist/browser_use_mcp_server-*.whl
Docker
使用 Docker 可为运行此服务提供一致且隔离的环境。
# Build the Docker image
docker build -t browser-use-mcp-server .
# Run the container with the default VNC password ("browser-use")
# --rm ensures the container is automatically removed when it stops
# -p 8000:8000 maps the server port
# -p 5900:5900 maps the VNC port
docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server
# Run with a custom VNC password read from a file
# Create a file (e.g., vnc_password.txt) containing only your desired password
echo "your-secure-password" > vnc_password.txt
# Mount the password file as a secret inside the container
docker run --rm -p8000:8000 -p5900:5900 \
-v $(pwd)/vnc_password.txt:/run/secrets/vnc_password:ro \
browser-use-mcp-server
注意:卷挂载中的 :ro 标志(-v)会将密码文件设为容器内只读,从而增强安全性。
VNC 查看器
# Browser-based viewer
git clone https://github.com/novnc/noVNC
cd noVNC
./utils/novnc_proxy --vnc localhost:5900
默认密码:browser-use(除非通过自定义密码方式覆盖)
示例
试着向 AI 提问:
open https://news.ycombinator.com and return the top ranked article
支持
如有问题或咨询,请访问:cobrowser.xyz
Star 历史
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。