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.9K stars

The Browserbase MCP Server provides cloud browser automation capabilities, enabling LLMs to interact with web pages, take screenshots, extract information, and perform automated actions with atomic precision through the Model Context Protocol (MCP).

Installation Options

Using SHTTP Transport (Recommended)

The easiest way to use Browserbase MCP is through the remote hosted URL:

  1. Go to smithery.ai and enter your API keys to get a remote hosted URL
  2. Add the URL to your configuration:

If your client supports SHTTP:

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

If your client doesn't support SHTTP:

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

Using STDIO Transport

NPM Installation (Recommended)

Add the Browserbase Server to your MCP Config JSON:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Local Installation

# Clone the repository
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase

# Install dependencies and build
npm install && npm run build

Then add to your MCP Config JSON:

{
  "mcpServers": {
    "browserbase": {
      "command": "node",
      "args": ["/path/to/mcp-server-browserbase/cli.js"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Docker Installation

# Clone the repository
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase

# Build Docker image
docker build -t mcp-browserbase .

Add to your MCP Config JSON:

{
  "mcpServers": {
    "browserbase": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "BROWSERBASE_API_KEY",
        "-e",
        "BROWSERBASE_PROJECT_ID",
        "-e",
        "GEMINI_API_KEY",
        "mcp-browserbase"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Adding to Cursor

Copy and paste this link in your browser:

cursor://anysphere.cursor-deeplink/mcp/install?name=browserbase&config=eyJjb21tYW5kIjoibnB4IEBicm93c2VyYmFzZWhxL21jcCIsImVudiI6eyJCUk9XU0VSQkFTRV9BUElfS0VZIjoiIiwiQlJPV1NFUkJBU0VfUFJPSkVDVF9JRCI6IiIsIkdFTUlOSV9BUElfS0VZIjoiIn19

Configuration Options

The Browserbase MCP server supports several configuration flags:

Flag Description
--proxies Enable Browserbase proxies for the session
--advancedStealth Enable Browserbase Advanced Stealth (Only for Scale Plan Users)
--keepAlive Enable Browserbase Keep Alive Session
--contextId <contextId> Specify a Browserbase Context ID to use
--persist Whether to persist the Browserbase context (default: true)
--port <port> Port to listen on for HTTP/SHTTP transport
--host <host> Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces)
--browserWidth <width> Browser viewport width (default: 1024)
--browserHeight <height> Browser viewport height (default: 768)
--modelName <model> The model to use for Stagehand (default: gemini-2.0-flash)
--modelApiKey <key> API key for the custom model provider (required when using custom models)
--experimental Enable experimental features (default: false)

Configuration Examples

Using Proxies

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase", "--proxies"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Using Advanced Stealth

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase", "--advancedStealth"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Using Contexts

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp-server-browserbase",
        "--contextId",
        "<YOUR_CONTEXT_ID>"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Custom Browser Viewport Size

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

Enabling Experimental Features

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp-server-browserbase", "--experimental"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Using Custom Models

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

Features and Capabilities

The Browserbase MCP Server provides:

  • Browser automation with Stagehand v3.0
  • 20-40% faster performance through automatic caching
  • Enhanced extraction across iframes and shadow roots
  • Advanced selector support
  • Multi-browser compatibility (Playwright, Puppeteer, Patchright)
  • Screenshot capabilities (accessible via screenshot://<screenshot-name>)
  • Data extraction from webpages
  • Web interaction (navigate, click, fill forms)
  • Multi-model support
  • Session management
  • Vision support with annotated screenshots

For more information about using Browserbase MCP, visit the official Browserbase MCP documentation.

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