SM

saik0s/mcp-browser-use

浏览器自动化

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

972 stars 110 forks 质量 67 趋势 22MIT

MCP服务器赋予AI助手控制网页浏览器的能力。

概览

MCP服务器赋予AI助手控制网页浏览器的能力。 这将浏览器作为MCP服务器包裹,使Claude(或任何MCP客户端)能够自动化真实浏览器——浏览页面、填写表单、点击按钮、提取数据等。 浏览器自动化任务需要30-120+秒。标准MCP标准传输在长时间运行操作时存在超时问题——连接在任务中途中断。它作为一个持久守护进程运行,无论时长如何都能可靠地处理请求。 安装为 Claude Code 插件以实现自动设置: 插件自动:- 首次运行时安装 Playwright 浏览器 - Claude 代码启动时启动 HTTP 守护进程 - 用 Claude 注册 MCP 服务器 (浏览器代理需要一个大型语言模型来决定动作): 就是这样!Claude现在可以使用浏览器自动化工具。 对于其他MCP客户端或独立用途:

概述(AI 翻译)

MCP服务器赋予AI助手控制网页浏览器的能力。


目录

  • 这是什么?
  • 安装
  • Web UI
  • 网页仪表盘
  • 配置
  • CLI 参考
  • MCP 工具
  • 深度研究
  • 可观测性
  • 技能系统
  • REST API 参考
  • 建筑学
  • 许可证

这是什么?

这将浏览器作为MCP服务器包裹,使Claude(或任何MCP客户端)能够自动化真实浏览器——浏览页面、填写表单、点击按钮、提取数据等。

为什么是 HTTP 而不是 stdio?

浏览器自动化任务需要30-120+秒。标准MCP的标准传输在长时间运行操作时存在超时问题——连接在任务中途中断。**HTTP传输通过作为持久守护进程运行,无论时长如何都能可靠地处理请求,从而解决了这个问题。


安装

Claude 代码插件(推荐)

安装为 Claude Code 插件以实现自动设置:

插件会自动:

  • 首次运行时安装Playwright浏览器
  • 当 Claude Code 启动时启动 HTTP 守护进程
  • 向 Claude 注册 MCP 服务器

设置你的API密钥(浏览器代理需要LLM来决定操作):

就是这样!Claude现在可以使用浏览器自动化工具。

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

README

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

mcp-server-browser-use

MCP server that gives AI assistants the power to control a web browser.


Table of Contents


What is this?

This wraps browser-use as an MCP server, letting Claude (or any MCP client) automate a real browser—navigate pages, fill forms, click buttons, extract data, and more.

Why HTTP instead of stdio?

Browser automation tasks take 30-120+ seconds. The standard MCP stdio transport has timeout issues with long-running operations—connections drop mid-task. HTTP transport solves this by running as a persistent daemon that handles requests reliably regardless of duration.


Installation

Install as a Claude Code plugin for automatic setup:

# Install the plugin
/plugin install browser-use/mcp-browser-use

The plugin automatically:

  • Installs Playwright browsers on first run
  • Starts the HTTP daemon when Claude Code starts
  • Registers the MCP server with Claude

Set your API key (the browser agent needs an LLM to decide actions):

# Set API key (environment variable - recommended)
export GEMINI_API_KEY=your-key-here

# Or use config file
mcp-server-browser-use config set -k llm.api_key -v your-key-here

That’s it! Claude can now use browser automation tools.

Manual Installation

For other MCP clients or standalone use:

# Clone and install
git clone https://github.com/Saik0s/mcp-browser-use.git
cd mcp-server-browser-use
uv sync

# Install browser
uv run playwright install chromium

# Start the server
uv run mcp-server-browser-use server

Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "browser-use": {
      "type": "streamable-http",
      "url": "http://localhost:8383/mcp"
    }
  }
}

For MCP clients that don’t support HTTP transport, use mcp-remote as a proxy:

{
  "mcpServers": {
    "browser-use": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8383/mcp"]
    }
  }
}

Web UI

Access the task viewer at http://localhost:8383 when the daemon is running.

Features:

  • Real-time task list with status and progress
  • Task details with execution logs
  • Server health status and uptime
  • Running tasks monitoring

The web UI provides visibility into browser automation tasks without requiring CLI commands.


Web Dashboard

在 GitHub 查看完整 README

安装

npx mcp-remote http://localhost:8383/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "browser-use": { "type": "streamable-http", "url": "http://localhost:8383/mcp" } } }