KS

kontext-security/browser-use-mcp-server

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

849 stars 118 forks 质量 82 趋势 26MIT

可以直接浏览网页,比如光标等。

概览

开源AI驱动的网页浏览器 - 。用代理浏览器简化您的开发工作流程 - uv - 快速 Python 包管理器 - Playwright - 浏览器自动化 - mcp-proxy - 标准模式必备 - [x] :通过AI代理控制浏览器 - [x] :支持SSE和标准协议 - [x] :实时监控浏览器自动化 - [x] :异步执行浏览器操作 要在本地开发和测试该软件包: 4. 进行修改后,重建并重新安装: 使用 Docker 为服务器运行提供了一个一致且隔离的环境。 注意:卷挂载中的 :ro 标志(-v)使密码文件在容器内为只读,以增强安全性。 默认密码:浏览器使用(除非用自定义密码方法覆盖)

概述(AI 翻译)

一个MCP服务器,使AI代理能够控制网页浏览器,使用 浏览器使用。

** 🌐 想要Vibe Browse the Web?** 开源AI驱动的浏览器 - Vibe 浏览器。

** 🔗 管理多个MCP服务器?** 用代理浏览器简化你的开发工作流程

先修条件

  • uv - 快速 Python 包管理器
  • Playwright - 浏览器自动化
  • mcp-proxy - stdio 模式所需

环境

创建一个 .env 文件:

安装

用途

SSE模式

标准模式

客户端配置

SSE 模式客户端配置

stdio 模式客户端配置

配置位置

客户端 配置路径
光标 ./.cursor/mcp.json
风帆冲浪 ~/.codeium/windsurf/mcp_config.json
克劳德(Mac) ~/Library/Application Support/Claude/claude_desktop_config.json
克劳德(Windows) %APPDATA%\Claude\claude_desktop_config.json

特色

  • [x] 浏览器自动化:通过AI代理控制浏览器
  • [x] 双传输:支持SSE和标准协议
  • [x] **VNC 流媒体:实时观看浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

browser-use-mcp-server

Prerequisites

# Install prerequisites
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install mcp-proxy
uv tool update-shell

Environment

Create a .env file:

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

Installation

# Install dependencies
uv sync
uv pip install playwright
uv run playwright install --with-deps --no-shell chromium

Usage

SSE Mode

# Run directly from source
uv run server --port 8000

stdio Mode

# 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

Client Configuration

SSE Mode Client Configuration

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

stdio Mode Client Configuration

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

Config Locations

Client Configuration Path
Cursor ./.cursor/mcp.json
Windsurf ~/.codeium/windsurf/mcp_config.json
Claude (Mac) ~/Library/Application Support/Claude/claude_desktop_config.json
在 GitHub 查看完整 README

安装

docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server
新手?先看 mcpskill.org 教程 →

配置

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