The MCP Server for Browser Use provides a powerful interface that enables AI agents to interact with web browsers through natural language. Built on Anthropic's Model Context Protocol (MCP), it seamlessly integrates with the browser-use library to allow for automated browser interactions.
The easiest way to install Browser Use for Claude Desktop is through Smithery:
npx -y @smithery/cli install @JovaniPink/mcp-browser-use --client claude
git clone https://github.com/JovaniPink/mcp-browser-use.git
cd mcp-browser-use
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync
uv run mcp-browser-use
Configure the server using these environment variables:
# API Keys
ANTHROPIC_API_KEY=your_anthropic_key
# Chrome Configuration
CHROME_PATH=/path/to/chrome # Optional: Path to Chrome executable
CHROME_USER_DATA=/path/to/user/data # Optional: Chrome user data directory
CHROME_DEBUGGING_PORT=9222 # Default: 9222
CHROME_DEBUGGING_HOST=localhost # Default: localhost
CHROME_PERSISTENT_SESSION=false # Keep browser open between tasks
# Model Settings
MCP_MODEL_PROVIDER=anthropic # Options: anthropic, openai, azure, deepseek
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
To configure the server for Claude Desktop, edit the configuration file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Add the following to the mcpServers
section:
"mcp_server_browser_use": {
"command": "uvx",
"args": [
"mcp-server-browser-use",
],
"env": {
"ANTHROPIC_API_KEY": "your_api_key",
"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"
}
}
The server supports various browser actions through natural language commands:
For debugging, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/project run mcp-server-browser-use
The Inspector will display a URL for the debugging interface where you can monitor interactions between the model and browser.
Note that the Chrome settings allow the browser to be controlled by the server, which presents security risks. This server is intended for development and personal use, not production environments.
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 > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.