browser-use-mcp-server

Browse the web, directly from Cursor etc.

564 stars
69 forks
Available MCP Tools 0 tools

Model Context Protocol tools provided by this server

No tools information available for this server.

Check the GitHub repository or documentation for more details.

README

Twitter URL Discord PyPI version

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

*� Managing multiple MCP servers? Simplify your development workflow with agent-browser

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

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

Usage

SSE Mode

uv run server --port 8000

stdio Mode

uv build
uv tool uninstall browser-use-mcp-server 2>/dev/null || true
uv tool install dist/browser_use_mcp_server-*.whl

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

ClientConfiguration Path
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

Features

  • Browser Automation: Control browsers through AI agents
  • Dual Transport: Support for both SSE and stdio protocols
  • VNC Streaming: Watch browser automation in real-time
  • Async Tasks: Execute browser operations asynchronously

Local Development

To develop and test the package locally:

  1. Build a distributable wheel:
    uv build
  2. Install it as a global tool:
    uv tool uninstall browser-use-mcp-server 2>/dev/null || true
    uv tool install dist/browser_use_mcp_server-*.whl
  3. Run from any directory:
    export OPENAI_API_KEY=your-api-key-here
    
    OPENAI_API_KEY=your-api-key-here browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000
  4. After making changes, rebuild and reinstall:
    uv build
    uv tool uninstall browser-use-mcp-server
    uv tool install dist/browser_use_mcp_server-*.whl

Docker

Using Docker provides a consistent and isolated environment for running the server.

docker build -t browser-use-mcp-server .

docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server

echo "your-secure-password" > vnc_password.txt
docker run --rm -p8000:8000 -p5900:5900 \
  -v $(pwd)/vnc_password.txt:/run/secrets/vnc_password:ro \
  browser-use-mcp-server

Note: The :ro flag in the volume mount (-v) makes the password file read-only inside the container for added security.

VNC Viewer

git clone https://github.com/novnc/noVNC
cd noVNC
./utils/novnc_proxy --vnc localhost:5900

Default password: browser-use (unless overridden using the custom password method)

VNC Screenshot

VNC Screenshot

Example

Try asking your AI:

open https://news.ycombinator.com and return the top ranked article

Support

For issues or inquiries: cobrowser.xyz

Star History

Star History Chart
Details
Category Browser Automation
Scope local
Language Python
License MIT License
OS Support
linux macos windows