browser-use-mcp-server
Browse the web, directly from Cursor etc. Built for the Model Context Protocol to enhance AI capabilities. Python-based implementation.
Documentation
browser-use-mcp-server
Prerequisites
- uv - Fast Python package manager
- Playwright - Browser automation
- mcp-proxy - Required for stdio mode
# Install prerequisites
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install mcp-proxy
uv tool update-shellEnvironment
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 completionInstallation
# Install dependencies
uv sync
uv pip install playwright
uv run playwright install --with-deps --no-shell chromiumUsage
SSE Mode
# Run directly from source
uv run server --port 8000stdio 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 9000Client 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` |
| Claude (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
Features
- [x] Browser Automation: Control browsers through AI agents
- [x] Dual Transport: Support for both SSE and stdio protocols
- [x] VNC Streaming: Watch browser automation in real-time
- [x] Async Tasks: Execute browser operations asynchronously
Local Development
To develop and test the package locally:
1. Build a distributable wheel:
# From the project root directory
uv build2. 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-*.whl3. Run from any directory:
# Set your OpenAI API key for the current session
export OPENAI_API_KEY=your-api-key-here
# Or provide it inline for a one-time run
OPENAI_API_KEY=your-api-key-here browser-use-mcp-server run server --port 8000 --stdio --proxy-port 90004. After making changes, rebuild and reinstall:
uv build
uv tool uninstall browser-use-mcp-server
uv tool install dist/browser_use_mcp_server-*.whlDocker
Using Docker provides a consistent and isolated environment for running the server.
# Build the Docker image
docker build -t browser-use-mcp-server .
# Run the container with the default VNC password ("browser-use")
# --rm ensures the container is automatically removed when it stops
# -p 8000:8000 maps the server port
# -p 5900:5900 maps the VNC port
docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server
# Run with a custom VNC password read from a file
# Create a file (e.g., vnc_password.txt) containing only your desired password
echo "your-secure-password" > vnc_password.txt
# Mount the password file as a secret inside the container
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
# Browser-based viewer
git clone https://github.com/novnc/noVNC
cd noVNC
./utils/novnc_proxy --vnc localhost:5900Default password: `browser-use` (unless overridden using the custom password method)
Example
Try asking your AI:
open https://news.ycombinator.com and return the top ranked articleSupport
For issues or inquiries: cobrowser.xyz
Star History
Frequently asked questions
What is browser-use-mcp-server?
browser-use-mcp-server is Browse the web, directly from Cursor etc. Built for the Model Context Protocol to enhance AI capabilities. Python-based implementation.
How do I install browser-use-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is browser-use-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/co-browser/browser-use-mcp-server and has 760 stars.
Related MCP tools
Vibetest MCP - automated QA testing using Browser-Use agents Python-based implementation. Trusted by 500+ developers. Trusted by 500+ developers.
🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support Python-based implementation.
An MCP server that autonomously evaluates web applications. Python-based implementation. Trusted by 1100+ developers. Trusted by 1100+ developers.
An official Qdrant Model Context Protocol (MCP) server implementation Python-based implementation. Trusted by 1000+ developers.
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth! Python-based implementation. Trusted by 11000+ developers.
Official MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP