Browserless MCP Server
The Browserless MCP server gives AI assistants full browser automation through the Model Context Protocol. Connect any MCP-compatible client to scrape, search, crawl, audit, and run custom browser code with no infrastructure to manage.
- A Browserless account - either an API token from your account dashboard, or OAuth sign-in
- An MCP-compatible client (Claude Desktop, Cursor, VS Code, Windsurf, etc.)
Hosted Server
Browserless provides a hosted MCP server ready to use:
https://mcp.browserless.io/mcp
No installation or environment variables required. See Authentication for how to connect.
Authentication
- OAuth
- API Token
OAuth connects through your Browserless account, so you don't need to copy or manage an API token. When you connect from a supported client such as Claude Desktop or Cursor, the client opens a browser window for you to sign in.
OAuth is enabled on the hosted server at https://mcp.browserless.io/mcp with no extra configuration needed.
API token authentication works with clients that accept custom headers or URL query parameters. Copy your token from the account dashboard, then pass it using one of these methods:
Header (recommended): Authorization: Bearer YOUR_API_TOKEN_HERE
Query parameter: ?token=YOUR_API_TOKEN_HERE (for URL-only clients such as Claude.ai custom connectors)
If a request carries more than one method, the server uses an API token in the Authorization header first, then the token query parameter, then an OAuth token in the Authorization header.
Client Setup
Pick your client to see its config for the hosted server. Each client also has a full guide covering local setup, how to check the connection, and client-specific troubleshooting.
Claude.ai and Claude Desktop. Both add remote servers as custom connectors, which sync through your Claude account. Claude Desktop doesn't load remote servers from claude_desktop_config.json.
- Go to Customize > Connectors and click Add custom connector (on Pro and Max, click + Add first).
- Enter a name (for example
Browserless) andhttps://mcp.browserless.io/mcp, then click Continue. - Choose Sign in now to authorize with your Browserless account, then click Add.
To use an API token instead of OAuth, choose No sign-in and add an authorization request header with the value Bearer YOUR_API_TOKEN_HERE. Request headers are in beta and not every organization sees them. If yours doesn't, put the token in the URL instead:
https://mcp.browserless.io/mcp?token=YOUR_API_TOKEN_HERE
On Team and Enterprise plans, an Owner adds the connector under Organization settings > Connectors, and members then click Connect under Customize > Connectors.
Claude Code. Run in your terminal:
claude mcp add --transport http browserless https://mcp.browserless.io/mcp \
--header "Authorization: Bearer YOUR_API_TOKEN_HERE"
To sign in with OAuth instead, leave out --header and run /mcp in Claude Code to authenticate.
ChatGPT adds remote MCP servers as custom plugins. Custom MCP servers are available on ChatGPT web, not mobile, for Business and Enterprise/Edu workspaces. On Business, only admins and owners can add them. On Enterprise/Edu, admins can grant other members permission.
- Go to ChatGPT Plugins, click +, then Add custom MCP server.
- Enter a name (for example
Browserless) and a short description. Under Connection, enterhttps://mcp.browserless.io/mcp. - Set authentication to OAuth, review the risk warning, and select I understand and want to continue.
- Select Create as a plugin, review the Browserless tools ChatGPT discovers, and install the plugin. Sign in with your Browserless account when ChatGPT prompts you.
To use it, start a new conversation, type @ in the prompt box, and select Browserless.
Install the plugin (recommended). In Cursor 3.13 or later, open Cursor Settings → Plugins, search for Browserless, click Install, then Authenticate and sign in with your Browserless account. You can also run /add-plugin browserless in chat. The plugin uses OAuth, so there's no token to copy, and Cursor stores the credentials itself. It's also listed on the Cursor Marketplace.
Add the server in one click. If you'd rather not use the plugin, add the MCP server directly. Cursor opens an install prompt and then asks you to sign in to your Browserless account. You don't need this if you installed the plugin.
Add to CursorConfigure it manually. On older Cursor builds, or to manage the config yourself, add to ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one project:
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
To sign in with OAuth instead, drop the headers block. Cursor prompts you to sign in to your Browserless account.
Install in one click. VS Code opens an install prompt for the Browserless MCP server, which signs in with your Browserless account over OAuth. This works in both Local and Copilot harness sessions.
Install in VS CodeConfigure it manually. To use an API token instead, run MCP: Open User Configuration from the Command Palette to open your user-level mcp.json, or create .vscode/mcp.json in a workspace. Then add:
{
"inputs": [
{
"type": "promptString",
"id": "browserless-token",
"description": "Browserless API token",
"password": true
}
],
"servers": {
"browserless": {
"type": "http",
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer ${input:browserless-token}"
}
}
}
}
VS Code prompts for the token the first time the server starts and stores it securely, so it never sits in the file. VS Code's file uses a top-level servers key, not mcpServers.
The token prompt only works in Local sessions. VS Code doesn't forward servers that need ${input:...} values to Copilot harness sessions, even after you've entered the token locally. For those, drop the inputs and headers blocks and sign in with OAuth instead.
Install the plugin (recommended). Windsurf is now Devin Desktop. Open Customize → Marketplace → Plugins, search for Browserless, and click Install for me. Devin Desktop then redirects you to sign in with your Browserless account, so there's no token to copy.
Add it manually. Since version 3.9.19, Devin Desktop's agent is Devin Local, which reads the same MCP config as Devin CLI. Add to ~/.config/devin/mcp_config.json (%APPDATA%\devin\mcp_config.json on Windows):
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
To sign in with OAuth instead, drop the headers block and authenticate from the Devin Local MCP view, or with Devin CLI run devin mcp login browserless.
Older Windsurf versions with Cascade. In Cascade, open the ⋯ menu and choose Open MCP config file, then add the same entry with serverUrl in place of url and transport.
The hosted server supports OAuth. Add it, then sign in:
codex mcp add browserless --url https://mcp.browserless.io/mcp
codex mcp login browserless
To use an API token instead, add to ~/.codex/config.toml:
[mcp_servers.browserless]
url = "https://mcp.browserless.io/mcp"
bearer_token_env_var = "BROWSERLESS_TOKEN"
Set BROWSERLESS_TOKEN in your environment before starting Codex. In the ChatGPT desktop app, go to Settings → MCP servers → Add server, choose Streamable HTTP, save, then select Restart (and Authenticate to sign in with OAuth).
Add to ~/.gemini/settings.json (or a project-scoped .gemini/settings.json):
{
"mcpServers": {
"browserless": {
"httpUrl": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
Gemini CLI uses httpUrl for Streamable HTTP servers. Its url key means the legacy SSE transport, which the hosted server doesn't support.
To sign in with OAuth instead, drop the headers block. Gemini CLI discovers the OAuth flow when the server first returns 401, and /mcp auth browserless re-authenticates.
Add to ~/.kiro/settings/mcp.json for every workspace, or .kiro/settings/mcp.json for one workspace:
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
Kiro reloads servers when you save the file. To sign in with OAuth instead, drop the headers block and Kiro opens a browser window to your Browserless account.
Run zed: open settings file from the command palette and add a context_servers entry:
{
"context_servers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
To sign in with OAuth instead, drop the headers block. Zed prompts you to authenticate with your Browserless account.
Run this and Amp opens your browser to sign in with your Browserless account the next time it starts:
amp mcp add browserless https://mcp.browserless.io/mcp
To use an API token instead, add to ~/.config/amp/settings.json and set BROWSERLESS_TOKEN in your environment:
{
"amp.mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer ${BROWSERLESS_TOKEN}"
}
}
}
}
In LM Studio 0.3.17 or later, open the Program tab in the right sidebar, click Install, then Edit mcp.json. Add:
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
On LM Studio 0.4.10 or later, you can sign in with OAuth instead: drop the headers block and LM Studio opens a browser window to approve access. Earlier versions need the API token header.
LM Studio asks you to confirm each tool call, and you can allow a tool once or always. Change those choices later under App Settings > Tools & Integrations.
Set BROWSERLESS_TOKEN in your environment, then run:
grok mcp add --transport http browserless https://mcp.browserless.io/mcp \
--header 'Authorization: Bearer ${BROWSERLESS_TOKEN}'
Grok Build stores header values as written, so the single quotes keep the token itself out of ~/.grok/config.toml and your shell history. It expands ${BROWSERLESS_TOKEN} when it loads the config. To sign in with OAuth instead, leave out --header. Grok Build opens a browser window on first use.
Perplexity connects to hosted MCP servers through custom remote connectors. On organization accounts, an admin may need to turn on Allow members to add custom connectors first.
- Open Account settings → Connectors.
- Click + Custom connector, then select Remote.
- Enter
Browserlessas the name andhttps://mcp.browserless.io/mcpas the MCP server URL. - Under Authentication, select API Key and paste your Browserless API token.
- Under Transport, select Streamable HTTP.
- Acknowledge the custom connector warning and click Add.
- Click the new connector card to enable it.
Enable the Browserless connector for a thread before asking Perplexity to use its tools.
Add to ~/.gemini/config/mcp_config.json for all workspaces, or .agents/mcp_config.json in a workspace. The file holds your API token, so prefer the global file for repositories you share, and add .agents/mcp_config.json to .gitignore if you use the workspace one. To open the config from the IDE, click … at the top of the agent panel, then MCP Servers → Manage MCP Servers → View raw config.
{
"mcpServers": {
"browserless": {
"serverUrl": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
Use serverUrl for the endpoint. Antigravity doesn't support the httpUrl field that Gemini CLI uses, so copying a Gemini CLI config as-is won't connect.
Replit adds custom MCP servers through its settings UI, with no config file to edit.
- Open the MCP Servers settings pane and click + Add MCP server.
- Enter
Browserlessas the Display name andhttps://mcp.browserless.io/mcpas the MCP Server URL. - Open Advanced settings and add a custom header named
Authorizationwith the valueBearer YOUR_API_TOKEN_HERE. - Click Test & save.
Replit Agent can then use the Browserless tools across all your projects.
Add to ~/.kimi-code/mcp.json for every project, or .kimi-code/mcp.json for one project:
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
Kimi Code CLI treats an entry with a url and no transport as a Streamable HTTP server. To keep the token out of the file, replace the headers block with "bearerTokenEnvVar": "BROWSERLESS_TOKEN" and set BROWSERLESS_TOKEN in your environment. To sign in with OAuth instead, drop the headers block and run /mcp-config login browserless in Kimi Code CLI, which opens a browser window to your Browserless account.
Set BROWSERLESS_TOKEN in your environment, then run in your terminal:
qwen mcp add --transport http browserless https://mcp.browserless.io/mcp \
--header 'Authorization: Bearer $BROWSERLESS_TOKEN'
The single quotes keep the shell from expanding the variable, so the settings file stores $BROWSERLESS_TOKEN and Qwen Code resolves it when it loads settings. This writes the entry to ~/.qwen/settings.json. Add --scope project to write .qwen/settings.json in the current project instead. The token stays out of that file, and Qwen Code holds the server as pending until you run qwen mcp approve browserless. To edit the file by hand, add:
{
"mcpServers": {
"browserless": {
"httpUrl": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer $BROWSERLESS_TOKEN"
}
}
}
}
If you signed in to browserless with OAuth before, remove the server first, in the scope you added it to: qwen mcp remove --scope user browserless, or qwen mcp remove --scope project browserless from the project directory. Qwen Code sends stored OAuth tokens in place of the Authorization header, and removing the server also deletes its stored tokens. qwen mcp remove defaults to user scope and deletes the tokens only when it finds the server in that scope, so a project entry needs --scope project.
Qwen Code uses httpUrl for Streamable HTTP servers. Its url key means the legacy SSE transport, which the hosted server doesn't support.
To sign in with OAuth instead, leave out --header (or the headers block). Qwen Code discovers the OAuth flow when the server first returns 401 and opens a browser window. You can re-run sign-in from the server's Auth actions in the /mcp dialog.
Put your token in ~/.hermes/.env so it stays out of the config file:
BROWSERLESS_TOKEN=YOUR_API_TOKEN_HERE
Then reference it from ~/.hermes/config.yaml. Hermes expands ${VAR} in server entries from .env or the process environment:
mcp_servers:
browserless:
url: "https://mcp.browserless.io/mcp"
headers:
Authorization: "Bearer ${BROWSERLESS_TOKEN}"
Run /reload-mcp if Hermes is already running. Tools are prefixed with the server name, so they appear as mcp__browserless__browserless_agent and so on.
Export your token:
export BROWSERLESS_API_TOKEN="YOUR_API_TOKEN_HERE"
Then add the server to opencode.json in your project root or ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"browserless": {
"type": "remote",
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer {env:BROWSERLESS_API_TOKEN}"
}
}
}
}
opencode substitutes environment variables with {env:VAR}, so use that form rather than shell-style $VAR or ${VAR}. Verify with opencode mcp list. Tools are namespaced as <server>_<tool>, so they read browserless_browserless_agent and so on.
Run Locally
Node.js 24 or newer.
Prefer not to use the hosted server? The MCP server is published to npm as @browserless.io/mcp, so you can run it locally with npx. No cloning, building, or Docker required. This is useful for pinning a specific server version (for example npx -y @browserless.io/mcp@1.41.0) or pointing at a self-hosted Browserless instance, including fully air-gapped setups, but only when that self-hosted instance also runs inside the isolated network.
Running locally still calls the Browserless cloud (or your self-hosted instance) for the actual browser work. Only the MCP server process runs on your machine.
stdio (MCP clients)
Local clients start the server as a subprocess over stdio, which is the default mode. Most clients take an entry in this shape:
{
"mcpServers": {
"browserless": {
"command": "npx",
"args": ["-y", "@browserless.io/mcp"],
"env": {
"BROWSERLESS_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
The top-level key and file location vary by client. VS Code uses servers, Zed uses context_servers, Amp uses amp.mcpServers, and Codex and Grok Build use TOML. Each client guide has the exact local config. CLI clients can add it in one command:
claude mcp add browserless --env BROWSERLESS_TOKEN=YOUR_API_TOKEN_HERE \
-- npx -y @browserless.io/mcp
HTTP (httpStream)
To run the server as a long-lived HTTP endpoint (for example to share one instance across clients) set TRANSPORT=httpStream:
TRANSPORT=httpStream PORT=8080 BROWSERLESS_TOKEN=YOUR_API_TOKEN_HERE \
npx -y @browserless.io/mcp
Then point your MCP client at http://localhost:8080/mcp, using the same header or query-parameter auth as the hosted server.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
BROWSERLESS_TOKEN | Yes | — | Your Browserless API token |
BROWSERLESS_API_URL | No | https://production-sfo.browserless.io | API endpoint (set this to point at a self-hosted instance or a different region) |
TRANSPORT | No | stdio | Transport type: stdio or httpStream |
PORT | No | 8080 | HTTP server port (only used with httpStream) |
BROWSERLESS_TIMEOUT | No | 30000 | Request timeout in milliseconds |
BROWSERLESS_MAX_RETRIES | No | 3 | Max retry attempts for failed requests |
BROWSERLESS_CACHE_TTL | No | 60000 | Cache TTL in milliseconds (0 to disable) |
Regional Endpoints
By default, the hosted MCP server connects to the US West (San Francisco) Browserless region. To use a different region, pass the endpoint as a header or query parameter:
| Region | Endpoint |
|---|---|
| US West — San Francisco (default) | https://production-sfo.browserless.io |
| Europe — London | https://production-lon.browserless.io |
| Europe — Amsterdam | https://production-ams.browserless.io |
Using the x-browserless-api-url header (for clients that support headers):
{
"mcpServers": {
"browserless": {
"type": "http",
"url": "https://mcp.browserless.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE",
"x-browserless-api-url": "https://production-sfo.browserless.io"
}
}
}
}
Using the browserlessUrl query parameter (for URL-only clients like Claude.ai):
https://mcp.browserless.io/mcp?token=YOUR_API_TOKEN_HERE&browserlessUrl=https://production-sfo.browserless.io
Tools
The MCP server exposes fourteen tools to your AI assistant, split across three reference pages:
Browser Agent
A single stateful tool, browserless_agent, that can drive a browser session across turns. In MCP server v1.33.0+, sessions are one-shot by default. For multi-step work, set keepSessionAlive: true on the first call, then echo the returned sessionId on later calls. The model can then navigate, snapshot, click, type, and react within one browser context. See session lifetime and examples.
REST API Tools
Eight stateless tools: one call in, one result out. Seven wrap individual Browserless REST endpoints; the eighth, browserless_skill, loads on-demand agent guidance:
| Tool | Purpose |
|---|---|
browserless_smartscraper | Scrape any URL with cascading strategies (HTTP → proxy → headless → CAPTCHA solving) |
browserless_function | Run custom Puppeteer JavaScript on the Browserless cloud |
browserless_export | Export a page as HTML, PDF, image, or full offline ZIP |
browserless_search | Web/news/image search with optional scraping of each result |
browserless_map | Discover all URLs on a site via sitemap and link extraction |
browserless_performance | Run a Lighthouse audit (accessibility, performance, SEO, PWA, best practices) |
browserless_crawl | Crawl a site from a seed URL and scrape every discovered page |
browserless_skill | Load an on-demand agent skill or discover site-specific recipes |
Account Tools
Five read-only tools that report on the account behind your API token. None of them changes account state or returns API token values:
| Tool | Purpose |
|---|---|
browserless_account | Plan, unit balance, billing period, and API key names |
browserless_usage | Request counts and billed units for the account or specific keys |
browserless_logs | Browserless-side request logs for diagnosing failed runs |
browserless_sessions | Running browsers, persistent sessions, replays, and 1Password integrations |
browserless_profiles | Saved authentication profiles other tools reuse by name |
FAQ & Troubleshooting
My client fails with an SSE error like Non-200 status code (400)
The hosted server speaks the Streamable HTTP transport only; it doesn't support the legacy SSE transport. In clients that let you pick (n8n's MCP Client node, some SDKs), select Streamable HTTP rather than SSE, point it at https://mcp.browserless.io/mcp, and authenticate with an Authorization: Bearer YOUR_API_TOKEN_HERE header or the ?token= query parameter.
How much do MCP sessions cost?
Each MCP tool call opens a browser session that consumes units based on session time, plus proxy traffic and CAPTCHA solving if used. See Unit Consumption for the full breakdown.