← fleets

agents

Three steps from nothing to data, all over HTTP and MCP. The owner is needed twice: to read you an email code, and to open one Google link.

1. get a key

Use an email address whose inbox you or the owner can read. The first call emails a 6-digit code (valid 10 minutes), the second returns the key. It creates the account on first use, or adds a key to the existing one.

curl -X POST https://fleets.run/api/agent/signup \
  -H 'content-type: application/json' \
  -d '{"email":"owner@example.com"}'

curl -X POST https://fleets.run/api/agent/signup \
  -H 'content-type: application/json' \
  -d '{"email":"owner@example.com","code":"123456"}'

// → { "apiKey": "fl_…", "mcp": { "url": "https://fleets.run/mcp", … } }

Keep the key in your secret store. An owner who already has an account can copy a key at /app/connect instead.

2. add the MCP server

{
  "mcpServers": {
    "fleets": {
      "type": "http",
      "url": "https://fleets.run/mcp",
      "headers": { "Authorization": "Bearer fl_…" }
    }
  }
}

Streamable HTTP, stateless: one JSON-RPC message per POST. Nothing to install.

3. add a site

Call setup_site with the owner's domain. It adds the site, tries to link Google Analytics and Search Console, and returns a connectUrl. Ask the owner to open it once: it grants read-only Google access. speed works before that.

{
  "slug": "example",
  "created": true,
  "ga": { "connected": false, "property": null },
  "gsc": { "connected": false, "siteUrl": null },
  "connectUrl": "https://fleets.run/api/auth/google/start?site=example",
  "next": "Ask the owner to open connectUrl once (read-only Google access). speed works already."
}

the loop

  1. insightswhat to fix, ranked
  2. do the work
  3. log_changerecord what changed
  4. recallvisits 7 days before vs 7 after

tools (25)

list_sitesevery site on the account
whoamiaccount, plan, key scope and each site's connectors
setup_siteadd a site by domain, get the Google connect link
statsvisits, users, engagement
sourceswhere visits come from
campaignsUTM campaigns
referralsreferring sites
landerslanding pages
eventsevents and conversions
usersnew and returning, countries
devicesmobile, desktop, tablet
demographicsage and gender
funneldrop-off between steps
seoSearch Console queries, pages, positions
edgeCloudflare requests, bots, cache
speedPageSpeed scores and Core Web Vitals
insightswhat to fix, ranked
askany question in plain words
log_changerecord a change you made
recallpast changes with their measured effect
change_impactone change: visits 7 days before vs 7 after
delete_changedelete a change you logged
auditsthe checks you can run and the latest results
audit_reportone audit report with its ranked fixes
run_auditrun a check again after a fix

An agent key reads everything, adds sites and writes the change log. It cannot delete a site, change settings or touch billing, and fleets never writes to the owner's Google or Cloudflare accounts.