MCP Browser Use Server is a Model Context Protocol (MCP) implementation that integrates browser-use automation capabilities with Claude Desktop and other MCP-compatible clients. It enables AI agents to control a browser, navigate websites, interact with forms, and extract information through natural language instructions.
uv for dependency management (recommended)git clone https://github.com/JovaniPink/mcp-browser-use.git
cd mcp-browser-use
uv sync
# Copy the example environment file
cp .env.example .env
# Edit the .env file to configure your API keys and preferences
Start the MCP server with:
uv run mcp-browser-use
This launches the FastMCP application and registers the run_browser_agent tool that will be available to MCP clients.
To register the server in Claude Desktop, add the following to your Claude Desktop configuration:
"mcpServers": {
"mcp_server_browser_use": {
"command": "uvx",
"args": ["mcp-browser-use"],
"env": {
"MCP_MODEL_PROVIDER": "anthropic",
"MCP_MODEL_NAME": "claude-3-5-sonnet-20241022"
}
}
}
The server can be configured through environment variables:
MCP_MODEL_PROVIDER - Which AI provider to use (anthropic, openai, etc.)MCP_MODEL_NAME - Model name to use (e.g., "claude-3-5-sonnet-20241022")MCP_TEMPERATURE - Temperature setting for the modelMCP_MAX_STEPS - Maximum number of steps in an agent runMCP_MAX_ACTIONS_PER_STEP - Maximum browser actions per stepMCP_USE_VISION - Enable vision capabilitiesSet the appropriate API key for your model provider:
ANTHROPIC_API_KEY - For Claude modelsOPENAI_API_KEY - For OpenAI modelsDEEPSEEK_API_KEY - For DeepSeek modelsGOOGLE_API_KEY - For Google AI modelsAZURE_OPENAI_API_KEY - For Azure-hosted OpenAI modelsBROWSER_USE_HEADLESS - Run in headless mode (true/false)BROWSER_USE_EXTRA_CHROMIUM_ARGS - Additional Chrome flagsCHROME_PERSISTENT_SESSION - Enable persistent browser sessionsBROWSER_USE_PROXY_URL - URL for browser proxyFor interactive debugging, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/project run mcp-browser-use
This provides a web interface where you can watch tool calls and responses in real-time.
Once the server is running and connected to your MCP client, you can instruct the AI to perform browser automation tasks. Examples include:
Ask the AI to visit a website and extract information:
"Visit https://example.com and summarize the main content of the page."
Request the AI to interact with forms:
"Go to https://example.com/contact, fill out the contact form with my name 'John Doe' and email '[email protected]', and submit it."
Have the AI scrape information from a website:
"Search for 'electric vehicles' on https://news.google.com and list the titles of the first 5 news articles."
The AI can perform complex sequences of actions:
"Log in to my account on https://example.com using my username and password, navigate to the settings page, and change my notification preferences to weekly."
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp_server_browser_use" '{"command":"uvx","args":["mcp-server-browser-use"],"env":{"OPENAI_ENDPOINT":"https://api.openai.com/v1","OPENAI_API_KEY":"","ANTHROPIC_API_KEY":"","GOOGLE_API_KEY":"","AZURE_OPENAI_ENDPOINT":"","AZURE_OPENAI_API_KEY":"","ANONYMIZED_TELEMETRY":"false","CHROME_PATH":"","CHROME_USER_DATA":"","CHROME_DEBUGGING_PORT":"9222","CHROME_DEBUGGING_HOST":"localhost","CHROME_PERSISTENT_SESSION":"false","MCP_MODEL_PROVIDER":"anthropic","MCP_MODEL_NAME":"claude-3-5-sonnet-20241022","MCP_TEMPERATURE":"0.3","MCP_MAX_STEPS":"30","MCP_USE_VISION":"true","MCP_MAX_ACTIONS_PER_STEP":"5","MCP_TOOL_CALL_IN_CONTENT":"true"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp_server_browser_use": {
"command": "uvx",
"args": [
"mcp-server-browser-use"
],
"env": {
"OPENAI_ENDPOINT": "https://api.openai.com/v1",
"OPENAI_API_KEY": "",
"ANTHROPIC_API_KEY": "",
"GOOGLE_API_KEY": "",
"AZURE_OPENAI_ENDPOINT": "",
"AZURE_OPENAI_API_KEY": "",
"ANONYMIZED_TELEMETRY": "false",
"CHROME_PATH": "",
"CHROME_USER_DATA": "",
"CHROME_DEBUGGING_PORT": "9222",
"CHROME_DEBUGGING_HOST": "localhost",
"CHROME_PERSISTENT_SESSION": "false",
"MCP_MODEL_PROVIDER": "anthropic",
"MCP_MODEL_NAME": "claude-3-5-sonnet-20241022",
"MCP_TEMPERATURE": "0.3",
"MCP_MAX_STEPS": "30",
"MCP_USE_VISION": "true",
"MCP_MAX_ACTIONS_PER_STEP": "5",
"MCP_TOOL_CALL_IN_CONTENT": "true"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"mcp_server_browser_use": {
"command": "uvx",
"args": [
"mcp-server-browser-use"
],
"env": {
"OPENAI_ENDPOINT": "https://api.openai.com/v1",
"OPENAI_API_KEY": "",
"ANTHROPIC_API_KEY": "",
"GOOGLE_API_KEY": "",
"AZURE_OPENAI_ENDPOINT": "",
"AZURE_OPENAI_API_KEY": "",
"ANONYMIZED_TELEMETRY": "false",
"CHROME_PATH": "",
"CHROME_USER_DATA": "",
"CHROME_DEBUGGING_PORT": "9222",
"CHROME_DEBUGGING_HOST": "localhost",
"CHROME_PERSISTENT_SESSION": "false",
"MCP_MODEL_PROVIDER": "anthropic",
"MCP_MODEL_NAME": "claude-3-5-sonnet-20241022",
"MCP_TEMPERATURE": "0.3",
"MCP_MAX_STEPS": "30",
"MCP_USE_VISION": "true",
"MCP_MAX_ACTIONS_PER_STEP": "5",
"MCP_TOOL_CALL_IN_CONTENT": "true"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect