What is MCP?
Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data sources. Browser Use’s MCP server exposes browser automation capabilities to any MCP-compatible client.Two Deployment Options
Hosted MCP Server
Best for production: Cloud-hosted, scalable, no local setup
- URL:
https://api.browser-use.com/mcp - Requires Browser Use API key
- Handles browser provisioning automatically
- Supports cloud profiles for authentication
Local MCP Server
Best for development: Self-hosted, free, requires your own LLM keys
- Runs on your machine via stdio
- Requires OpenAI or Anthropic API key
- Full control over browser instance
- Direct, low-level browser control
Hosted MCP Server (Cloud)
Quick Setup
Get API Key
Get your API key from Browser Use Dashboard
Client Configuration
- Claude Code
- Claude Desktop
- Cursor
- Windsurf
- ChatGPT
Available Tools
The hosted MCP server provides three tools:browser_task
Creates and runs a browser automation task.
Parameters:
task(required): What you want the browser to domax_steps(optional): Max actions to take (1-10, default: 8)profile_id(optional): UUID of cloud profile for persistent authentication
list_browser_profiles
Lists all available cloud browser profiles with persistent authentication.
Example:
monitor_task
Checks current status and progress of a running task.
Parameters:
task_id(required): UUID of the task (returned by browser_task)
Example Usage
Once connected, ask your AI assistant:“Go to Hacker News and get me the titles of the top 5 posts”
“Fill out the contact form on example.com with my information”
“Search for the best laptop deals under $1000 and compare prices”The AI will automatically use the browser tools to complete these tasks.
Cloud Profiles for Authentication
Use cloud browser profiles to maintain login sessions across tasks:- Social media (Twitter, LinkedIn, Facebook)
- Email (Gmail, Outlook)
- Banking and shopping sites
- Any website requiring login
Local MCP Server (Self-Hosted)
Quick Start
The local MCP server is free and open-source but requires your own LLM API keys.Start MCP Server Manually
Claude Desktop Integration
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
macOS/Linux PATH Issue: Claude Desktop may not find
uvx. Use full path:- Run
which uvxto find location (usually/Users/username/.local/bin/uvx) - Replace
"command": "uvx"with the full path
Environment Variables
Configure browser-use through environment variables:OPENAI_API_KEY- Your OpenAI API key (required)ANTHROPIC_API_KEY- Your Anthropic API key (alternative)BROWSER_USE_HEADLESS- Set tofalseto show browser windowBROWSER_USE_DISABLE_SECURITY- Set totrueto disable security features
Available Tools (Local Server)
The local MCP server exposes low-level browser control tools:Autonomous Agent
retry_with_browser_use_agent- Run complete task with AI agent (last resort)
Direct Browser Control
browser_navigate- Navigate to URLbrowser_click- Click element by indexbrowser_type- Type text into elementbrowser_get_state- Get current page state and interactive elementsbrowser_scroll- Scroll the pagebrowser_go_back- Go back in history
Tab Management
browser_list_tabs- List all open tabsbrowser_switch_tab- Switch to specific tabbrowser_close_tab- Close a tab
Content Extraction
browser_extract_content- Extract structured content from page
Session Management
browser_list_sessions- List active browser sessionsbrowser_close_session- Close specific sessionbrowser_close_all- Close all sessions
Example Usage with Claude Desktop
Programmatic Usage
Connect to the MCP server programmatically:Comparison: Hosted vs Local
| Feature | Hosted MCP | Local MCP |
|---|---|---|
| Cost | Browser Use API key required | Free (requires own LLM keys) |
| Setup | Minimal - just add config | Requires local installation |
| Browser | Auto-provisioned in cloud | Runs on your machine |
| Profiles | Cloud profiles with sync | Local browser profiles |
| Control | High-level task execution | Low-level browser control |
| Best For | Production, ease of use | Development, full control |
Troubleshooting
Hosted MCP Server
Connection issues?- Verify API key is correct
- Check header format in config
- Ensure API key has valid credits
- Increase
max_stepsfor complex tasks (max: 10) - Use clearer, more specific instructions
- Check live_url to see progress
Local MCP Server
“CLI addon not installed” Error- Run
which uvxto find full path - Use full path in config (e.g.,
/Users/username/.local/bin/uvx)
- Check Chrome/Chromium is installed
- Set
BROWSER_USE_HEADLESS=falseto see browser - Ensure no other browsers using same profile
- Verify
OPENAI_API_KEYis set correctly - Check API key has credits and permissions
- Try
ANTHROPIC_API_KEYas alternative
- Restart Claude Desktop after config changes
- Validate JSON syntax in config file
- Check logs:
~/Library/Logs/Claude/(macOS) or%APPDATA%\Claude\Logs\(Windows)