Skip to main content

Overview

The Browserbase MCP server provides comprehensive tools for browser automation and session management. These tools allow you to perform actions like navigating pages, capturing screenshots, manipulating cookies, and managing multiple browser sessions simultaneously.

Core Browser Automation Tools

These are the primary tools for modern web automation using natural language commands.
Navigate to any URL in the browser
url
string
required
The URL to navigate to
Perform an action on the web page using natural language
action
string
required
The action to perform (e.g., “click the login button”, “fill form field”)
Extract all text content from the current page (filters out CSS and JavaScript)
No input parameters required
Observe and find actionable elements on the web page
instruction
string
required
Specific instruction for observation (e.g., “find the login button”, “locate search form”)
Capture a PNG screenshot of the current page
No input parameters required
image
string
Base-64 encoded PNG data
Get the current URL of the browser page
No input parameters required
url
string
Complete URL including protocol, domain, path, and any query parameters or fragments
Get current URLs of all active browser sessions
No input parameters required
sessionUrls
object
Mapping of session IDs to their current URLs in JSON format

Single Session Management

Traditional approach with one active browser session. Simpler for basic automation tasks and automatically manages the active session.
Create or reuse a cloud browser session using Browserbase with fully initialized Stagehand
sessionId
string
Optional session ID to use/reuse. If not provided, creates new session
Close the current Browserbase session, disconnect the browser, and cleanup Stagehand instance
No input parameters required

Multi-Session Management

Advanced approach with multiple parallel browser sessions for complex automation workflows. Each session maintains independent state, cookies, and browser context.

Session Lifecycle Management

Create a new independent Stagehand browser session with full web automation capabilities
name
string
Human-readable name for tracking (e.g., ‘login-flow’, ‘data-scraping’)
List all currently active Stagehand browser sessions with detailed metadata
No input parameters required
Close and clean up a specific Stagehand browser session
sessionId
string
required
Exact session ID to close (cannot be undone)

Session-Specific Automation Tools

All core browser automation tools are available with session-specific variants:
Navigate to a URL in a specific browser session
sessionId
string
required
The session ID to use
url
string
required
The URL to navigate to
Perform an action in a specific browser session using natural language
sessionId
string
required
The session ID to use
action
string
required
The action to perform
Extract structured information from a specific browser session
sessionId
string
required
The session ID to use
instruction
string
required
What to extract from the page
Observe and find actionable elements in a specific browser session
sessionId
string
required
The session ID to use
instruction
string
required
What to observe (e.g., “find the login button”)
returnAction
boolean
Whether to return the action to perform
Get the current URL of a specific browser session
sessionId
string
required
The session ID to use
url
string
Complete URL including protocol, domain, path, and any query parameters or fragments

Multi-Session Use Cases

Parallel Data Collection

Run multiple scraping sessions simultaneously across different websites

A/B Testing

Compare user flows across different browser sessions with varying configurations

Cross-Site Operations

Perform coordinated actions across multiple websites or applications

Backup Sessions

Keep fallback sessions ready in case primary sessions encounter issues

Resources

Screenshot Resources

The server provides access to screenshot resources with URI-based access.example:
screenshot://screenshot-name-of-the-screenshot

Further Reading

I