Browser Use MCP server

Integrates browser automation with natural language commands for web scraping, form filling, and visual interaction tasks.
Back to servers
Setup instructions
Provider
Jovani Pink
Release date
Jan 25, 2025
Language
Python
Stats
55 stars

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.

Installation

Prerequisites

  • Python 3.11+
  • Google Chrome or Chromium installed
  • uv for dependency management (recommended)
  • Optional: Claude Desktop or another MCP-compatible client

Setup Instructions

  1. Clone the repository and install dependencies:
git clone https://github.com/JovaniPink/mcp-browser-use.git
cd mcp-browser-use
uv sync
  1. Create your environment configuration:
# Copy the example environment file
cp .env.example .env

# Edit the .env file to configure your API keys and preferences

Running the Server

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.

Integration with Claude Desktop

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"
    }
  }
}

Configuration Options

The server can be configured through environment variables:

LLM and Agent Settings

  • 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 model
  • MCP_MAX_STEPS - Maximum number of steps in an agent run
  • MCP_MAX_ACTIONS_PER_STEP - Maximum browser actions per step
  • MCP_USE_VISION - Enable vision capabilities

API Keys

Set the appropriate API key for your model provider:

  • ANTHROPIC_API_KEY - For Claude models
  • OPENAI_API_KEY - For OpenAI models
  • DEEPSEEK_API_KEY - For DeepSeek models
  • GOOGLE_API_KEY - For Google AI models
  • AZURE_OPENAI_API_KEY - For Azure-hosted OpenAI models

Browser Configuration

  • BROWSER_USE_HEADLESS - Run in headless mode (true/false)
  • BROWSER_USE_EXTRA_CHROMIUM_ARGS - Additional Chrome flags
  • CHROME_PERSISTENT_SESSION - Enable persistent browser sessions
  • BROWSER_USE_PROXY_URL - URL for browser proxy

Debugging

For 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.

Usage Examples

Once the server is running and connected to your MCP client, you can instruct the AI to perform browser automation tasks. Examples include:

Basic Web Navigation

Ask the AI to visit a website and extract information:

"Visit https://example.com and summarize the main content of the page."

Form Filling

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."

Data Extraction

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."

Multi-step Tasks

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."

Common Use Cases

  • Web research and data collection
  • Automating repetitive web tasks
  • Testing web applications
  • Content extraction and summarization
  • Interacting with web interfaces through natural language

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. 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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later