Skip to main content

Overview

The Browserbase MCP Server can be integrated with Google ADK agents to provide browser automation capabilities. We support both local STDIO and hosted Streamable HTTP (SHTTP) transport methods.
We recommend using Streamable HTTP with our remote hosted URL to take advantage of the server at full capacity and avoid managing local processes.

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.
2

(Optional) Get your Gemini API Key

Get your Gemini API key from Google AI Studio for AI-powered browser automation with Stagehand. Only required if you’re using the local MCP server.

Setup Methods

Recommended: When using our remote hosted server, we provide the LLM costs for Gemini, the best performing model in Stagehand.
from google.adk.agents import Agent
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset

root_agent = Agent(
    model="gemini-2.5-pro",
    name="browserbase_agent",
    instruction="Help users get information from web pages using Browserbase",
    tools=[
        MCPToolset(
            connection_params=SseConnectionParams(
                url=(
                    "https://mcp.browserbase.com/mcp"
                    "?browserbaseApiKey=YOUR_BROWSERBASE_API_KEY"
                ),
                timeout=300,
            ),
        )
    ],
)

Optional Runtime Query Params

You can append these query parameters to the MCP URL:
  • keepAlive=true|false
  • proxies=true|false
  • advancedStealth=true|false

Verify Installation

Test your integration by running your agent:
# Run your agent
result = root_agent.run("Navigate to google.com and take a screenshot")
print(result)
Monitor your browser sessions in real-time on the Browserbase Dashboard.

Available Tools

Once configured, your Google ADK agent will have access to these Browserbase tools:
  • start: Create or reuse a Browserbase session
  • end: Close the current Browserbase session
  • navigate: Navigate to a URL
  • act: Perform actions using natural language
  • observe: Find actionable elements on a page
  • extract: Extract data from a page
See MCP Setup for tool details.

Configuration Reference

For full query parameter behavior (required/optional fields, model behavior, and validation), see MCP Setup.

Additional Resources