For AI agents: a documentation index is available at /llms.txt
Skip to main content

Browserless MCP in Amp

Amp connects to the hosted Browserless MCP server with one CLI command and OAuth, or with an API token in settings.json. Once it's connected, Amp can scrape, search, crawl, and drive a cloud browser with the Browserless MCP tools.

Prerequisites
  • A Browserless API token from your account dashboard, or a Browserless account for OAuth sign-in
  • Amp CLI or editor extension installed

Connect to the hosted server​

The hosted server runs at https://mcp.browserless.io/mcp, so there's nothing to install.

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}"
}
}
}
}

To use a region other than US West, add an x-browserless-api-url header, or a browserlessUrl query parameter on the server URL for clients that only take a URL. See regional endpoints.

Run the server locally​

To run the MCP server process on your machine instead, use the @browserless.io/mcp npm package over stdio. You need Node.js 24 or newer. Browser work still runs on Browserless, so this is mainly for pinning a server version (add it to the package name, for example @browserless.io/mcp@1.41.0) or pointing at a self-hosted instance with BROWSERLESS_API_URL. Both setups use the server name browserless, so replace the hosted entry with this one rather than adding both.

Add to ~/.config/amp/settings.json:

{
"amp.mcpServers": {
"browserless": {
"command": "npx",
"args": ["-y", "@browserless.io/mcp"],
"env": {
"BROWSERLESS_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}

Check the connection​

Run amp mcp doctor to check the status of browserless.

FAQ & Troubleshooting​

amp mcp doctor says awaiting approval

Servers defined in a workspace .amp/settings.json need approval before Amp starts them. Run amp mcp approve browserless.

How do I share the server config with my team?

Use a remote definition stored on ampcode.com instead of a local settings file: amp mcp remote --workspace <name> add Browserless https://mcp.browserless.io/mcp. Each teammate then signs in with amp mcp remote --workspace <name> login Browserless.

The server connects but every tool call returns 401 Unauthorized

The token is missing or wrong. Copy it again from your account dashboard and check the header reads Bearer followed by the token, with no quotes or trailing whitespace inside the value. If you used an environment variable, confirm it's set in the environment the client was launched from. GUI apps started from the dock or Start menu don't see variables exported in your shell profile.

The connection fails with an SSE error like Non-200 status code (400)

The hosted server speaks Streamable HTTP only and doesn't support the legacy SSE transport. Check the client entry is using its HTTP transport (see the config above), not an SSE one.

Next steps​

Was this page helpful?