Browser Use MCP server

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

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.

Installation Options

Via Smithery (Recommended)

The easiest way to install Browser Use for Claude Desktop is through Smithery:

npx -y @smithery/cli install @JovaniPink/mcp-browser-use --client claude

Manual Setup

  1. Clone the repository and install dependencies:
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
  1. Start the server:
uv run mcp-browser-use

Configuration

Environment Variables

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

Claude Desktop Configuration

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

Browser Capabilities

The server supports various browser actions through natural language commands:

Navigation

  • Go to specific URLs
  • Navigate back/forward
  • Refresh pages

Element Interaction

  • Click on elements
  • Type text into fields
  • Scroll pages
  • Hover over elements

Form Handling

  • Fill out forms
  • Submit forms
  • Select options from dropdowns

Tab Management

  • Create new tabs
  • Close tabs
  • Switch between tabs

Content Extraction

  • Get page content
  • Take screenshots
  • Extract text from specific elements

Vision-Based Interaction

  • Find elements by visual appearance
  • Interact with visually identified elements

State Management

  • Manage cookies and browser storage
  • Maintain persistent sessions

Debugging

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.

Security Considerations

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.

How to add this MCP server to 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 > 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"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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