Skip to main content

Quick installation

Install with Cursor

One-click installation directly in Cursor
You can also add Browserbase MCP to Claude Code with a single command:
Browserbase supports both local STDIO and hosted Streamable HTTP (SHTTP). Hosted Streamable HTTP is recommended for most users.

Endpoint

Hosted Streamable HTTP endpoint (served on Browserbase infrastructure):

Prerequisites

1

Get your Browserbase credentials

Get your Browserbase API key from the Browserbase Dashboard.
Browserbase API Key settings
Then copy your API Key directly from the input.

Query parameters (hosted Streamable HTTP)

Required for tool calls

browserbaseApiKey

Browserbase API key.

Optional

Boolean query values must be exact strings: "true" or "false".

Available tools

Every tool below accepts an optional sessionId parameter. Pass the sessionId returned by start to target or reattach to that specific Browserbase session; if omitted, the tool uses the transport’s current active session. This matters for MCP clients (e.g. ChatGPT) that don’t carry the same Mcp-Session-Id across requests: pass sessionId explicitly on every call to reliably target the right browser session. See Session reattachment below.
Perform an action on the web page using natural language
string
required
The action to perform (e.g., “click the login button”, “fill form field”)
string
Optional Browserbase session ID to target or reattach to. Defaults to the current active session.
Observe and find actionable elements on the page.
string
required
Specific instruction for observation (e.g., “find the login button”, “locate search form”)
string
Optional Browserbase session ID to target or reattach to. Defaults to the current active session.
Extract data from the current page.
string
Optional extraction instruction.
string
Optional Browserbase session ID to target or reattach to. Defaults to the current active session.
Create or reuse a Browserbase session and set it as active for the current MCP transport session.Inputs
string
Optional existing Browserbase session ID to reuse instead of creating a new session.
Output
string
Browserbase session ID.
Close a Browserbase session.
string
Optional Browserbase session ID to close. Defaults to the current active session. Closing a session by explicit ID only clears the transport’s active-session state when that ID is the current session.

Session reattachment

The hosted endpoint (mcp.browserbase.com) keeps track of an active Browserbase session per MCP transport (Mcp-Session-Id). Some MCP clients open a new transport on every tool call instead of reusing one, which means the server has no active session to fall back to and calls fail with No active session. To work reliably with these clients, pass the sessionId returned by start on every subsequent tool call. An explicit sessionId always takes priority over the transport’s current session. The hosted endpoint adopts a session as the transport’s active session only after confirming that session still exists, so a stale or incorrect sessionId surfaces an error instead of silently redirecting a later call.

Local command-line flags

Command-line flags are only available when running the server locally (npx @browserbasehq/mcp with flags or local development setup).

Installation methods

Verify installation

1

Restart your MCP client

Restart/refresh your MCP client app and verify tools are available.
2

Test the integration

Get started by asking your MCP client to navigate to any page and see your Browserbase browser in action on the dashboard.
Try: “Navigate to example.com and extract the main heading”

Further reading

Model Context Protocol (MCP) docs

Learn more about the MCP protocol

Browserbase Documentation

Explore Browserbase features and capabilities

Support

Get help from the Browserbase support team