Resources/Developer & SDK/Connect AI to Spectry (MCP)

Connect AI to Spectry (MCP)

Point Claude, an IDE agent or your own tooling at Spectry and ask about your sites in plain language.

Spectry speaks the Model Context Protocol (MCP), the open standard AI clients use to talk to external systems. Connect one and it can read your analytics, funnels, experiments, heatmaps, surveys and errors — and, if you allow it, change them.

In practice that means you can ask "why did checkout conversion drop last week?" and the agent pulls the funnel, compare it against the previous period, check for new JavaScript errors and look at rage clicks on the affected step — without you opening a single dashboard.

What you need

  • An MCP token. Create one under Account settings → MCP Access. See MCP tokens & scopes.
  • An MCP-capable client. Claude Desktop, Claude Code and most current AI IDEs qualify.
Account settings, MCP Access tab, showing the token list

Connecting Claude Desktop

Add this to claude_desktop_config.json and restart the app. The MCP Access tab generates it for you with your token already filled in, so you can copy it straight across.

{
  "mcpServers": {
    "spectry": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://api.spectry.io/mcp",
        "--header", "Authorization: Bearer mcp_live_..."
      ]
    }
  }
}

Connecting anything else

Clients that speak Streamable HTTP natively need only two things:

  • Server URL — https://api.spectry.io/mcp
  • Header — Authorization: Bearer mcp_live_…

To check a URL before wiring anything up, GET https://api.spectry.io/mcp/info answers without a credential and reports the protocol versions supported.

What the agent can do

Around 83 tools across every part of the platform:

  • Sites — the site list, settings, plan usage and the CRO scorecard, and changing what a site collects.
  • Analytics — traffic, top pages, sessions, devices, geography, live visitors, user journeys, retention and churn risk.
  • Acquisition — channels, sources, campaigns and their trend.
  • Performance — Core Web Vitals, broken down by page, device, browser or country.
  • Funnels — results, breakdowns, drop-off sessions, and comparisons across variants, properties or periods.
  • A/B tests — the test list, change documents and decision-grade Bayesian results.
  • Heatmaps — click and scroll data, the most-clicked elements, rage clicks, and creating or retargeting heatmaps.
  • Session replay — find recordings and read a session’s timeline without watching it.
  • Surveys and opt-ins — definitions, aggregate results and individual responses.
  • Insights & opportunities — detected problems and the A/B tests Spectry proposes for them.
  • Events, errors and feature flags — including defining the custom events the SDK captures.

Getting good answers

  • Name the site. If you have several, say which one — the agent has to look the id up first.
  • Be specific about the period. Dates are interpreted as UTC calendar days, the same way the dashboard reports them, so an explicit range is unambiguous.
  • Mention the segment if you care about one. Most tools accept a saved segment and will apply it.
  • Trust the purpose-built numbers. Ask for an A/B test result rather than for conversion counts — the tool returns the same Bayesian verdict the dashboard decides on, with credible intervals a raw count cannot give you.

What MCP will never do

There is no billing, checkout, subscription, payment or invoice tool, and no platform-admin, user-management or site-deletion tool. This is not a setting — no token can be issued that would reach one.

Next: MCP tokens & scopes covers creating a token, choosing what it can reach, and revoking it.

Put this to work on your own site.

Heatmaps, session replays, funnels and experiments in one platform. Set it up in minutes, no credit card needed, and 5,000 sessions a month are free forever.