Token导航 LogoToken导航

MCP Server · 浏览器工具

MCP Browser Use Server (mcp-browser-use-server)

MCP浏览器使用服务器为AI代理提供了一个强大的、生产就绪的接口,通过模型上下文协议(MCP)与Web浏览器交互,支持服务器发送事件(SSE)和标准I/O传输。

stdio官方级别未说明来源级核验工具 10
浏览器自动化PythonClaudeClaude DesktopCursorWindsurf

快速开始

作者 / 组织
hubertusgbecker
提供方
hubertusgbecker
运行时
Python

工具数量

10

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

2

仓库热度

收录来源

1 个

MCP World

选型结论

MCP Browser Use Server (mcp-browser-use-server) 属于浏览器工具类 MCP Server,公开资料标注 10 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude、Cursor,有可以直接复制的安装命令;接入前要先准备 API Key。

分类

浏览器工具

传输方式

stdio

认证方式

API Key

部署方式

公开资料未说明

安装与配置

安装命令

uv run playwright install --with-deps --no-shell chromium

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 10 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

mcp-browser-use-server

An MCP server that enables AI agents to control web browsers using browser-use.

Overview

The MCP Browser Use Server provides a robust, production-ready interface for AI agents to interact with web browsers through the Model Context Protocol (MCP). It supports both Server-Sent Events (SSE) and stdio transports, enabling seamless integration with various AI assistants and tools.

Key Features

  • Browser Automation: Full browser control through AI agents
  • Dual Transport: SSE and stdio protocol support
  • VNC Streaming: Real-time browser visualization
  • Async Tasks: Non-blocking browser operations
  • Docker Support: Containerized deployment with docker-compose
  • Persistent Sessions: Long-lived browser sessions with live inspection, tab control and content extraction (see server/session.py)
  • Comprehensive Tests: Industry-ready test suite with 95%+ coverage
  • Production Ready: Robust error handling and resource management

Quick Start

Prerequisites

Ensure you have the following installed:

  • uv - Fast Python package manager
  • Playwright - Browser automation library
  • mcp-proxy - Required for stdio mode
# uv (Astral) is required for Python workflows.
# For CI (GitHub Actions) prefer the `astral-sh/setup-uv@v5` action which
# installs and configures `uv` on the runner with caching support. Example:
  • name: Set up Python and uv

uses: astral-sh/setup-uv@v5 with: enable-cache: true python-version: "3.11"


# Install mcp-proxy globally
uv tool install mcp-proxy

# Update shell to recognize new tools
uv tool update-shell

Environment Configuration

Create a .env file in the project root:

# Required: OpenAI API key for LLM
# Recommended: set `LLM_MODEL` environment variable to your preferred model
# Default: `gpt-5-mini` (you can override with models like `gpt-4-turbo` or `gpt-4o` if available)
OPENAI_API_KEY=your-openai-api-key-here
LLM_MODEL=gpt-5-mini

# Optional: Custom Chrome/Chromium path
CHROME_PATH=/path/to/chrome

# Optional: Patient mode (wait for task completion)
PATIENT=false

# Optional: Logging level
LOG_LEVEL=INFO

# Control headless browser mode used by the server (true = headless, false = visible)
# Default: true
BROWSER_HEADLESS=true
Security Note: Never commit your .env file to version control. It's already included in .gitignore.

Installation

From Source (Development)

# Clone the repository
git clone https://github.com/hubertusgbecker/mcp-browser-use-server.git
cd mcp-browser-use-server

# Install dependencies with uv
uv sync

# Install Playwright browsers
uv pip install playwright
uv run playwright install --with-deps --no-shell chromium

As a Package (Production)

# Build and install from source
uv build
uv tool install dist/mcp_browser_use_server-*.whl

Usage

SSE Mode (Recommended for Web Interfaces)

Server-Sent Events mode is ideal for web-based integrations and remote access.

# Run from source
uv run server --port ${HOST_PORT:-8081}

# Or if installed as tool
mcp-browser-use-server run server --port ${HOST_PORT:-8081}

The server will be available at http://localhost:${HOST_PORT:-8081}/sse

stdio Mode (For Local AI Assistants)

Standard I/O mode is perfect for local AI assistants like Claude Desktop, Cursor, or Windsurf.

# Build and install as global tool
uv build
uv tool uninstall mcp-browser-use-server 2>/dev/null || true
uv tool install dist/mcp_browser_use_server-*.whl

# Run with stdio transport
mcp-browser-use-server run server --port ${HOST_PORT:-8081} --stdio --proxy-port ${PROXY_PORT:-9000}

Note: this package also exposes a CLI alias mcp-browser-use-cli that points to the same entrypoint. You can use either mcp-browser-use-server or mcp-browser-use-cli after installation.

Docker Deployment

Docker provides an isolated, reproducible environment with VNC support for visualization.

# Using docker-compose (recommended)
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

# Or use Docker directly
docker build -t mcp-browser-use-server .
docker run --rm -p ${HOST_PORT:-8081}:8081 -p 5900:5900 \
  -e OPENAI_API_KEY=your-key \
  mcp-browser-use-server
Docker Compose Profiles

The docker-compose.yaml supports multiple profiles:

# Development mode with hot reload
docker-compose --profile dev up

# With stdio proxy
docker-compose --profile stdio up

# With monitoring (Prometheus + Grafana)
docker-compose --profile monitoring up

Client Configuration

SSE Mode Configuration

For web-based clients and remote connections:

{
  "mcpServers": {
    "mcp-browser-use-server": {
      "url": "http://localhost:${HOST_PORT:-8081}/sse"
    }
  }
}

stdio Mode Configuration

For local AI assistants:

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

Configuration Paths by Client

ClientConfiguration File Path
Cursor./.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
Claude (Mac)~/Library/Application Support/Claude/claude_desktop_config.json
Claude (Win)%APPDATA%\Claude\claude_desktop_config.json

Testing

The project includes a comprehensive test suite for ensuring reliability and correctness.

Running Tests

# Run all tests
./run_tests.sh all

# Run only unit tests
./run_tests.sh unit

# Run integration tests
./run_tests.sh integration

# Run with coverage report
./run_tests.sh coverage

# Run fast tests only (skip slow tests)
./run_tests.sh fast

# Or use pytest directly
uv run pytest tests/
uv run pytest tests/ -v --cov=src --cov=server

CI
--
The repository includes a GitHub Actions workflow that runs ruff and the fast test
suite on pushes and pull requests to `main`. The workflow file is at
`.github/workflows/ci-lint-test.yml`.

Run the same checks locally before pushing:

Format and lint with ruff (via the project's uv wrapper)

uv run ruff format . uv run ruff check .

Run the fast test suite (the same target used by CI)

./run_tests.sh fast

Test Categories

  • Unit Tests: Fast, isolated tests for individual functions
  • Integration Tests: Test component interactions
  • E2E Tests: Full system tests (require RUN_E2E_TESTS=true)
  • Performance Tests: Load and performance validation
  • MAGG Integration Tests: Shell script for testing Magg aggregator integration

MAGG Integration Testing

The project includes a shell script for validating integration with the Magg aggregator:

# Run MAGG integration test
./tests/test_magg_integration.sh

# The script automatically:
# - Reads HOST_PORT from .env file if present
# - Checks Docker container status and health
# - Verifies Magg configuration
# - Tests browser tools availability through Magg
# - Validates end-to-end browser automation (hubertusbecker.com summary)

Requirements:

  • Docker container running on the configured port (default: 8081)
  • Magg running and configured (see .magg/config.json)
  • The mbro command-line tool available

Port Configuration: The script automatically reads HOST_PORT from .env:

# .env
HOST_PORT=8083  # Match your docker-compose port mapping

If the health check fails, the script provides troubleshooting steps.

CI/CD Integration

Tests are designed to run in CI/CD pipelines. See .github/workflows/ for GitHub Actions examples.

VNC Browser Visualization

Watch browser automation in real-time using VNC:

# Start server with VNC (Docker)
docker-compose up -d

# Connect using noVNC (browser-based)
git clone https://github.com/novnc/noVNC
cd noVNC
./utils/novnc_proxy --vnc localhost:5900

# Or use any VNC client
# Default password: browser-use

Then open in your browser to watch the automation.

Development

Local Development Workflow

# Install development dependencies
uv sync --all-extras

# Run linters and formatters
uv run ruff check .
uv run ruff format .
uv run black .
uv run isort .

# Type checking
uvx ty check .

# Run tests during development
uv run pytest tests/ -v

# Build package
uv build

Project Structure

mcp-browser-use-server/
├── src/
│   └── mcp_browser_use_server/  # Package source
│       ├── __init__.py
│       ├── cli.py               # CLI interface
│       └── server.py            # Server re-exports
├── server/
│   ├── __init__.py
│   ├── __main__.py
│   └── server.py                # Core server implementation
├── tests/                       # Comprehensive test suite
│   ├── conftest.py              # Pytest fixtures
│   ├── test_config.py           # Configuration tests
│   ├── test_browser_tasks.py   # Browser task tests
│   ├── test_mcp_server.py      # MCP server tests
│   ├── test_integration.py     # Integration tests
│   ├── test_e2e.py             # End-to-end tests
│   └── test_performance.py     # Performance tests
├── docker-compose.yaml          # Docker orchestration
├── Dockerfile                   # Container definition
├── pyproject.toml              # Project configuration
├── pytest.ini                  # Test configuration
└── README.md                   # This file

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Run the test suite (./run_tests.sh all)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Quality Standards

  • Test Coverage: Maintain >95% coverage
  • Type Hints: All functions must have type annotations
  • Documentation: Docstrings for all public APIs
  • Linting: Code must pass ruff and ty checks
  • Formatting: Use black and isort for consistent formatting

Example Usage

Basic Browser Task

Ask your AI assistant:

Navigate to https://news.ycombinator.com and return the top ranked article's title and URL

Advanced Examples

# Search and extract
Go to Google, search for "MCP protocol", and summarize the first 3 results

# Form interaction
Navigate to the contact form at example.com/contact, fill in the fields with test data, and submit

# Data extraction
Visit GitHub's trending page and list the top 5 trending repositories today

# Screenshot capture
Navigate to example.com and take a screenshot of the homepage

API Reference

Available MCP Tools

The server exposes the following tools via MCP:

  • run_browser_task: Execute a browser automation task

- Parameters: instruction (string), task_id (optional) - Returns: Task ID for async tracking

  • get_task_status: Check the status of a running task

- Parameters: task_id (string) - Returns: Task status, progress, and results

  • cancel_task: Cancel a running browser task

- Parameters: task_id (string) - Returns: Cancellation confirmation

  • list_all_tasks: List all tasks

- Returns: Array of all tasks with their statuses

New session and browser tools

  • browser_get_state: Get current browser state for a task or live session

- Parameters: task_id (optional) or session_id (optional), screenshot (bool) - Returns: JSON state summary; screenshot=true returns base64 PNG

  • browser_navigate: Navigate an existing or new live session to a URL

- Parameters: url (string), optional session_id - Returns: Confirmation and updated session state

  • browser_click: Click an element in a live session (by index)

- Parameters: session_id, element_index - Returns: Action result

  • browser_extract_content: Use session extraction (LLM-assisted) to extract or summarize content

- Parameters: session_id, instruction (string) - Returns: Extracted text or structured result

  • Session management: browser_list_sessions, browser_close_session to list and close long-lived sessions
  • Tabs API: browser_list_tabs, browser_switch_tab, browser_close_tab for tab control

These tools are implemented in server/server.py and rely on the session manager server/session.py.

Available MCP Resources

  • Task Results: Access completed task results via task://{task_id}
  • Task History: View task execution history

Troubleshooting

Common Issues

Issue: OPENAI_API_KEY not set

# Solution: Set the API key in .env or environment
export OPENAI_API_KEY=your-key-here

Issue: Chrome/Chromium not found

# Solution: Install Chromium via Playwright
uv run playwright install chromium --with-deps

# Or specify custom path in .env
CHROME_PATH=/usr/bin/chromium-browser

Issue: Tests failing

# Solution: Ensure all dependencies are installed
uv sync --all-extras
uv run playwright install chromium

# Run tests with verbose output
uv run pytest tests/ -vv

Issue: Port already in use

# Solution: Use a different port
uv run server --port 8001

# Or find and kill the process using the port
lsof -ti:8081 | xargs kill -9

Debug Mode

Enable detailed logging for troubleshooting:

# Set log level in .env
LOG_LEVEL=DEBUG

# Or via environment variable
LOG_LEVEL=DEBUG uv run server --port 8081

Architecture

The server follows a modular architecture:

  1. MCP Server: Handles protocol communication (SSE/stdio)
  2. Browser Manager: Manages browser instances and contexts
  3. Task Queue: Async task execution and tracking
  4. Agent System: AI-powered browser automation via browser-use
  5. Resource Manager: Memory and cleanup management

See AGENTS.md for detailed architecture documentation.

Performance

  • Concurrent Tasks: Supports multiple simultaneous browser tasks
  • Memory Management: Automatic cleanup of old tasks and browser contexts
  • Resource Limits: Configurable via Docker compose
  • Async Operations: Non-blocking task execution

Typical performance metrics:

  • Task startup: <2 seconds
  • Simple navigation: 3-5 seconds
  • Complex automation: 10-30 seconds
  • Memory per browser: 200-500 MB

Security

Best Practices

  • Never commit .env files or API keys to version control
  • Use Docker secrets for production deployments
  • Limit exposed ports in production
  • Set resource limits via Docker to prevent DoS
  • Validate all user inputs in browser tasks
  • Use HTTPS for SSE mode in production

Environment Isolation

Docker provides strong isolation. For additional security:

# In docker-compose.yaml
security_opt:
  - no-new-privileges:true
read_only: true
tmpfs:
  - /tmp
  - /var/tmp

License

This project is licensed under the MIT License. See LICENSE for details.

Copyright (c) 2025 Dr. Hubertus Becker

Acknowledgments

  • Built on browser-use for browser automation
  • Uses MCP for AI agent communication
  • Powered by Playwright for browser control
  • Package management via uv

Support & Contact

Changelog

Version 0.9.5 (2025-11-11)

  • Complete rebranding and optimization
  • Comprehensive test suite added
  • Docker Compose support
  • Enhanced documentation
  • Production-ready deployment configuration

• Repository

工具与能力

工具数量

10

资源数量

0

提示词数量

0

能力标签

浏览器自动化Python本地部署AI代理MCP协议服务器发送事件标准I/O传输

支持客户端

Claude DesktopClaudeCursorWindsurf

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

自动操作网页

打开页面、点击、填表,把浏览器动作交给模型执行。

抓结构化数据

把页面内容整理成表格或 JSON,省掉手工复制粘贴。

走一遍关键流程

按步骤检查页面是否正常,回归时少漏环节。

选择建议

值得选的地方

  • 工具数量 10 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 需要自备API Key,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在浏览器工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到API Key的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP Browser Use Server (mcp-browser-use-server)

MCP World · 本页

10stdio有1 个2026-05-17
Fetch 9a2682de

MCP.so

1SSE有3 个2026-05-17
Browser 738d52bc

MCP World

0stdio有1 个2026-05-17
Playwright MCP Server

MCP.so

21stdio有4 个2026-05-17
Skyvern MCP

MCP World

0stdio有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP Browser Use Server (mcp-browser-use-server) 怎么安装?

公开资料给出的安装命令是 uv run playwright install --with-deps --no-shell chromium,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

MCP Browser Use Server (mcp-browser-use-server) 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

MCP Browser Use Server (mcp-browser-use-server) 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Browser Use Server (mcp-browser-use-server) 需要 API Key 吗?

公开资料标注的认证方式是API Key,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

MCP Browser Use Server (mcp-browser-use-server) 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude、Cursor、Windsurf;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP