DigiData
Guide5 min read

Google Analytics MCP: using GA4 in Claude, two routes compared

Asking Claude about GA4 data: Google's official MCP server and a connection through DigiData compared, with an example answer you can check yourself.

Auke Westra

By Auke Westra

Founder of DigiData

How to do this with DigiData:Google Analytics 4 integration

Short answer

A Google Analytics MCP lets an AI assistant such as Claude read your GA4 figures. Google offers a free MCP server of its own (analytics-mcp) that you run locally, with a Google Cloud project and a gcloud sign-in. That works in Claude Desktop and Claude Code, not in claude.ai on the web. Through DigiData you connect GA4 once and add one connector address; that works in Claude on the web, the app and Cowork, and in ChatGPT too.

What is a Google Analytics MCP?

MCP stands for Model Context Protocol: an open standard that lets an AI assistant reach other software. A Google Analytics MCP is a connection through which Claude requests your GA4 figures itself, instead of you exporting and uploading reports. You ask in plain language "which channel brought the most sessions last month?" and Claude fetches the answer. Want to know more about MCP first? Read what is MCP.

There are two routes. The facts below come from Google's and Anthropic's documentation, retrieved on 28 November 2026.

Route 1: Google's official MCP server

Google itself publishes a free, open-source MCP server: analytics-mcp on GitHub. What you need to know:

  • It runs on your own computer. You start it with Python 3.10 or newer through pipx or uv. Your MCP program, such as Claude Desktop, Claude Code or Cursor, starts it in the background.
  • You need a Google Cloud project. In it you enable the Google Analytics Admin API and the Google Analytics Data API.
  • You sign in with gcloud. The server uses Application Default Credentials with read-only access to Analytics. Your account needs at least the Viewer role on the property.
  • What it can do: among other things run reports (run_report), fetch realtime figures, build funnel and conversion reports, and list your accounts, properties and custom dimensions.
  • Reading, with one exception. Google's documentation calls the server read-only. The README also describes a few write actions, such as creating an annotation or a custom dimension, which you only switch on with an extra setting.

Because the server runs locally, it only works in programs on your own computer that start it themselves, such as Claude Desktop and Claude Code. According to Anthropic, Claude on the web, the mobile app and Cowork tasks in the cloud connect from Anthropic's cloud. They cannot reach a local server unless you host it yourself as a web service.

Good if: you are technical, work alone and want realtime or funnel reports.

Route 2: GA4 through DigiData in Claude

With DigiData's Google Analytics 4 connection you sign in once with a Google account that can read your property and choose the property. DigiData then fetches eight reports every day, including traffic acquisition, landing pages, pages, events and e-commerce items, and by default fetches the last seven days again. Recent GA4 figures can still change.

In Claude you then add DigiData's connector address as a custom connector. How that works is on connect Claude to your business data. It works in Claude on the web, the desktop app, the mobile app and Cowork, and just as well in ChatGPT.

  • No Google Cloud project or Python needed.
  • GA4 next to your other figures. The same connection also gives Claude your webshop, CRM or accounting, such as Shopify or HubSpot.
  • What it doesn't do: realtime figures and funnel reports. DigiData keeps summarised reports per day, not every single event.
  • Connecting your own AI is part of DigiData's Business and Enterprise plans (see the prices).

Good if: several colleagues ask GA4 questions, you work in Claude on the web or in Cowork, or you want to see traffic next to revenue.

Google analytics-mcpThrough DigiData
Where it runsOn your own computerOnline, you add an address
Works in claude.ai, the mobile app and Cowork in the cloudNo, only if you host it yourselfYes
You needGoogle Cloud project, gcloud, PythonA Google account with read access
Realtime and funnelsYesNo
Other sources alongsideNoYes, your other connected software
CostFreeIncluded in DigiData Business and Enterprise

Example: which channel lost traffic last week?

A question you can ask in Claude, and then check yourself:

Which channel lost the most sessions last week (Monday to Sunday) compared with the week before? Use the session default channel group.

Claude adds up the sessions per channel group in the traffic acquisition table for both weeks and puts them side by side. A made-up example of such an answer:

Channel group (made-up example)Week beforeLast weekDifference
Organic Search3,4202,980-440
Paid Search1,1501,210+60
Direct980940-40
Referral310335+25
Total5,8605,465-395

How to check it: in GA4 open Reports → Acquisition → Traffic acquisition, choose the same two weeks and the session default channel group as the dimension. The sessions should be close. Small differences are normal: GA4 counts sessions approximately and sometimes uses a sample for large reports. A bigger difference usually comes from a different dimension or different dates, or from GA4 updating a day only after DigiData's last daily update.

Three pitfalls

  1. You can't add up active users. GA4 counts a visitor who comes on Monday and Friday as one user for that week. Add up the daily figures and you count them twice. Use sessions or page views for totals. More on this in Google Analytics 4 in Power BI.
  2. A session is not a customer. The GA4 reports are summarised per day and channel and contain no customer number. So you can put traffic and revenue per day or week side by side, but you cannot say which paid invoice belongs to which visit.
  3. Watch thresholds and sampling. With small numbers Google sometimes hides rows, and for large reports it sometimes works with a sample. DigiData stores with the rows whether Google subjected the report to such thresholds and, for a sample, what share of events Google used. So ask Claude to say when a figure is less certain because of it.

Want the same for your webshop or CRM? Also read use Shopify in ChatGPT or Claude and use HubSpot in ChatGPT or Claude.

Sources

Auke Westra

About Auke Westra

Founder of DigiData

Auke Westra is Founder of DigiData. He was responsible for clients' data and reporting and in 2025 began building an in-house data platform with his team. He writes about AI on business data, data definitions, Power BI and integrations.

Ready to start?

A subscription starts with 14 days free. Connect your software and ask the AI agent questions about your own figures.

Related articles