Back to MCP directory
publicPublicdnsLocal runtime

co-browser_browser-use-mcp-server

一个基于browser-use的MCP服务器,允许AI代理通过SSE或stdio协议控制网页浏览器,支持实时VNC监控和异步任务执行。

article

README

🚀 浏览器使用的MCP服务器

这是一个MCP服务器,借助browser-use,AI代理能够对网络浏览器进行控制,为AI在浏览器操作场景提供了便利。

Twitter URL PyPI版本

🚀 快速开始

在使用该服务器前,需要完成一系列准备工作,包括安装先决条件、进行环境配置和安装依赖项。

✨ 主要特性

  • 支持SSE模式和标准I/O模式运行。
  • 提供多种命令来管理服务器,如启动、停止、重启和检查状态。
  • 可通过环境变量灵活配置端口和日志级别。

📦 安装指南

先决条件

# 安装先决条件
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  # 设置为true以使API调用等待任务完成

安装依赖项

# 安装依赖项
uv sync
uv pip install playwright
uv run playwright install --with-deps --no-shell chromium

💻 使用示例

基础用法

SSE模式

# 直接从源代码运行
uv run server --port 8000

标准I/O模式

# 1. 构建并全局安装
uv build
uv tool uninstall mcp-proxy
uv tool install browser-use-mcp-server

# 2. 运行服务器
browser-use-mcp-server run --port 8000

支持的命令

browser-use-mcp-server [以下任何一种]:
    start       # 启动服务器,默认在8000端口运行
    stop        # 停止正在运行的服务器
    restart     # 重启正在运行的服务器
    status      # 检查服务状态

环境变量配置

PORT=8000       # 可选,默认为8000,设置以指定端口
LOG_LEVEL=info # 可选,默认为warning,支持 debug、info、warning 和 error

示例任务

尝试让您的AI执行以下操作:

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

📚 详细文档

如需帮助或报告问题:cobrowser.xyz

🌟 星河历史

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client