atrixANALYTICS

MCP

Connect Claude Code or any MCP client to your analytics over OAuth, with scopes you choose.

Atrix runs a hosted Model Context Protocol server at https://mcp.analytics.atrix.dev/mcp (streamable HTTP). An assistant connected to it can list your projects and run trends, funnels and retention against your real data.

Connect Claude Code

claude mcp add --transport http atrix-analytics https://mcp.analytics.atrix.dev/mcp

Then run /mcp inside Claude Code, pick atrix-analytics and choose Authenticate. A browser window opens:

  1. Sign in to Atrix Analytics (if you are not already).
  2. Pick the organisation to connect.
  3. Review the scopes. You can untick any of them; the client gets only what you leave ticked.
  4. Approve. The browser hands a code back to Claude Code, which exchanges it for tokens.

There is nothing to paste: the command carries no credential. The client stores an OAuth token that is scoped, refreshable and revocable, instead of a long-lived key in plain text.

Other MCP clients (Claude Desktop, Cursor, VS Code, and any client that supports remote servers with OAuth) connect to the same URL.

What the OAuth flow does

The server follows the MCP authorization spec, so compliant clients discover everything themselves:

  1. An unauthenticated request to /mcp gets 401 with a WWW-Authenticate header pointing at the protected-resource document (/.well-known/oauth-protected-resource/mcp, RFC 9728).
  2. That document names https://app.analytics.atrix.dev as the authorization server, whose metadata is at /.well-known/oauth-authorization-server (RFC 8414).
  3. The client registers itself with dynamic client registration (POST /oauth/register, RFC 7591). Only public clients are accepted: no client secret, PKCE with S256 required.
  4. The user signs in and consents at /oauth/authorize; the client exchanges the code at /oauth/token.
TokenLifetime
Authorisation code60 seconds, single use
Access token (atx_oat_…)1 hour
Refresh token30 days, rotated on every use

Reusing a spent refresh token or code revokes the whole grant. Every connection is listed in the console under Settings → Connections, where Disconnect revokes it and every token cut from it.

If no scopes are requested, the default is org:read projects:read query:read usage:read.

Tools

Every tool is read-only (readOnlyHint: true, destructiveHint: false, idempotentHint: true). A tool is only listed when your token holds its scope.

ToolWhat it doesScope
list_orgsYour organisation and your role in itorg:read
list_projectsProjects with id, name, region, timezone and environmentsprojects:read
get_projectOne project: region, retention, timezone, currency, environmentsprojects:read
list_eventsRecent event names with volumes (1–365 days, default 30)query:read
run_trendsTrends: series, math (total, unique persons or sessions, sum, avg, min, max, p50, p90, p99), interval, breakdown, compare, formulaquery:read
run_funnelA funnel of 2–20 steps with a conversion window (default 14 days), strict, ordered or unordered, with breakdownquery:read
run_retentionRetention by target and returning event, 1–52 periods (default 7), first-time or recurringquery:read
get_usageBilling usage for the current periodusage:read

In progress

get_usage currently answers available: false until billing usage is exposed through MCP. Write tools (drafting flags and experiments, proposing tracking-plan events) and a docs search tool are planned; they will create flags off and experiments as drafts, and going live will need the named scopes.

Try it

After connecting, ask things like:

  • "List my Atrix projects."
  • "What were the top 10 events in production over the last 7 days?"
  • "Show the signup → first_booking funnel for the last 30 days, broken down by platform."
  • "How does week-1 retention for users who signed up in August compare with July?"

Limits and safety

  • Queries run in the project's region, like the console's.
  • Tokens are checked against the control plane on every request (cached for at most 15 seconds), so revoking a connection takes effect almost immediately.
  • Supported protocol versions: 2025-06-18, 2025-03-26 and 2024-11-05.

On this page