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

Browserless MCP in Replit

Replit Agent connects to the hosted Browserless MCP server as a custom MCP server, with your API token in an Authorization header. Once it's connected, Agent can scrape, search, crawl, and drive a cloud browser with the Browserless MCP tools in any of your projects.

Prerequisites

Connect to the hosted server​

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

Replit adds custom MCP servers through its settings UI, with no config file to edit.

  1. Open the MCP Servers settings pane and click + Add MCP server.
  2. Enter Browserless as the Display name and https://mcp.browserless.io/mcp as the MCP Server URL.
  3. Open Advanced settings and add a custom header named Authorization with the value Bearer YOUR_API_TOKEN_HERE.
  4. Click Test & save.

Replit Agent can then use the Browserless tools across all your projects.

To use a region other than US West, add an x-browserless-api-url header under Advanced settings. See regional endpoints.

For more on how Replit handles MCP servers, see the Replit MCP documentation.

Check the connection​

After Test & save, Browserless appears under MCP Servers with its connection status. Then name the server in a prompt, for example "Use the Browserless MCP server to fetch the title of example.com", and check that Agent calls a Browserless tool.

FAQ & Troubleshooting​

Can I run the Browserless MCP server locally with Replit?

Replit adds custom MCP servers by HTTPS endpoint, so connect to the hosted server at https://mcp.browserless.io/mcp. The local @browserless.io/mcp stdio server is for clients that launch a command on your machine.

Can I sign in with OAuth instead of an API token?

Use the API token header. Replit runs any OAuth flow the server offers, but its callback URL isn't on the hosted server's default list of allowed redirect URIs, so sign-in can fail.

Test & save fails, or every tool call returns 401 Unauthorized

The token is missing or wrong. Copy it again from your account dashboard and check the header value reads Bearer followed by the token, with no quotes or trailing whitespace.

Next steps​

Was this page helpful?