B

Bridge Mcp Server Browserbase

Battle-tested mcp for server, provides, cloud, browser. Includes structured workflows, validation checks, and reusable patterns for browser_automation.

MCPClipticsbrowser_automationv1.0.0MIT
0 views0 copies

Bridge Mcp Server Browserbase

Cloud-based browser automation MCP server powered by Browserbase and Stagehand for reliable, scalable web interactions with atomic precision.

When to Use This MCP Server

Connect this server when you need to:

  • Run browser automation in the cloud without managing local Chromium installations or dealing with environment-specific browser issues
  • Perform precise, atomic web interactions with Stagehand that go beyond simple CSS selectors using natural language element targeting
  • Scale browser sessions across multiple concurrent tasks with cloud-managed infrastructure and built-in session recording

Consider alternatives when:

  • You prefer local browser control and do not want to depend on a cloud service for automation
  • Your automation targets are only accessible from your local network and cannot be reached by cloud-hosted browsers

Quick Start

Configuration

name: bridge-mcp-server-browserbase type: mcp category: browser_automation

Example Connection

claude mcp add bridge-mcp-server-browserbase -- npx @browserbasehq/mcp-server-browserbase

Available Tools

create-session:    Start a new cloud browser session on Browserbase
navigate:          Load a URL in the cloud browser instance
interact:          Perform atomic interactions using Stagehand actions
screenshot:        Capture the cloud browser viewport as an image
extract:           Pull structured data from the rendered page
close-session:     Terminate a cloud browser session and free resources

Core Concepts

Browserbase Integration Overview

AspectDetails
ProtocolMCP over stdio transport
InfrastructureCloud-hosted browsers managed by Browserbase
AI LayerStagehand for intelligent element targeting
AuthenticationRequires Browserbase API key and project ID
Session RecordingBuilt-in replay and debugging for all sessions
ConcurrencyMultiple parallel browser sessions supported

Cloud Browser Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Claude Code  │────▢│  Browserbase     │────▢│  Cloud Browser β”‚
β”‚  (Client)    │◀────│  MCP Server      │◀────│  (Browserbase) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚                        β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
                    β”‚  Stagehand  β”‚          β”‚  Session    β”‚
                    β”‚  AI Layer   β”‚          β”‚  Recording  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Configuration

ParameterTypeDefaultDescription
BROWSERBASE_API_KEYstringrequiredAPI key for authenticating with Browserbase cloud
BROWSERBASE_PROJECT_IDstringrequiredProject identifier for session grouping and billing
GEMINI_API_KEYstringoptionalAPI key for Gemini vision model used by Stagehand
session_timeoutinteger300Maximum session duration in seconds before auto-termination
regionstringus-east-1Cloud region for browser instance deployment

Best Practices

  1. Use Stagehand for Complex Interactions - Stagehand provides atomic, AI-powered element targeting. Instead of fragile CSS selectors, describe what you want to interact with in natural language for more resilient automation scripts.

  2. Review Session Recordings - Browserbase records every session automatically. Use these recordings to debug failed automations and understand exactly what happened in the cloud browser during execution.

  3. Manage Sessions Explicitly - Always close sessions when done to free cloud resources and avoid unnecessary charges. Implement cleanup logic to terminate orphaned sessions if your workflow crashes.

  4. Choose the Right Region - Deploy browser sessions in the cloud region closest to your target websites to minimize latency. This significantly improves page load times and overall automation speed.

  5. Scope API Keys to Projects - Create project-specific API keys rather than using organization-wide credentials. This limits blast radius if a key is compromised and simplifies usage tracking per project.

Common Issues

  1. Invalid Project ID - Session creation fails if BROWSERBASE_PROJECT_ID does not match a valid project. Verify the ID in your Browserbase dashboard and ensure it belongs to the same organization as your API key.

  2. Stagehand Element Mismatch - AI-powered targeting may select the wrong element on complex pages. Add more descriptive context to your interaction commands or fall back to explicit CSS selectors for precision.

  3. Session Timeout During Long Tasks - Cloud sessions have a default timeout. For longer workflows, increase the session_timeout parameter or break the work into multiple sequential sessions.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates