Browserbase MCP serverand Python AI tasks
qbash hosts a Browserbase MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair Browserbase with models such as Claude and GPT.
Add the qbash MCP
Use Browserbase from Claude Code, Codex, Cursor and other MCP clients. Connect Browserbase in qbash, and your agent can work with its data and build Tasks that call it.
claude mcp add --transport http qbash https://mcp.qbash.com/mcp
Then run /mcp in Claude Code and sign in with qbash.
- Start a browser session and return its ID and the connect URL for Playwright, Puppeteer or Stagehand
- List sessions by status, or find them by the metadata you tagged them with
- Read a session's status, region, start and end times, proxy bytes and metadata
- End a running session so it stops using browser minutes
- Get the live view URLs to watch or take over a running session in a browser
- Read the Chrome DevTools Protocol commands and results a session recorded
Write a Browserbase task in Python
A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.
Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.
Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.
Explain why a browser session failed from its logs
get_session_logs reads the DevTools Protocol commands a failed session sent and the results it got back. An inline prompt finds the step where the run went wrong and suggests a fix for the automation script.
logs = qbash.integrations.browserbase.get_session_logs(
session_id="2f6a1b9e-4c3d-4e8a-9b7f-1d2c3e4f5a6b",
)
if logs:
diagnosis = qbash.ai.run_prompt(
slug="browserbase-session-debug",
variables={"logs": json.dumps(logs)},
)
qbash.output(diagnosis)
else:
qbash.output("Browserbase recorded no logs for this session.")
Sample get_session_logs response
[
{
"method": "Page.navigate",
"pageId": 0,
"sessionId": "2f6a1b9e-4c3d-4e8a-9b7f-1d2c3e4f5a6b",
"request": {
"timestamp": 1762941602113,
"params": {
"url": "https://shop.example.com/login"
},
"rawBody": ""
},
"response": {
"timestamp": 1762941603487,
"result": {
"frameId": "A1B2C3",
"loaderId": "D4E5F6"
},
"rawBody": ""
},
"timestamp": 1762941602113
},
{
"method": "Runtime.callFunctionOn",
"pageId": 0,
"sessionId": "2f6a1b9e-4c3d-4e8a-9b7f-1d2c3e4f5a6b",
"request": {
"timestamp": 1762941604020,
"params": {
"functionDeclaration": "(sel) => document.querySelector(sel).click()",
"arguments": [
{
"value": "#login-submit"
}
]
},
"rawBody": ""
},
"response": {
"timestamp": 1762941604031,
"result": {
"exceptionDetails": {
"text": "Uncaught",
"exception": {
"description": "TypeError: Cannot read properties of null (reading 'click')"
}
}
},
"rawBody": ""
},
"timestamp": 1762941604020
}
]
Custom MCP server
Build a custom MCP server with Browserbase
Create a hosted MCP server that combines Browserbase tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Browserbase reads with write tools left off.
Share the server with your team, and each person adds it to the client they already use.
Browserbase MCP questions
Does Browserbase have an official MCP server?
Browserbase runs an official hosted MCP server at mcp.browserbase.com, built on Stagehand, whose tools drive a browser with natural-language actions. The qbash server puts Browserbase on one URL with your other connectors, adds session logs, replays, contexts and usage, and exposes the same methods to Python tasks.
How is the Browserbase connector different from the Browserless connector?
Browserbase and Browserless are separate cloud browser services with separate accounts. The Browserbase connector manages Browserbase sessions, contexts and recordings and calls its Fetch and Search APIs, and the Browserless connector runs page inspections and Puppeteer scripts on Browserless.
What does the Browserbase connector need to connect?
A Browserbase API key from the dashboard. Sessions, Fetch and Search calls run on your Browserbase plan and count toward its browser minutes and limits.
Related developer connectors
Build a Browserbase task
Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.