B

Browserbase MCP Server

Automate browser interactions in the cloud through MCP. Navigate pages, fill forms, take screenshots, extract content, and run end-to-end web automation workflows -- all from Claude Code without a local browser.

MCPCommunityautomationv1.0.0MIT
0 views0 copies

MCP Server Configuration

Add to .claude/settings.json:

{ "mcpServers": { "browserbase": { "command": "npx", "args": ["-y", "@browserbasehq/mcp-server-browserbase"], "env": { "BROWSERBASE_API_KEY": "${BROWSERBASE_API_KEY}", "BROWSERBASE_PROJECT_ID": "${BROWSERBASE_PROJECT_ID}" } } } }

Available Tools

ToolDescription
create_sessionStart a new cloud browser session
navigateNavigate to a URL in the browser
screenshotTake a screenshot of the current page
clickClick an element by CSS selector or text content
typeType text into an input field
get_contentExtract page content (text, HTML, or structured)
evaluateRun JavaScript in the browser context
close_sessionEnd the browser session and free resources

Use Cases

Web Scraping

1. Create session β†’ Navigate to target page
2. Wait for dynamic content to load
3. Extract structured data using CSS selectors
4. Handle pagination by clicking "next" buttons
5. Close session when complete

Form Testing

1. Navigate to form page
2. Fill each field with test data
3. Submit the form
4. Screenshot the result page
5. Verify success message content

Visual QA

1. Navigate to each page of your app
2. Screenshot at multiple viewport sizes
3. Compare with expected layouts
4. Report visual discrepancies

Workflow Example

User: "Check if our pricing page loads correctly and screenshot it"

Claude's steps:
1. create_session()
2. navigate("https://myapp.com/pricing")
3. Wait for page load
4. screenshot() β†’ Returns image for visual inspection
5. get_content(selector: ".pricing-card") β†’ Extract pricing data
6. close_session()

Session Configuration Options

{ "session_options": { "browserSettings": { "viewport": { "width": 1280, "height": 720 }, "userAgent": "custom-user-agent-string", "locale": "en-US", "timezone": "America/New_York" }, "proxy": { "type": "residential", "country": "US" }, "keepAlive": true, "timeout": 300000 } }

Setup

  1. Sign up at browserbase.com and get your API key
  2. Create a project and note the Project ID
  3. Set environment variables:
    export BROWSERBASE_API_KEY="your-api-key" export BROWSERBASE_PROJECT_ID="your-project-id"
  4. Add the MCP configuration to .claude/settings.json

Security Notes

  • Browser sessions run in isolated cloud environments, not on your machine
  • Sessions are automatically terminated after timeout (default 5 minutes of inactivity)
  • Never use browser automation to access accounts you don't own
  • Be mindful of rate limits and respect robots.txt on target sites
  • API keys should be stored in environment variables, never committed to code
  • Browser sessions may retain cookies -- use fresh sessions for sensitive operations
Community

Reviews

Write a review

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

Similar Templates