Skip to content

Connect AI SDK to Browser.lol

Let AI SDK open and use websites in a Browser.lol cloud browser. You watch live and take over whenever it needs you.

Add the server to your client

Connect AI SDK

You need Node.js server code with npm install @ai-sdk/mcp ai and a model provider. Never run this in a browser: your API key would be public.

  1. 1. Create an API key

    Open the dashboard to create a key and get a ready-to-copy configuration.

    Create a key in the dashboard
  2. 2. Add the connection

    Create the client in your server code with your API key in place of YOUR_API_KEY. Pass await browserlol.tools() as tools to generateText or streamText and close the client with browserlol.close() when you are done.

    npm install @ai-sdk/mcp

    Use this in your server code.

    Create a key to copy this value
  3. 3. Try it in your code

    Call generateText with the task below and allow several steps with stopWhen, then check that the text describes the page.

    Open example.com in a Browser.lol session and tell me what the page says.
Official instructionsInstructions checked October 2, 2026

Automation tools, your own code and clients without sign-in use an API key in a header instead. The AI agents page creates one for the client you choose; give each client or machine its own key so you can revoke access separately.

Open Agents
All clients, tools and limits of the MCP server