home / mcp / browserbase mcp server

Browserbase MCP Server

Allow LLMs to control a browser with Browserbase and Stagehand

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ai-zebra-mcp-server-browserbase": {
      "url": "your-smithery-url.com",
      "headers": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY_PLACEHOLDER",
        "BROWSERBASE_API_KEY": "YOUR_API_KEY_PLACEHOLDER",
        "BROWSERBASE_PROJECT_ID": "YOUR_PROJECT_ID_PLACEHOLDER"
      }
    }
  }
}

The Browserbase MCP Server lets you connect your LLM workflows to cloud browser automation, enabling tasks like navigating web pages, taking screenshots, extracting data, and performing actions with precise control. It coordinates Browserbase and Stagehand to provide multi-model support, session management, and scalable browser automation for AI-powered workflows.

How to use

You integrate this server with your MCP client to enable browser automation in AI workflows. Use the HTTP (remote) or STDIO (local) transport methods to connect, then issue natural language or structured commands to control cloud browsers, extract data from web pages, navigate against pages, fill forms, or take screenshots. You can run multiple sessions in parallel, persist browser contexts, and apply advanced stealth or proxies if your plan supports them. Make sure your client is configured to communicate with the chosen transport, and provide any required API keys or model keys for your setup.

How to install

Prerequisites: you need Node.js and a package manager. You also need access keys if you plan to use Browserbase features requiring authentication.

Option A — Run via remote HTTP MCP (preferred when available) Copy your remote MCP URL and configure your MCP client to use the HTTP transport. Then reload your MCP client to start using Browserbase through the remote service.

Option B — Run a local STDIO MCP server with npm (recommended for quick starts) Install and run with the following steps.

1) Add the Browserbase MCP server to your MCP configuration using npm with the following approach.

Additional setup and configuration

The server supports both HTTP and STDIO transports. If you run locally, you can use the following configuration in your MCP client to connect via STDIO. The configuration includes the necessary environment variables for API keys.

HTTP (remote) transport configuration example you place in your MCP client:

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

Configuration notes

The Browserbase MCP server accepts several command-line flags when running locally. You can tailor proxies, stealth, context usage, viewport size, and model configuration. If you use a custom model, you must provide a model API key via the --modelApiKey flag.

Example flags you may pass to the local server via the CLI or MCP config include enabling proxies, enabling advanced stealth, specifying a context, persisting context, and setting browser viewport size.

Examples

Proxies example (in MCP config): set the --proxies option when launching the Browserbase MCP via npx.

Advanced stealth example (in MCP config): enable advanced stealth with the --advancedStealth flag.

Context usage example (in MCP config): pass your Browserbase context with --contextId.

Viewport sizing example (in MCP config): adjust width and height using --browserWidth and --browserHeight.