Browserless — Claude Code MCP server: setup
Connects AI agents to Browserless for browser control, web extraction, screenshots, PDFs, and Lighthouse checks. A Browserless API token is required.
claude mcp add --transport http mcp https://mcp.browserless.io/mcpWhat Browserless does
Browserless exposes a hosted browser through MCP. An agent can fetch one page, search the web, crawl a site, discover its URLs, and run Lighthouse audits. Page data can come back as Markdown or HTML, while the export tool handles PDFs, images, and other native formats.
The agent tool supports persistent sessions with clicks, typing, scrolling, tabs, uploads, downloads, and captcha handling. Saved authentication profiles can be reused across requests, and account tools show plan and unit details without exposing token values. You need a Browserless API token to connect; the HTTP setup does not require a local installation.
What it helps with
- extract content from a JavaScript-heavy page
- crawl a site and collect its pages
- map a website’s URLs and descriptions
- run a Lighthouse audit for a URL
- export a webpage as a PDF or image
Example prompts for the agent
- Read this page and return its content as Markdown.
- Crawl this site, keep pages under
/docs, and return the scraped content. - Run a Lighthouse check for this URL with a mobile device profile.
How to install Browserless
1Platform CLI: remote server
claude mcp add --transport http mcp https://mcp.browserless.io/mcp2Platform CLI
claude mcp add --env BROWSERLESS_TOKEN=<BROWSERLESS_TOKEN> --env BROWSERLESS_API_URL=<BROWSERLESS_API_URL> --transport stdio browserless -- npx -y @browserless.io/mcpReplace <…> with your own values
1Platform CLI: remote server
codex mcp add browserless --url https://mcp.browserless.io/mcp2Platform CLI
codex mcp add browserless --env BROWSERLESS_TOKEN=<BROWSERLESS_TOKEN> --env BROWSERLESS_API_URL=<BROWSERLESS_API_URL> -- npx -y @browserless.io/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"browserless": {
"url": "https://mcp.browserless.io/mcp"
}
}
}{
"mcpServers": {
"browserless": {
"command": "npx",
"args": [
"-y",
"@browserless.io/mcp"
],
"env": {
"BROWSERLESS_TOKEN": "<BROWSERLESS_TOKEN>",
"BROWSERLESS_API_URL": "<BROWSERLESS_API_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"browserless": {
"type": "http",
"url": "https://mcp.browserless.io/mcp"
}
}
}{
"servers": {
"browserless": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@browserless.io/mcp"
],
"env": {
"BROWSERLESS_TOKEN": "<BROWSERLESS_TOKEN>",
"BROWSERLESS_API_URL": "<BROWSERLESS_API_URL>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http browserless https://mcp.browserless.io/mcp2Platform CLI
gemini mcp add -e BROWSERLESS_TOKEN=<BROWSERLESS_TOKEN> -e BROWSERLESS_API_URL=<BROWSERLESS_API_URL> browserless npx -y @browserless.io/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Browserless
How do I install Browserless in Claude Code?
Get a Browserless API token, then run claude mcp add --transport http browserless https://mcp.browserless.io/mcp.
What does Browserless do?
It gives an AI agent MCP tools for browser actions, web search, scraping, site crawling, Lighthouse audits, and page export.
What is required to use Browserless?
A Browserless API token is required for the connection.