Browserbase MCP Server

Browserbase MCP

Cloud-based browser automation using Browserbase and Stagehand

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

Key capabilities:

  • Browser automation & orchestration
  • Data extraction from any webpage
  • Web interaction (navigate, click, fill forms)
  • Screenshots & screen capture
  • Model flexibility (OpenAI, Claude, Gemini)
  • Vision support with annotated screenshots
  • Session & multi-session management

Example workflows:

  • AI-powered web automation with natural language
  • Multi-session parallel browser control
  • Data extraction and structured content scraping
  • Automated testing and form processing

Browserbase is ideal for:

AI Web Agents, Process/Workflow Automation, and Complex Web Scraping

Getting Started with the Browserbase MCP Server

Standard configuration using stdio transport (recommended for most users).

Configuration
{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp"],
      "env": {
        "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>",
        "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>",
        "GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
      }
    }
  }
}

Configuration Flags

Customize your Browserbase MCP server with these command-line options. These flags can be passed directly to the CLI or configured in your MCP configuration file.

View Full Configuration Docs →
--proxiesboolean

Enable Browserbase proxies for the session

Default: false

--advancedStealthboolean

Enable Browserbase Advanced Stealth (Only for Scale Plan Users)

Default: false

--contextId <contextId>string

Specify a Browserbase Context ID to use

--persist [boolean]boolean

Whether to persist the Browserbase context

Default: true

--port <port>number

Port to listen on for HTTP/SHTTP transport

Default: 3000

--host <host>string

Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces)

Default: localhost

--cookies [json]JSON array

JSON array of cookies to inject into the browser

--browserWidth <width>number

Browser viewport width

Default: 1024

--browserHeight <height>number

Browser viewport height

Default: 768

--modelName <model>string

The model to use for Stagehand

Default: google/gemini-2.0-flash

--modelApiKey <key>string

API key for the custom model provider (required when using custom models)

Complete Setup Guide

Follow our comprehensive documentation for detailed setup instructions and troubleshooting.

Browserbase MCP Tools

The Browserbase MCP server provides comprehensive browser automation tools for LLMs, including single and multi-session management capabilities.

14 tools available for comprehensive browser automation:

browserbase_stagehand_navigate

Navigate to any URL in the browser

browserbase_stagehand_act

Perform an action on the web page using natural language (e.g., 'click the login button')

browserbase_stagehand_extract

Extract all text content from the current page (filters out CSS and JavaScript)

browserbase_stagehand_observe

Observe and find actionable elements on the web page with specific instructions

browserbase_screenshot

Capture a PNG screenshot of the current page with Base-64 encoded output

browserbase_session_create

Create or reuse a cloud browser session using Browserbase with fully initialized Stagehand

browserbase_session_close

Close the current Browserbase session, disconnect the browser, and cleanup Stagehand instance

multi_browserbase_stagehand_session_create

Create a new independent Stagehand browser session with full web automation capabilities

multi_browserbase_stagehand_session_list

List all currently active Stagehand browser sessions with detailed metadata

multi_browserbase_stagehand_session_close

Close and clean up a specific Stagehand browser session

multi_browserbase_stagehand_navigate_session

Navigate to a URL in a specific browser session

multi_browserbase_stagehand_act_session

Perform an action in a specific browser session using natural language

multi_browserbase_stagehand_extract_session

Extract structured information from a specific browser session

multi_browserbase_stagehand_observe_session

Observe and find actionable elements in a specific browser session

FAQs

What is a Model Context Protocol (MCP) server?

How does Browserbase MCP Server work with Claude Desktop?

What are the API keys needed for Browserbase MCP Server?

What models are supported by Browserbase MCP Server?

What is multi-session management and when should I use it?

Where can I get help if I encounter issues with Browserbase MCP?