
Browserbase MCP (Stagehand)
OfficialOfficial Browserbase cloud-browser MCP built on Stagehand — natural-language act/extract/observe.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @browserbasehq/mcpPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"browserbase-mcp-stagehand": {
"command": "npx",
"args": [
"-y",
"@browserbasehq/mcp"
],
"env": {
"GEMINI_API_KEY": "<your-gemini-api-key>",
"BROWSERBASE_API_KEY": "<your-browserbase-api-key>",
"BROWSERBASE_PROJECT_ID": "<your-browserbase-project-id>"
}
}
}
}Before you start
- Node.js 18+ (run via npx) — or use the hosted endpoint with no local runtime
- A Browserbase API key and Project ID from your Browserbase dashboard (browserbase.com)
- A model API key for Stagehand — defaults to Google Gemini (GEMINI_API_KEY); custom models (Claude, GPT-4o) need the matching key via --modelApiKey
About Browserbase MCP (Stagehand)
The official Browserbase MCP server lets an LLM control a cloud browser running on Browserbase's infrastructure, with AI-driven automation powered by Stagehand. Instead of brittle CSS selectors, you drive the page with natural language: act performs an action, observe identifies actionable elements, and extract pulls structured data — Stagehand translates intent into Playwright actions under the hood.
Because sessions run in the cloud, you get production-grade features for free: residential proxies, advanced stealth and Verified Identity (Scale plan), keep-alive sessions, persistent contexts for re-using auth state, and parallel multi-session automation for scraping or testing at scale.
It ships as the self-hostable @browserbasehq/mcp package over stdio, and Browserbase also offers a fully hosted remote endpoint at https://mcp.browserbase.com/mcp (SHTTP) where they cover the Gemini model costs. Stagehand v3 brings 20–40% faster act/extract/observe plus improved extraction across iframes and shadow DOM. Maintained by Browserbase, Inc.
Tools & capabilities (8)
startCreate or reuse a Browserbase cloud session
navigateNavigate the session's browser to a URL
actPerform an action on the page described in natural language (Stagehand)
observeIdentify actionable elements on the page using a natural-language query
extractExtract structured data from the current page, with optional instructions/schema
endClose the current Browserbase session
multi_browserbase_stagehand_session_createCreate an additional independent session for parallel/multi-session automation
screenshotCapture a screenshot of the cloud browser page
When to use it
- Use it when you want to automate a browser with natural language instead of writing selectors
- Use it when you need cloud browsers with proxies and stealth to avoid blocks during scraping
- Use it when you need to extract structured data from pages into a schema
- Use it when you want parallel multi-session automation for scale (scraping, A/B testing, multiple accounts)
- Use it when you need persistent auth/context across sessions via Browserbase contexts
- Use it when you want browser automation without managing local Chrome or Playwright infrastructure
Quick setup
- 1Create a Browserbase account and copy your API key and Project ID
- 2Choose hosted (point your client at https://mcp.browserbase.com/mcp) or self-hosted via `npx @browserbasehq/mcp`
- 3For self-hosted, set BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, and GEMINI_API_KEY (or pass --modelName/--modelApiKey)
- 4Add the server to your MCP client config and restart the client
- 5Optionally add flags like --proxies, --advancedStealth, or --contextId
- 6Verify by asking the agent to start a session, navigate to a URL, and extract some data
Security notes
Requires a Browserbase API key, project ID, and an LLM API key, all of which are billable cloud credentials — keep them in env, not in shared config. Natural-language actions run against live cloud sessions, so scope automation carefully when it touches authenticated or payment flows.
Browserbase MCP (Stagehand) FAQ
Is this the official Browserbase server?
Yes. It is maintained by Browserbase, Inc. and built on their Stagehand framework, licensed Apache-2.0.
What credentials do I need?
A Browserbase API key and Project ID (from your dashboard), plus a model API key for Stagehand — Gemini by default, or your own key for Claude/GPT models.
Do I have to self-host it?
No. Browserbase runs a hosted endpoint at https://mcp.browserbase.com/mcp where they cover the default Gemini model costs; self-hosting via `npx @browserbasehq/mcp` is the alternative.
How is this different from a local Playwright/Puppeteer MCP server?
Browsers run in Browserbase's cloud, not on your machine, and you drive them with Stagehand's natural-language act/observe/extract plus built-in proxies, stealth, and multi-session scaling.
Can I run several browser sessions at once?
Yes. Use multi_browserbase_stagehand_session_create to spin up independent parallel sessions for concurrent scraping or testing.
Alternatives to Browserbase MCP (Stagehand)
All-in-one web access MCP — Web Unlocker, SERP, Scraper API, and a cloud Scraping Browser.
Popular community Playwright + API testing MCP server with codegen, screenshots, and device emulation.
Selenium WebDriver MCP server — cross-browser automation for Chrome, Firefox, Edge, and Safari.
Compare Browserbase MCP (Stagehand) with: