New: Free plan is live 7 August 2026 · View changelog →
Antlytics logoAntlytics

Antlytics MCP server

The Antlytics MCP server lets you manage your analytics and query your data directly inside Claude, Cursor, Windsurf, Cline, Zed, and any other tool that supports the Model Context Protocol.

MCP URL: https://www.antlytics.com/mcp


Install

Claude Code

claude mcp add --transport http antlytics https://www.antlytics.com/mcp

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "antlytics": {
      "url": "https://www.antlytics.com/mcp"
    }
  }
}

Claude Desktop

  1. Open Claude Desktop → Settings → Connectors
  2. Paste the URL: https://www.antlytics.com/mcp
  3. Click Connect and authorise when prompted

Or edit claude_desktop_config.json directly:

{
  "mcpServers": {
    "antlytics": {
      "url": "https://www.antlytics.com/mcp"
    }
  }
}

Windsurf / Cline / Zed

Add the MCP URL https://www.antlytics.com/mcp in your tool's MCP settings panel. Refer to your tool's documentation for the exact steps.


Authentication

When you connect, the MCP server opens your browser for a one-time OAuth sign-in. Sign in with your Antlytics account and click Authorise. Tokens are stored by your MCP client — you won't need to sign in again.

To revoke access: Antlytics dashboard → Settings → API tokens, find the MCP token and click Revoke.


Plan requirements

MCP access is a paid-plan feature:

PlanMCP access
FreeNo MCP tool calls
Starter (incl. 14-day trial)Read and setup tools — stats, pages, referrers, UTM, countries, devices, events, funnels, period comparison, sites, goals, install snippets, diagnostics, shield listing
ProEverything in Starter plus admin tools: generate_report, pause_ingest, resume_ingest, rotate_tracking_id, add_shield_rule, toggle_shield_rule, delete_shield_rule

Calls outside your plan return a clear error message with an upgrade pointer — nothing fails silently.


Available tools

Setup and management

list_sites

List all analytics sites owned by the authenticated user.

Inputs: none required

Output: [{ id, name, url, tracking_id, created_at }]

Example: "List all my Antlytics sites."


create_site

Create a new analytics site.

Inputs: name (required), url (required — must be a valid URL)

Output: { id, name, url, tracking_id }

Example: "Create an Antlytics site for https://myapp.com."


get_install_snippet

Return the tracking snippet and install instructions for a site and framework.

Inputs: site_id (required), framework (optional — nextjs | nuxt | sveltekit | astro | html, defaults to html)

Output: { tracking_id, framework, snippet, instructions }

Example: "Get the Next.js install snippet for my site."


Goals

create_goal

Create a conversion goal that tracks visits to a specific path.

Inputs: site_id (required), name (required), path_pattern (required — must start with /)

Output: { id, name, path_pattern, created_at }

Example: "Create a goal called 'Checkout complete' that tracks visits to /thank-you on my site."


list_goals

List all conversion goals for a site, each with its conversion count over the last 30 days.

Inputs: site_id (required)

Output: [{ id, name, path_pattern, created_at, conversions_last_30d }]

Example: "Show me all goals and their conversion counts for myapp.com."


delete_goal

Delete a conversion goal by id.

Inputs: goal_id (required)

Output: { deleted, goal_id, name }

Example: "Delete the Checkout complete goal."


Funnels and custom events

list_funnels

List conversion funnels for a site.

Inputs: site_id (required)

Output: [{ id, site_id, name, steps, created_at }]

Example: "List the funnels on my site."


create_funnel

Create a funnel with 2–8 ordered steps. Each step is { type: "path" | "event", value }. Path values must start with /.

Inputs: site_id (required), name (required), steps (required)

Output: { id, site_id, name, steps, created_at }

Example: "Create a signup funnel from /pricing to /thank-you."


get_funnel_results

Compute ordered step progression for a funnel. Defaults to the last 7 days.

Inputs: funnel_id (required), from, to (optional ISO 8601)

Output: { id, name, site_id, period, result }

Example: "How is my signup funnel converting this week?"


get_events

Custom event counts grouped by event name. Defaults to the last 7 days.

Inputs: site_id (required), from, to, limit (default 50, max 100)

Output: { period, events: [{ name, events, sessions }] }

Example: "Which custom events fired most last week?"


Diagnostics

check_install

Check whether a site is correctly receiving pageviews. Returns status, event counts, and suggestions if there is a problem.

Inputs: site_id (required)

Output:

{
  "site_name": "...",
  "tracking_id": "...",
  "status": "receiving_data" | "no_recent_data" | "never_received",
  "last_event_at": "ISO" | null,
  "events_last_hour": 0,
  "events_last_24h": 0,
  "unique_paths_24h": 0,
  "suggestions": ["..."]
}

Example: "Check whether my site is correctly tracking pageviews."


Analytics

get_stats

Summary statistics for a site.

Inputs: site_id (required), from, to (optional ISO 8601; default: last 7 days)

Output: { unique_visitors, visitors, pageviews, bounce_rate, sessions, avg_visit_ms?, period: { from, to } }

visitors and sessions are visits (session count). unique_visitors is the daily salted hash count shown on Overview.

Example: "What were my stats for the last 30 days?"


get_top_pages

Top pages by pageviews.

Inputs: site_id (required), from, to, limit (default 10, max 100)

Output: [{ path, pageviews, visitors }]

Example: "What were my top 5 pages last week?"


get_top_referrers

Top referrers by visit count.

Inputs: site_id (required), from, to, limit (default 10, max 100)

Output: [{ referrer, visits }]

Example: "Which referrers sent the most visitors this month?"


get_utm_breakdown

Visitors and pageviews grouped by UTM source, medium, and campaign.

Inputs: site_id (required), from, to, limit (default 20, max 100)

Output: [{ utm_source, utm_medium, utm_campaign, visitors, pageviews }]

Example: "Break down my traffic by UTM campaign for the last 14 days."


get_countries

Visitors and pageviews grouped by country.

Inputs: site_id (required), from, to, limit (default 20, max 100)

Output: [{ country, visitors, pageviews }]

Example: "Which countries are my visitors coming from?"


get_devices

Visitors and pageviews grouped by device type.

Inputs: site_id (required), from, to, limit (default 20, max 100)

Output: [{ device, visitors, pageviews }]

Example: "What percentage of my traffic is mobile?"


compare_periods

Compare KPIs between two date ranges and return percentage changes.

Inputs: site_id (required), current_from, current_to, previous_from, previous_to (all ISO 8601)

Output:

{
  "current": { "unique_visitors": N, "visitors": N, "pageviews": N, "bounce_rate": N, "sessions": N },
  "previous": { "unique_visitors": N, "visitors": N, "pageviews": N, "bounce_rate": N, "sessions": N },
  "changes": {
    "unique_visitors_pct": 8.0,
    "visitors_pct": 12.5,
    "pageviews_pct": -3.2,
    "bounce_rate_delta": -2,
    "sessions_pct": 10.0
  }
}

visitors / sessions are visits; unique_visitors is the daily hash count.

Example: "Compare this week's traffic to last week."


Reporting

generate_report (Pro)

Generate a comprehensive analytics report covering KPIs, top pages, referrers, UTM sources, countries, and devices. The previous period is automatically computed as the same duration immediately before from.

This is the same report builder as Overview → Report in the dashboard (LLM-readable markdown). Use the UI when you want one-click copy/download; use this tool when your agent should produce the report in-chat. See Site reports.

Inputs: site_id (required), from, to (optional, default last 7 days), format (optional — markdown | csv | json, default markdown)

Output (markdown): A formatted report you can paste into Slack, Notion, email, or save as a file.

Output (csv): One section per data type, concatenated with section headers.

Output (json): Raw data object combining all metrics.

Example: "Generate a markdown report for myapp.com for the last 30 days and paste it here."


Ingest and shields

list_shield_rules

List traffic shield rules for a site (hostname, IP, country, path, referrer filters).

Inputs: site_id (required)

Output: { site_id, site_name, rules, total }

Example: "Show the shield rules on my site."


add_shield_rule (Pro)

Add a shield rule. Soft cap: 30 rules per site.

Inputs: site_id (required), rule_type (required), value (required)

Rule types: hostname_allow, ip_deny, ip_allow, country_deny, country_allow, path_deny, path_allow, referrer_deny

Example: "Block referrer spam from spam.com on my site."


toggle_shield_rule (Pro)

Enable or disable a shield rule.

Inputs: rule_id (required)

Example: "Disable the IP deny rule I just added."


delete_shield_rule (Pro)

Permanently delete a shield rule.

Inputs: rule_id (required)

Example: "Delete shield rule rule-id."


pause_ingest (Pro)

Pause pageview ingest for a site (tracking ID stays the same).

Inputs: site_id (required)

Example: "Pause ingest on my staging site."


resume_ingest (Pro)

Resume ingest after a pause.

Inputs: site_id (required)

Example: "Resume ingest on my staging site."


rotate_tracking_id (Pro)

Rotate the site tracking ID. Update your snippet after rotating.

Inputs: site_id (required)

Example: "Rotate the tracking ID for myapp.com."


Example prompts

Once connected, try these in Claude, Cursor, or Windsurf:

Setup:

  • "Create an Antlytics site for https://myapp.com and give me the Next.js install snippet."
  • "Check whether my site is receiving pageviews."
  • "Create a goal called 'Signed up' that tracks visits to /welcome."

Analytics:

  • "What were my top 5 pages on myapp.com last week?"
  • "Break down my traffic by UTM campaign for the last 14 days."
  • "Compare this week's stats to last week."
  • "Which countries are my top 5 sources of traffic?"

Reports:

  • "Generate a weekly analytics report for myapp.com in markdown."
  • "Give me a JSON report for the last 30 days so I can process it."

With Search Console (separate MCP):

  • "From Search Console, top queries and landing pages last 28 days; from Antlytics, pageviews, bounce, and goals for those paths."

See Google Search Console and Antlytics for what each product owns and how to combine MCPs without treating Google impressions as Antlytics visitors.


Rate limits

120 requests per minute per access token. Exceeded requests return 429 Too Many Requests.


Privacy

The MCP server has access to your analytics data — the same data shown in the Antlytics dashboard. Write tools (create site, create goal) only modify your own account's data. No raw user data (IP addresses, user agents) is exposed. See our privacy policy for details.

Something missing? Get in touch and we will update these docs.