Looking for a hosted solution? Use the Cloud MCP Server instead — no setup required, just an API key.
Quick Start
Client Setup
- Claude Code
- Claude Desktop
- Cursor
- Windsurf
Environment Variables
OPENAI_API_KEY- Your OpenAI API key (required)ANTHROPIC_API_KEY- Your Anthropic API key (alternative to OpenAI)BROWSER_USE_HEADLESS- Set tofalseto show browser windowBROWSER_USE_DISABLE_SECURITY- Set totrueto disable browser security features
Available Tools
The local MCP server exposes these low-level browser automation tools for direct control:Autonomous Agent Tools
retry_with_browser_use_agent- Run a complete browser automation task with an AI agent (use as last resort when direct control fails)
Direct Browser Control
browser_navigate- Navigate to a URLbrowser_click- Click on an element by indexbrowser_type- Type text into an elementbrowser_get_state- Get current page state and interactive elementsbrowser_scroll- Scroll the pagebrowser_go_back- Go back in browser history
Tab Management
browser_list_tabs- List all open browser tabsbrowser_switch_tab- Switch to a specific tabbrowser_close_tab- Close a tab
Content Extraction
browser_extract_content- Extract structured content from the current page
Session Management
browser_list_sessions- List all active browser sessions with detailsbrowser_close_session- Close a specific browser session by IDbrowser_close_all- Close all active browser sessions
Example Usage
Once configured, you can ask your AI to perform browser automation tasks:Programmatic Usage
You can also connect to the MCP server programmatically:Troubleshooting
“CLI addon is not installed” Error Make sure you are using--from 'browser-use[cli]' in your uvx command:
uvx in its PATH. Use the full path in your config:
- Run
which uvxin terminal to find the location - Update your config to use the full path (e.g.,
/Users/your-username/.local/bin/uvx)
- Check that you have Chrome/Chromium installed
- Try setting
BROWSER_USE_HEADLESS=falseto see browser window - Ensure no other browser instances are using the same profile
- Verify your
OPENAI_API_KEYis set correctly - Check API key permissions and billing status
- Try using
ANTHROPIC_API_KEYas an alternative
- Restart Claude Desktop after config changes
- Check the config file syntax is valid JSON
- Verify the file path is correct for your OS
- Check logs at
~/Library/Logs/Claude/(macOS) or%APPDATA%\Claude\Logs\(Windows)
Security Considerations
- The MCP server has access to your browser and file system
- Only connect trusted MCP clients
- Be cautious with sensitive websites and data
- Consider running in a sandboxed environment for untrusted automation
Next Steps
- Explore the examples directory for more usage patterns
- Check out MCP documentation to learn more about the protocol
- Join our Discord for support and discussions