Browserbase MCP server

Automate web browsers remotely on a cloud environment.
Back to servers
Setup instructions
Provider
Browserbase
Release date
Dec 05, 2024
Language
TypeScript
Stats
2.6K stars

The Browserbase MCP Server enables LLM applications to interact with web browsers, providing automation capabilities for tasks like navigating websites, extracting data, and capturing screenshots through the Model Context Protocol (MCP).

Installation Options

Remote Hosted SHTTP Server (Recommended)

The easiest way to use Browserbase MCP is through their remote hosted server:

  1. Go to smithery.ai and enter your API keys
  2. Add the provided URL to your MCP configuration:

For clients that support SHTTP:

{
  "mcpServers": {
    "browserbase": {
      "url": "your-smithery-url.com"
    }
  }
}

For clients without SHTTP support:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["mcp-remote", "your-smithery-url.com"]
    }
  }
}

NPM Installation (STDIO)

To install via NPM:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase"],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Local Installation

For a fully local setup:

  1. Clone the repository and build the project:
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase
npm install && npm run build
  1. Configure your MCP client to use the local server:
{
  "mcpServers": {
    "browserbase": {
      "command": "node",
      "args": ["/path/to/mcp-server-browserbase/cli.js"],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Configuration Options

The server supports several configuration flags to customize behavior:

Proxy Support

Enable proxies for your browser sessions:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase", "--proxies"],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Advanced Stealth Mode

For improved anti-detection capabilities (Scale Plan users only):

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase", "--advancedStealth"],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Context Management

To maintain session state across uses:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp-server-browserbase",
        "--contextId",
        "your-context-id"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Browser Viewport Size

Customize the browser window dimensions:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp-server-browserbase",
        "--browserHeight", "1080",
        "--browserWidth", "1920"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

Model Configuration

Use alternative LLM models (default is Google's Gemini 2.0 Flash):

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp-server-browserbase",
        "--modelName", "anthropic/claude-3-5-sonnet-latest",
        "--modelApiKey", "your-anthropic-api-key"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "your-api-key",
        "BROWSERBASE_PROJECT_ID": "your-project-id"
      }
    }
  }
}

Available Features

The Browserbase MCP server provides these capabilities:

  • Browser automation and orchestration
  • Web interaction (clicking, form filling, navigation)
  • Data extraction from webpages
  • Screenshot capture (full-page and element-specific)
  • Support for multiple LLM models
  • Vision capabilities with annotated screenshots
  • Session management
  • Multi-session parallel browser automation

Resources

Screenshots are available through the resource URL format: screenshot://<screenshot-name>

For more information about MCP, visit:

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 "browserbase" '{"command":"npx","args":["-y","@browserbasehq/mcp-browserbase"]}'

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": {
        "browserbase": {
            "command": "npx",
            "args": [
                "-y",
                "@browserbasehq/mcp-browserbase"
            ]
        }
    }
}

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": {
        "browserbase": {
            "command": "npx",
            "args": [
                "-y",
                "@browserbasehq/mcp-browserbase"
            ]
        }
    }
}

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