PluginBench
MCP Server
Maintained
Apache-2.0

io.github.browserbase/mcp-server-browserbase MCP Server

io.github.browserbase/mcp-server-browserbase

Give your AI agent a cloud browser it can navigate, click, and extract data from.

What is the io.github.browserbase/mcp-server-browserbase MCP server?

The Browserbase MCP server (mcp-server-browserbase) is a Model Context Protocol server that gives LLMs cloud browser automation capabilities via Browserbase and Stagehand. It lets AI agents create browser sessions, navigate pages, perform actions, observe page elements, and extract data from the web, either through Browserbase's hosted SHTTP endpoint or a self-hosted STDIO server.

This server exposes cloud browser automation to LLM clients through MCP, powered by Browserbase (managed browser infrastructure) and Stagehand (AI-driven browser control). It provides six core tools to start/end browser sessions, navigate to URLs, perform actions, observe interactive elements, and extract page data. It can be used as a hosted SHTTP service at mcp.browserbase.com, or self-hosted locally/via Docker over STDIO, with configurable options like proxies, verified identity, viewport size, session persistence, and custom LLM model selection (default Gemini 2.5 Flash Lite, with support for GPT-4o, Claude, and others).

How to install io.github.browserbase/mcp-server-browserbase

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • BROWSERBASE_API_KEY
    required
    secret

    Your Browserbase API key

  • BROWSERBASE_PROJECT_ID
    required

    Your Browserbase Project ID

  • GEMINI_API_KEY
    required
    secret

    Your Gemini API key (default model)

Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-server-browserbase": {
      "command": "npx",
      "args": [
        "-y",
        "@browserbasehq/mcp-server-browserbase"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>",
        "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-server-browserbase": {
      "command": "npx",
      "args": [
        "-y",
        "@browserbasehq/mcp-server-browserbase"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>",
        "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcp-server-browserbase": {
      "command": "npx",
      "args": [
        "-y",
        "@browserbasehq/mcp-server-browserbase"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>",
        "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "mcp-server-browserbase": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@browserbasehq/mcp-server-browserbase"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>",
        "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}
Claude Code
claude mcp add mcp-server-browserbase --env BROWSERBASE_API_KEY=<YOUR_BROWSERBASE_API_KEY> --env BROWSERBASE_PROJECT_ID=<YOUR_BROWSERBASE_PROJECT_ID> --env GEMINI_API_KEY=<YOUR_GEMINI_API_KEY> -- npx -y @browserbasehq/mcp-server-browserbase

Tools & capabilities

Tools this server exposes to the agent.

  • startCreate or reuse a Browserbase session.
  • endClose the current Browserbase session.
  • navigateNavigate to a URL. Input: { url: string }
  • actPerform an action on the page. Input: { action: string }
  • observeObserve actionable elements on the page. Input: { instruction: string }
  • extractExtract data from the page. Input: { instruction?: string }

Use cases

  • Automate web-based tasks like form filling or clicking through a workflow driven by an LLM
  • Extract structured data from web pages for an AI agent to consume
  • Build AI-powered browsing agents that navigate and interact with websites
  • Run cloud-hosted browser sessions for scraping or testing without managing local browser infrastructure
  • Integrate custom LLMs (GPT-4o, Claude, Gemini) to drive browser actions via Stagehand

io.github.browserbase/mcp-server-browserbase MCP server FAQ

What does the Browserbase MCP server do?

It provides cloud browser automation for LLMs, exposing tools to start/end sessions, navigate URLs, perform actions, observe page elements, and extract data using Browserbase and Stagehand.

Is the Browserbase MCP server free?

The server code is open source (Apache 2.0), but using it requires a Browserbase API key/project, and the hosted version at mcp.browserbase.com includes LLM costs for Gemini; custom models require your own API key.

What authentication is required?

You need a BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID for self-hosted setups. If using a custom model instead of the default Gemini, you also need a modelApiKey for that provider (e.g., GEMINI_API_KEY, or an Anthropic/OpenAI key).

How do I install this in Cursor or Claude?

Add an entry to your MCP config JSON pointing to either the hosted SHTTP endpoint (https://mcp.browserbase.com/mcp) or run it via npx @browserbasehq/mcp with your Browserbase and model API keys set as env variables, then reload your MCP client.

Can I self-host this server?

Yes, you can run it via NPM (npx @browserbasehq/mcp), clone and build it directly from the repo, or run it in Docker, using STDIO transport instead of the hosted SHTTP endpoint.

Which LLM models can it use?

By default it uses Google's Gemini 2.5 Flash Lite via Stagehand, but you can configure other supported models like GPT-4o or Claude Sonnet 4.5 using the --modelName and --modelApiKey flags.

README (reference)

Source of truth, from the repository.

Browserbase MCP Server

cover

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.

This server provides cloud browser automation capabilities using Browserbase and Stagehand. It enables LLMs to interact with web pages, extract information, and perform automated actions.

This is a self-hostable version of the Browserbase hosted MCP server with the same tools and functionality. We recommend using the hosted version for the easiest setup.

Tools

This server exposes 6 tools that match the hosted Browserbase MCP server:

ToolDescriptionInput
startCreate or reuse a Browserbase session(none)
endClose the current Browserbase session(none)
navigateNavigate to a URL{ url: string }
actPerform an action on the page{ action: string }
observeObserve actionable elements on the page{ instruction: string }
extractExtract data from the page{ instruction?: string }

How to Setup

We currently support 2 transports for our MCP server, STDIO and SHTTP. We recommend you use SHTTP with our hosted MCP server to take advantage of the server at full capacity.

SHTTP (Hosted MCP):

Use the Browserbase hosted MCP server at https://mcp.browserbase.com/mcp. This is the easiest way to get started -- we host the server and provide the LLM costs for Gemini, the best performing model in Stagehand.

For full setup instructions, see the Browserbase MCP documentation.

If your client supports SHTTP:

{
  "mcpServers": {
    "browserbase": {
      "type": "http",
      "url": "https://mcp.browserbase.com/mcp"
    }
  }
}

If your client doesn't support SHTTP:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.browserbase.com/mcp"]
    }
  }
}

STDIO (Self-Hosted):

You can either use our server hosted on NPM or run it completely locally by cloning this repo.

Note: If you want to use a different model you have to add --modelName to the args and provide that respective key as an arg. More info below.

To run via NPM (Recommended)

Go into your MCP Config JSON and add the Browserbase Server:

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

That's it! Reload your MCP client and you're ready to go.

To run 100% local:

Option 1: Direct installation

git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase
npm install && npm run build

Option 2: Docker

git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase
docker build -t mcp-browserbase .

Then in your MCP Config JSON run the server:

Using Direct Installation

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

Using Docker

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

Configuration

The Browserbase MCP server accepts the following command-line flags:

FlagDescription
--proxiesEnable Browserbase proxies for the session
--verifiedEnable Browserbase Verified Identity (Only for Scale Plan Users)
--advancedStealthDeprecated alias for --verified
--keepAliveEnable Browserbase Keep Alive Session
--contextId <contextId>Specify a Browserbase Context ID to use
--persistWhether 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: google/gemini-2.5-flash-lite)
--modelApiKey <key>API key for the custom model provider (required when using custom models)
--experimentalEnable experimental features (default: false)

These flags can be passed directly to the CLI or configured in your MCP configuration file.

Note: These flags can only be used with the self-hosted server (npx @browserbasehq/mcp or Docker).

Model Configuration

Stagehand defaults to using Google's Gemini 2.5 Flash Lite model, but you can configure it to use other models like GPT-4o, Claude, or other providers.

Important: When using any custom model (non-default), you must provide your own API key for that model provider using the --modelApiKey flag.

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

Note: The model must be supported in Stagehand. Check out the docs here.

Links

License

Licensed under the Apache 2.0 License.

Copyright 2025 Browserbase, Inc.

Related MCP servers

Give your AI agent stealth web scraping with Cloudflare bypass and CSS selection, powered by Scrapling.

67k
Python
BSD-3-Clause
View repository →

Give your AI coding agent full control of a live Chrome browser for automation, debugging, and performance analysis.

45k
TypeScript
Apache-2.0
View repository →

Let AI agents manage your Puter files, websites, and serverless workers over MCP.

43k
TypeScript
AGPL-3.0
View repository →

Browser automation for AI agents via MCP, powering ByteDance's Agent TARS hybrid GUI/DOM browser control.

37k
TypeScript
Apache-2.0
View repository →

Run arbitrary shell commands from an MCP-connected AI agent.

37k
TypeScript
Apache-2.0
View repository →

Filesystem access MCP server from ByteDance's UI-TARS/Agent TARS ecosystem.

37k
TypeScript
Apache-2.0
View repository →