The browser-use MCP server is a powerful AI-driven browser automation tool that implements the Model Context Protocol (MCP) for natural language browser control and web research. It allows you to automate web tasks using natural language commands and provides both a server implementation for AI assistants and a CLI for direct interaction.
Install UV (the Python package installer):
curl -LsSf https://astral.sh/uv/install.sh | sh
Install Playwright browsers (required for automation):
uvx --from mcp-server-browser-use@latest python -m playwright install
The server is configured using environment variables. You can provide these variables directly in your system environment or through a .env
file.
LLM Provider Settings:
MCP_LLM_PROVIDER=openai|google|anthropic|azure_openai|mistral|ollama|etc.
MCP_LLM_MODEL_NAME=gpt-4.1|gemini-2.5-flash-preview-04-17|claude-3.5-haiku|etc.
MCP_LLM_TEMPERATURE=0.0-2.0
MCP_LLM_<PROVIDER>_API_KEY=your_api_key_here
Browser Settings:
MCP_BROWSER_HEADLESS=true|false
MCP_BROWSER_WINDOW_WIDTH=1280
MCP_BROWSER_WINDOW_HEIGHT=1080
MCP_BROWSER_DISABLE_SECURITY=true|false
MCP_BROWSER_BINARY_PATH=/path/to/chrome
MCP_BROWSER_USER_DATA_DIR=/path/to/user/data
Tool Settings:
MCP_AGENT_TOOL_USE_VISION=true|false
MCP_AGENT_TOOL_HISTORY_PATH=/path/to/history
MCP_RESEARCH_TOOL_SAVE_DIR=/path/to/research
MCP_RESEARCH_TOOL_MAX_PARALLEL_BROWSERS=3
You can integrate the server with MCP clients like Claude Desktop by adding a server configuration:
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": ["mcp-server-browser-use@latest"],
"env": {
"MCP_LLM_GOOGLE_API_KEY": "YOUR_KEY_HERE_IF_USING_GOOGLE",
"MCP_LLM_PROVIDER": "google",
"MCP_LLM_MODEL_NAME": "gemini-2.5-flash-preview-04-17",
"MCP_BROWSER_HEADLESS": "true"
}
}
}
To connect to your own browser using Chrome DevTools Protocol:
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": ["mcp-server-browser-use@latest"],
"env": {
"MCP_LLM_OPENROUTER_API_KEY": "YOUR_KEY_HERE",
"MCP_LLM_PROVIDER": "openrouter",
"MCP_LLM_MODEL_NAME": "anthropic/claude-3.5-haiku",
"MCP_BROWSER_HEADLESS": "false",
"MCP_BROWSER_USE_OWN_BROWSER": "true",
"MCP_BROWSER_CDP_URL": "http://localhost:9222",
"MCP_AGENT_TOOL_USE_VISION": "true",
"MCP_RESEARCH_TOOL_SAVE_DIR": "/path/to/your/research"
}
}
}
The server exposes two primary tools:
Executes a browser automation task based on natural language instructions.
Arguments:
task
(string, required): The primary task or objective.Example:
Run a task to find the current price of Bitcoin on CoinMarketCap.
Performs in-depth web research on a topic and generates a report.
Arguments:
research_task
(string, required): The topic or question for the research.max_parallel_browsers
(integer, optional): Overrides environment setting.Example:
Research the environmental impact of electric vehicles compared to gas vehicles.
You can access the functionality directly from the command line:
mcp-browser-cli run-browser-agent "Go to example.com and find the title." -e .env
mcp-browser-cli run-deep-research "What are the latest advancements in AI-driven browser automation?" --max-parallel-browsers 5 -e .env
Instead of having the server launch its own browser instance, you can connect to an existing Chrome/Chromium browser:
Launch Chrome with remote debugging enabled:
google-chrome --remote-debugging-port=9222
Configure the following environment variables:
MCP_BROWSER_USE_OWN_BROWSER=true
MCP_BROWSER_CDP_URL=http://localhost:9222
MCP_SERVER_LOGGING_LEVEL=DEBUG
for detailed logs.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.