Labsco
kontext-security logo

Browser Use MCP Server

β˜… 825

from kontext-security

An MCP server that allows AI agents to control a web browser using the browser-use library.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

browser-use-mcp-server

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

🌐 Want to Vibe Browse the Web? Open-source AI-powered web browser - Vibe Browser.

πŸ”— Managing multiple MCP servers? Simplify your development workflow with agent-browser

Environment

Create a .env file:

Copy & paste β€” that's it
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

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:

Build a distributable wheel:

Copy & paste β€” that's it
# From the project root directory
uv build

Install it as a global tool:

Copy & paste β€” that's it
uv tool uninstall browser-use-mcp-server 2>/dev/null || true
uv tool install dist/browser_use_mcp_server-*.whl

Run from any directory:

Copy & paste β€” that's it
# 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 9000

After making changes, rebuild and reinstall:

Copy & paste β€” that's it
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.

Copy & paste β€” that's it
# 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

Copy & paste β€” that's it
# Browser-based 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)

Example

Try asking your AI:

Copy & paste β€” that's it
open https://news.ycombinator.com and return the top ranked article

Support

For issues or inquiries: cobrowser.xyz

Star History