Get the FREE Ultimate OpenClaw Setup Guide →

browser-use

Browse the web, directly from Cursor etc.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kontext-dev-browser-use-mcp-server uvx browser_use_mcp_server \
  --env OPENAI_API_KEY="your-api-key"

How to use

This MCP server enables AI agents to control web browsers by interfacing with the browser-use library. It supports two transport modes: Server-Sent Events (SSE) and stdio. In SSE mode, you run the server normally and connect clients via the SSE endpoint to issue commands and receive streaming results. In stdio mode, the server communicates over standard input/output, suitable for embedding in local tools or when a proxy is used to tunnel traffic. The server exposes capabilities for browser automation, including navigating pages, interacting with elements, and performing asynchronous tasks, with real-time VNC streaming available for visual debugging. To use the server, install the Python package browser_use_mcp_server, start the server on a port (e.g., 8000), and configure clients to point to the appropriate transport endpoint (http://localhost:8000/sse for SSE, or the stdio/proxy flow for stdio). Ensure you provide an OpenAI API key if the server relies on that service for task execution, and set CHROME_PATH if you need a custom Chrome/Chromium binary path.

How to install

Prerequisites:

  • Python runtime and uv (uv is a Python package manager helper)
  • Playwright for browser automation
  • mcp-proxy (required for stdio mode)

Installation steps:

  1. Install uv and prerequisites (example on Unix-like systems): curl -LsSf https://astral.sh/uv/install.sh | sh uv tool install mcp-proxy uv tool update-shell

  2. Install Playwright and browser binaries: uv sync uv pip install playwright uv run playwright install --with-deps --no-shell chromium

  3. Build and install the MCP server package locally (from repository checkout): uv build uv tool uninstall browser-use-mcp-server 2>/dev/null || true uv tool install dist/browser_use_mcp_server-*.whl

  4. Run the server (choose SSE or stdio mode):

    • SSE mode: OPENAI_API_KEY=your-api-key uv run server --port 8000
    • stdio mode (with proxy): browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000

Prerequisites notes:

  • Ensure OPENAI_API_KEY is set if required by your setup.
  • In stdio mode, a proxy port may be needed to bridge stdio with the host tools.

Additional notes

Tips and considerations:

  • In Docker deployments, you can expose ports 8000 (server) and 5900 (VNC) as documented in the README. If using a custom VNC password, mount the password file as a secret inside the container.
  • The default VNC password is 'browser-use' unless overridden.
  • For stability in long-running tasks, consider setting PATIENT=false if you do not want tasks to wait for completion, or adjust to true for synchronous task results.
  • If you encounter issues with browser automation, ensure Playwright browsers are properly installed and accessible within the environment.
  • Client configuration examples are provided in the README for both SSE and stdio modes. Ensure your MCP client points to the correct transport endpoint.
  • When using stdio mode, the CLI entry point is 'browser-use-mcp-server', and you may need to adjust the proxy-port settings to fit your environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers