# Browserbase — how to use (mcp.ai)

Connect your Browserbase account and use 19 tools for developer tools straight from your AI agent. Connect with your own API key. Browserbase is a serverless platform that enables developers to run, manage, and monitor headless browsers at scale, offering seamless integration with tools like Playwright, Puppeteer, and Selenium.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_browserbase_tool?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `browserbase_tool_contexts_create`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/browserbase_tool`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/browserbase_tool/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/browserbase_tool/contexts/create` — Tool to create a new browser context. Use when you need to obtain upload credentials for a custom user-data-directory in a project.
  - body: { projectId: string }
- `POST https://api.mcp.ai/api/browserbase_tool/contexts/get` — Tool to retrieve details of a specific browser context. Use when you have a context ID and need its metadata.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/contexts/update` — Tool to update a specific browser context. Use when you need fresh upload URL and encryption details for an existing context, after obtaining a valid context ID.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/create/browser/session` — Tool to create a new browser session. Use when you need an isolated browser context before performing any page interactions.
  - body: { region?: string, proxies?: object, timeout?: integer, keepAlive?: boolean, projectId: string, extensionId?: string, userMetadata?: object }
- `POST https://api.mcp.ai/api/browserbase_tool/delete/context` — Tool to delete a browser context and all its stored data (cookies, localStorage, etc.). Use when you need to permanently remove a context.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/delete/extension` — Tool to delete an uploaded browser extension by its ID. Use when you need to remove an extension from Browserbase.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/delete/session/downloads` — Tool to delete all file downloads from a specific browser session. Use when you need to clean up session artifacts or free storage space.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/get/extension` — Tool to retrieve details of a specific browser extension. Use when you have an extension ID and need its metadata (file name, timestamps, project ID).
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/get/project` — Tool to retrieve details of a specific project including settings and configuration. Use when you have a project ID and need its metadata.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/get/project/usage` — Tool to retrieve usage statistics for a project including browser minutes and proxy bytes consumed. Use when you need to monitor or track resource usage for a specific project.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/list/projects` — Tool to list all projects for the authenticated account. Use when you need to retrieve all projects associated with the current API key.
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/get` — Tool to retrieve details of a specific browser session. Use when you have a session ID and need its metadata (status, URLs, timestamps).
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/get/debug` — Tool to retrieve live debug URLs for a specific session. Use when you need to connect to a running session for debugging.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/get/downloads` — Tool to download files from a specific session. Use after session completion to retrieve all generated artifacts in a ZIP archive.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/get/logs` — Tool to retrieve logs of a specific session. Use after actions in a session to inspect network events and data exchange.
  - body: { id: string }
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/list` — Tool to list all browser sessions. Use when you need to retrieve sessions with optional filtering by status or metadata query.
  - body: { q?: string, status?: string }
- `POST https://api.mcp.ai/api/browserbase_tool/sessions/update` — Tool to update the status of a specific browser session. Use when you need to request session completion before timeout to avoid additional charges.
  - body: { id: string, status: string, projectId: string }
- `POST https://api.mcp.ai/api/browserbase_tool/upload/extension` — Tool to upload a browser extension for use in sessions. Supports Chrome extension format (ZIP). Use when you need to add custom browser extensions to your Browserbase project.
  - body: { file: object }
- `POST https://api.mcp.ai/api/browserbase_tool/upload/session/file` — Tool to upload files to a browser session for file input operations. Use when you need to make files available for file input fields or downloads within a browser automation session.
  - body: { id: string, file: object }

## Example prompts
- "What can I do in Browserbase?"
- "Show me a summary of my Browserbase account"

## More
- Page: https://mcp.ai/browserbase_tool
- Agent spec (llms.txt): https://mcp.ai/browserbase_tool/llms.txt
- Postman collection: https://mcp.ai/browserbase_tool/postman.json
