🌐

Browserbase

Hosted browser sessions for automation in restricted environments.

Category: Automation
Difficulty: Medium
Rank: #9

Quick Configuration

Choose the setup that matches your environment.

Before You Start

  • Confirm you have the account, endpoint, or API key required for Browserbase.
  • Start with minimum scopes and read-only access where possible.
  • Keep secrets in environment variables instead of hardcoding them in JSON.
Last verified: 2026-06-13
Environment: Node.js 18+, @browserbasehq/mcp over stdio (Browserbase + Stagehand)
Install command: npx -y @browserbasehq/mcp

Local config

JSON
Local config json
{
  "browserbase": {
    "command": "npx",
    "args": ["-y", "@browserbasehq/mcp"],
    "env": {
      "BROWSERBASE_API_KEY": "${BROWSERBASE_API_KEY}",
      "BROWSERBASE_PROJECT_ID": "${BROWSERBASE_PROJECT_ID}",
      "GEMINI_API_KEY": "${GEMINI_API_KEY}"
    }
  }
}

After copying

Check the Browserbase JSON before running it in OpenClaw, then verify the server with a real prompt.

Verify prompt

Start a session, open https://example.com, and return the page title and a screenshot.

Expected success output

You should see a hosted browser session start, then the page title and a screenshot reference.

Common Pitfalls & Fixes

  • ⚠️ Watch out: Session lifecycle, credentials handling, and network egress policies.
  • 🔑 Always store API keys in environment variables, never hardcode them in JSON.
  • 🛡️ Start with read-only scopes if available to verify connection safely.

Security checklist

  • Keep all keys (Browserbase and model) in environment variables, never in committed JSON.
  • Hosted sessions run remotely; avoid sending secrets or real credentials into automated browsing.

Common errors

Error Cause Fix
401 Unauthorized BROWSERBASE_API_KEY or BROWSERBASE_PROJECT_ID is missing or wrong. Copy both from your Browserbase dashboard and set them as env vars.
Model API key error Stagehand needs an LLM key (GEMINI_API_KEY) that is missing. Add a valid GEMINI_API_KEY, or configure the model provider Browserbase expects.
Session limit reached The concurrent session quota on the current plan was hit. Close idle sessions or upgrade the Browserbase plan.

Example Prompts

Once connected, try these prompts to test capabilities:

  • Start a new browser session, visit a URL, and return a screenshot and page title.
  • Extract key details from a page (price, plan name, and FAQ headings) into JSON.
  • Run the same navigation twice and report any flaky elements you noticed.

Verification Checklist

  • Run 1-2 real prompts to confirm Browserbase returns usable data.
  • Check that error messages are clear enough for troubleshooting.
  • Document the required scopes, dependencies, and env vars for future reuse.