Analytics MCP: how to ask Claude (or Cursor) about your traffic

Connect your analytics to Claude, ChatGPT or Cursor over MCP. Compare Google Analytics, Adobe and cookieless MCP servers, set it up and keep access safe.

Wholetally team Blog

Short answer

To ask Claude, ChatGPT or Cursor about your traffic, connect an analytics MCP server. MCP (Model Context Protocol) is an open standard that lets an AI client call tools: the server runs a real report, such as top pages or visits per source, and the model answers from that result instead of guessing. Google Analytics, Adobe Analytics and PostHog each publish an MCP server, and so do several cookieless tools, including Wholetally. Pick one that fits how you sign in, check which tools can write, and give the agent a read-only key scoped to the sites it needs.

What is an analytics MCP server, in plain terms?

The MCP project describes the protocol as an open-source standard for connecting AI applications to external systems. For analytics that means three parts:

  • The client: Claude (web, desktop or Claude Code), ChatGPT, Cursor, VS Code with GitHub Copilot, or any other app that speaks MCP.
  • The server: a service from your analytics vendor (or one you run yourself) that lists tools such as run_report or top_pages, each with typed inputs.
  • The data: your analytics account. The server calls the vendor’s API with your credentials and returns rows.

When you ask “which pages lost the most visitors this week?”, the model picks a tool, fills in the dates, and reads the result. The numbers come from the query, not from the model. The wording, the comparison and any conclusion still come from the model, so check anything you plan to act on.

What can you actually ask your analytics over MCP?

The useful questions are the ones you would otherwise answer by opening three reports and a spreadsheet:

  • “Compare the last 30 days with the 30 before. Which sources grew?”
  • “What were our top landing pages last week, and where did those visitors come from?”
  • “How many visits did the spring campaign bring, by UTM source?”
  • “Which AI assistants sent visitors this month, and what did they read?”
  • “Where do people drop off in the signup funnel, and did it change since last month?”
  • “Write a five-line summary of this week for the team.”

What a server can answer depends on its tools. A server with only a generic report tool can do a lot, but the model has to know your dimension and metric names. A server with focused tools (pages, sources, funnels, revenue) gets simple questions right with less prompting. Before you connect, read the tool list in the vendor’s docs.

How does the Google Analytics MCP server work?

Google publishes an MCP server for Google Analytics on GitHub and on Google for Developers. Based on those pages, checked on 25 November 2026:

  • You run it. It is a Python package (analytics-mcp, Python 3.10 or newer) that you start with pipx or uv. The repository also describes running it as a remote, multi-tenant service.
  • Google Cloud setup. You enable the Analytics Admin API and Data API in a Google Cloud project and set up Application Default Credentials (your Google account or a service account) with the analytics.readonly scope. The account needs at least Viewer access on the GA4 property.
  • Tools. Account and property details, Google Ads links, annotations, key events, run_report, run_funnel_report, a conversions report and a realtime report.
  • Read-only by default. Google’s developer page describes the server as read-only. The GitHub README now also lists opt-in write tools (annotations, custom dimensions, key events) that need an --allow-write flag and the analytics.edit scope.

The README’s example client is Gemini CLI. Other clients that start local MCP servers, such as Claude Code or Cursor, can run the same command with the same credentials. For a marketer without a Google Cloud project, the setup is the hard part: plan an hour, or ask a developer.

What about Adobe Analytics and PostHog?

Adobe Analytics hosts its MCP servers, one for Adobe Analytics and one for Customer Journey Analytics. You add the URL in Claude’s connectors or in ChatGPT’s apps settings (Adobe notes that ChatGPT needs a Plus or Pro subscription). Access runs through Adobe Admin Console: “MCP Read-only Access” lets you run reports, “MCP Full Access” also creates and updates segments, calculated metrics and projects. Adobe’s docs say product administrators get full MCP access automatically, so check who connects.

PostHog offers a hosted MCP server that Claude Code, Cursor and other clients can use across its products, including actions that change things in your project. That is powerful for product teams; for a read-only reporting use, look at which tools and scopes your key allows. We compared PostHog in more detail in our PostHog alternative guide.

How do you connect an analytics MCP server to Claude, ChatGPT or Cursor?

There are two common routes, and the server decides which one you use.

  1. Remote server with OAuth sign-in (Claude, ChatGPT). You paste the server URL as a custom connector, sign in to the analytics tool, and approve what the app can read. Claude’s help centre lists custom connectors on Free (one connector), Pro, Max, Team and Enterprise plans; on Team and Enterprise an owner adds the connector first. The MCP authorization spec builds this sign-in on OAuth 2.1.
  2. Token in a config file (Cursor, Claude Code, VS Code). You create an API token in the analytics tool and add the server to ~/.cursor/mcp.json, a project .mcp.json, or with claude mcp add in a terminal. Keep the token in an environment variable, not in a file you commit.

On Wholetally, both routes work. Claude and ChatGPT connect by URL with OAuth, where you choose read access and all sites or one site. Cursor, Claude Code and VS Code use a read-only wt_… token. The MCP page has copy-ready snippets and an Add to Cursor link, and the quickstart walks through it step by step.

Is it safe to give an AI agent access to your analytics?

It can be, if you treat the connection like any other API key. Five checks:

  1. Read-only first. The MCP tools spec says there should always be a human in the loop who can deny tool calls. Start with a key that cannot write, so a wrong tool call cannot change your setup.
  2. Scope per site or property. An agent working on one client site does not need the other twenty.
  3. Know what leaves the server. Whatever a tool returns goes to the model provider. Aggregated counts are low risk; raw event exports with user IDs are not.
  4. Revoke easily. Check that you can revoke a token or an approved app in one place, and that it stops at once.
  5. Watch admin roles. In some tools, admins get write access over MCP automatically. Connect with a normal user where you can.

Why does a cookieless analytics tool make MCP simpler?

Because there is less to leak. Wholetally sets no cookies and stores no IP addresses or visitor IDs, so its tools can only return counts: visitors, pageviews, sources, crawler hits and revenue per source. The analytics database sits in Cloudflare’s EU jurisdiction. The model your agent calls runs outside that, which is true for every analytics MCP server.

The Wholetally MCP server has eleven tools. Ten read, one writes, and none delete:

  • get_stats, compare_periods, top_pages and sources for everyday traffic questions, with UTM campaigns and AI assistants as sources.
  • ai_traffic for AI crawlers per page and visitors referred by AI assistants, the same data as the AI report.
  • revenue_by_source for net Stripe revenue per source (see revenue), and get_funnel for a saved funnel.
  • list_sites, sites_overview and weekly_report for agencies and teams with several sites, plus add_site as the single write tool.

Cookieless analytics often means no consent banner is needed for analytics, but that depends on your country and setup; check with your legal advisor.

Which analytics MCP server should you choose?

  • You live in GA4 and have a developer: Google’s server is free to run and covers GA4 reports, funnels and conversions.
  • You are on Adobe: use Adobe’s hosted servers and set read-only access in Admin Console.
  • You are a product team on PostHog: its server reaches across the whole suite.
  • You want a URL-and-sign-in setup with AI crawlers and revenue in the answers: a hosted cookieless tool with focused tools, such as Wholetally, saves the Cloud project and the credential files.

Whichever you pick, test it with five questions you already know the answers to. If the agent gets those right, trust it with the sixth.

What to do next

Write down the three analytics questions you ask most often, then try them over MCP. To do that on Wholetally, start a 30-day trial on Growth or Business (no card needed), add your site, and connect Claude or Cursor from the MCP page. Compare plans on Pricing.

Wholetally is cookieless web analytics with an AI report, edge collection, revenue per source and an MCP server. Built in the Netherlands. Google, Adobe, PostHog, Anthropic and Cursor details come from their own pages, checked on 25 November 2026, and may change. Trademarks belong to their owners; we are not affiliated.

FAQ

What is an analytics MCP server?
It is a small service that exposes your analytics as tools an AI client can call, using the Model Context Protocol (MCP). Claude, ChatGPT, Cursor or VS Code sends a tool call such as "top pages for the last 7 days", the server runs the real query, and the model writes its answer from the result.
Does Google publish its own Google Analytics MCP server?
Yes. Google publishes one on GitHub (googleanalytics/google-analytics-mcp) and documents it on Google for Developers. It runs with Python, uses the Analytics Admin and Data APIs, and needs Google Cloud credentials with the analytics.readonly scope. Recent versions add opt-in write tools behind an --allow-write flag.
Can I connect Google Analytics to Claude?
Yes, but you run Google’s server yourself. Its README walks through Gemini CLI; other MCP clients that start local servers, such as Claude Code or Cursor, can use the same command and credentials. A hosted server that signs in with OAuth is faster to add in the Claude apps, because you only paste a URL.
Can an AI agent change or delete my analytics data over MCP?
Only if the server offers write tools and your key or role allows them. Check the tool list before you connect. Google’s write tools are off unless you pass --allow-write, Adobe splits read-only and full access in its permissions, and Wholetally has one write tool (add a site) and none that delete.
Does an analytics MCP server send personal data to the AI model?
It sends whatever the tool returns. With a cookieless tool that stores no IP addresses or visitor IDs, results are counts per page, source or day. The model you use runs outside your analytics provider, so read its data terms as well.
Which plan do I need for the Wholetally MCP server?
The MCP server is part of Growth, Business and Agency. Growth and Business start with a 30-day trial, no card needed, so you can try it before you pay. Revenue per source, and so the revenue tool, needs Business or Agency.

Sources

Count the visitors you’ve been missing.

30-day free trial, no card needed. Create an account with your email and add your first site.

Start 30-day trial