Skip to content

Connect a client to a fleet

This page is the protocol-agnostic version of “connect a client” — the shared endpoint and credential model behind every fleet, regardless of which client library you use. For copy-pasteable, language-specific snippets, jump straight to the Playwright quickstart or the Selenium quickstart.

  1. A fleet. Create one from the console, the REST API, an AI agent, or Loadrigo. A fleet request specifies browsers by count, engine (chrome, firefox, edge), and location — the fleet allocates and returns endpoints once the first browsers are ready.

  2. The fleet id. Every response and the fleet detail page show it — a flt-… identifier.

  3. A credential. Either the fleet’s own connection token (mpft_…, minted at create time or fetched with GET /v1/fleets/<fleetId>/token) or an account API key (mpak_…) with access to the fleet. Both slot into the exact same place in every protocol below — there is no separate “fleet-only” credential shape to learn.

A fleet exposes the same set of running browsers through three protocols. Pick whichever matches your existing client — you don’t need to pick one for the whole fleet, and different sessions can use different protocols concurrently:

Your client speaks…UseGuide
W3C WebDriver (selenium-webdriver, selenium, Appium-style REST)WebDriver — one URL, browserName capability picks the engineSelenium quickstart
Playwright’s connect()Playwright — one WebSocket URL per engine (chromium/firefox/msedge)Playwright quickstart
Chrome DevTools Protocol directly, or a Playwright/Puppeteer version you can’t pin to a supported minorCDP — version-agnostic, Chromium onlyCDP escape hatch

All three share the same host and fleet id, differing only in path and scheme:

https://app.maxoperf.com/browser-fleets/<fleetId>/wd/hub # WebDriver
wss://app.maxoperf.com/browser-fleets/<fleetId>/playwright/<engine> # Playwright — one per engine
wss://app.maxoperf.com/browser-fleets/<fleetId>/cdp # CDP (Chromium only)

<engine> for the Playwright path is one of chromium, firefox, or msedge. Staging and local (Tilt) environments expose the identical path shape on their env-equivalent app host — only the hostname changes.

The credential position differs by transport, but the value (mpft_… token or mpak_… key) is interchangeable everywhere:

ProtocolWhere the credential goes
WebDriverBasic-auth userinfo in the URL — fleet id as username, token as password
Playwright?token=<token> query parameter on the WebSocket URL
CDP?token=<token> query parameter on the WebSocket URL
Raw HTTP against the gatewayAuthorization header, or maxoperf:options.token in a WebDriver capability

Once you have an endpoint and a credential, the fastest sanity check is a single “open a page, read the title” session in whichever client you’re using — see the first code block on the Playwright or Selenium quickstart. A successful session shows up immediately as a live video tile on the fleet’s run in the console.