An MCP server that enables AI agents to control web browsers using browser-use. - uv - Fast Python package manager - Playwright - Browser automation - mcp-proxy - Required for stdio mode Create a .env file: - [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] Asyn
Add this skill
npx mdskills install co-browser/browser-use-mcp-serverWell-documented browser automation MCP server with dual transport modes and VNC streaming
1# browser-use-mcp-server23<div align="center">45[](https://x.com/cobrowser)6[](https://discord.gg/gw9UpFUhyY)7[](https://badge.fury.io/py/browser-use-mcp-server)89**An MCP server that enables AI agents to control web browsers using10[browser-use](https://github.com/browser-use/browser-use).**1112> **๐ Want to Vibe Browse the Web?** Open-source AI-powered web browser - [**Vibe Browser**](https://github.com/co-browser/vibe).13>14> **๐ Managing multiple MCP servers?** Simplify your development workflow with [agent-browser](https://github.com/co-browser/agent-browser)1516</div>1718## Prerequisites1920- [uv](https://github.com/astral-sh/uv) - Fast Python package manager21- [Playwright](https://playwright.dev/) - Browser automation22- [mcp-proxy](https://github.com/sparfenyuk/mcp-proxy) - Required for stdio mode2324```bash25# Install prerequisites26curl -LsSf https://astral.sh/uv/install.sh | sh27uv tool install mcp-proxy28uv tool update-shell29```3031## Environment3233Create a `.env` file:3435```bash36OPENAI_API_KEY=your-api-key37CHROME_PATH=optional/path/to/chrome38PATIENT=false # Set to true if API calls should wait for task completion39```4041## Installation4243```bash44# Install dependencies45uv sync46uv pip install playwright47uv run playwright install --with-deps --no-shell chromium48```4950## Usage5152### SSE Mode5354```bash55# Run directly from source56uv run server --port 800057```5859### stdio Mode6061```bash62# 1. Build and install globally63uv build64uv tool uninstall browser-use-mcp-server 2>/dev/null || true65uv tool install dist/browser_use_mcp_server-*.whl6667# 2. Run with stdio transport68browser-use-mcp-server run server --port 8000 --stdio --proxy-port 900069```7071## Client Configuration7273### SSE Mode Client Configuration7475```json76{77 "mcpServers": {78 "browser-use-mcp-server": {79 "url": "http://localhost:8000/sse"80 }81 }82}83```8485### stdio Mode Client Configuration8687```json88{89 "mcpServers": {90 "browser-server": {91 "command": "browser-use-mcp-server",92 "args": [93 "run",94 "server",95 "--port",96 "8000",97 "--stdio",98 "--proxy-port",99 "9000"100 ],101 "env": {102 "OPENAI_API_KEY": "your-api-key"103 }104 }105 }106}107```108109### Config Locations110111| Client | Configuration Path |112| ---------------- | ----------------------------------------------------------------- |113| Cursor | `./.cursor/mcp.json` |114| Windsurf | `~/.codeium/windsurf/mcp_config.json` |115| Claude (Mac) | `~/Library/Application Support/Claude/claude_desktop_config.json` |116| Claude (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |117118## Features119120- [x] **Browser Automation**: Control browsers through AI agents121- [x] **Dual Transport**: Support for both SSE and stdio protocols122- [x] **VNC Streaming**: Watch browser automation in real-time123- [x] **Async Tasks**: Execute browser operations asynchronously124125## Local Development126127To develop and test the package locally:1281291. Build a distributable wheel:130131 ```bash132 # From the project root directory133 uv build134 ```1351362. Install it as a global tool:137138 ```bash139 uv tool uninstall browser-use-mcp-server 2>/dev/null || true140 uv tool install dist/browser_use_mcp_server-*.whl141 ```1421433. Run from any directory:144145 ```bash146 # Set your OpenAI API key for the current session147 export OPENAI_API_KEY=your-api-key-here148149 # Or provide it inline for a one-time run150 OPENAI_API_KEY=your-api-key-here browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000151 ```1521534. After making changes, rebuild and reinstall:154 ```bash155 uv build156 uv tool uninstall browser-use-mcp-server157 uv tool install dist/browser_use_mcp_server-*.whl158 ```159160## Docker161162Using Docker provides a consistent and isolated environment for running the server.163164```bash165# Build the Docker image166docker build -t browser-use-mcp-server .167168# Run the container with the default VNC password ("browser-use")169# --rm ensures the container is automatically removed when it stops170# -p 8000:8000 maps the server port171# -p 5900:5900 maps the VNC port172docker run --rm -p8000:8000 -p5900:5900 browser-use-mcp-server173174# Run with a custom VNC password read from a file175# Create a file (e.g., vnc_password.txt) containing only your desired password176echo "your-secure-password" > vnc_password.txt177# Mount the password file as a secret inside the container178docker run --rm -p8000:8000 -p5900:5900 \179 -v $(pwd)/vnc_password.txt:/run/secrets/vnc_password:ro \180 browser-use-mcp-server181```182183*Note: The `:ro` flag in the volume mount (`-v`) makes the password file read-only inside the container for added security.*184185### VNC Viewer186187```bash188# Browser-based viewer189git clone https://github.com/novnc/noVNC190cd noVNC191./utils/novnc_proxy --vnc localhost:5900192```193194Default password: `browser-use` (unless overridden using the custom password method)195196<div align="center">197 <img width="428" alt="VNC Screenshot" src="https://github.com/user-attachments/assets/45bc5bee-418d-4182-94f5-db84b4fc0b3a" />198 <br><br>199 <img width="428" alt="VNC Screenshot" src="https://github.com/user-attachments/assets/7db53f41-fc00-4e48-8892-f7108096f9c4" />200</div>201202## Example203204Try asking your AI:205206```text207open https://news.ycombinator.com and return the top ranked article208```209210## Support211212For issues or inquiries: [cobrowser.xyz](https://cobrowser.xyz)213214## Star History215216<div align="center">217 <picture>218 <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=co-browser/browser-use-mcp-server&type=Date&theme=dark" />219 <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=co-browser/browser-use-mcp-server&type=Date" />220 <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=co-browser/browser-use-mcp-server&type=Date" />221 </picture>222</div>223
Full transparency โ inspect the skill content before installing.