Staats

MCP Server

Every question, deploy annotation, and site metric, served through a single authenticated Model Context Protocol connection.

Connection details

Server URLhttps://api.staats.ai/functions/v1/mcp/YOUR_ACCOUNT_KEY
TransportStreamable HTTP (JSON-RPC 2.0 over POST)
AuthenticationKey in the URL path (zero headers needed)

Your account key starts with ak_ and lives in your dashboard. Because the key is embedded in the URL, native remote MCP configuration takes one line:

# Claude Code CLI (--scope user connects every project on the machine)
claude mcp add --scope user --transport http analytics "https://api.staats.ai/functions/v1/mcp/YOUR_ACCOUNT_KEY"
# Codex
codex mcp add analytics https://api.staats.ai/functions/v1/mcp/YOUR_ACCOUNT_KEY
// Cursor (~/.cursor/mcp.json or project .cursor/mcp.json)
{
  "mcpServers": {
    "analytics": { "url": "https://api.staats.ai/functions/v1/mcp/YOUR_ACCOUNT_KEY" }
  }
}

The URL acts as your credential: keep it out of public repositories. Clients that prefer standard header authorization can send Authorization: Bearer YOUR_ACCOUNT_KEY to https://api.staats.ai/functions/v1/mcp directly. Leaked a key? Regenerate it from the dashboard — the old key stops working within a minute, and your sites' script tags are unaffected.

Site selection semantics

If your account has a single site, all tools execute against it automatically. When multiple sites exist, tools take an optional site argument: the public data-site code from the site's script tag (also returned by list_sites alongside each domain and name). Exact matches only; the server never guesses.

Available tools

ToolPurpose & Behavior
get_overviewSummary of visitors, pageviews, top paths, referrers, and trend vs previous period.
queryAggregated metrics by dimension with flexible filtering (paths, referrers, countries, events).
funnelOrdered conversion steps (paths or events) with stage-by-stage drop-off calculations.
what_changedAutomatic anomaly detection: traffic surges, viral referrers, and unusual days.
record_annotationRecord deploy markers with commit hash and touched routes for before/after measurement.
list_annotationsRetrieve chronological change logs and deploy milestones.
compare_aroundCompare metrics before vs after a deploy (with route-scoped analysis when routes were logged).
get_site_context / update_site_contextPersistent site memory across sessions: site goals, audience, event dictionaries, and open notes.
list_sitesList all sites on the account with public site codes.
create_siteCreate a new site and retrieve its script tag without leaving your agent chat.
delete_sitePermanently delete a site and its data (requires typed domain confirmation).
portfolio_overviewMulti-site portfolio breakdown sorted by highest traffic and growth.

Tool responses are returned as token-efficient JSON structured for LLM reasoning. Proactive quota notices are returned from 80% usage onward.