| Question | Answer |
|---|---|
| What is it? | Google's own MCP server for GA4, labelled "experimental" |
| Who makes it? | Google Analytics, open source at googleanalytics/google-analytics-mcp |
| Where does it run? | On your computer, started by pipx. Google doesn't host a URL for it |
| Works in | Claude Code, Claude Desktop, Cursor, Gemini CLI. Not Claude on the web |
| Read or write? | Read only. It "can't edit your Google Analytics configuration or settings" |
| Limits | The GA4 Data API quota: 200,000 tokens a day per standard property |
| What it can't see | What a visitor did between landing and leaving, and Shopify's own order records |
What the GA4 MCP server does
It lets Claude run GA4 reports for you. You ask in plain words, and Claude picks the dimensions and metrics and calls the GA4 Data and Admin APIs. Google says it's "available for read requests only" (Google for Developers), and the login it asks for uses the analytics.readonly scope.
It has seven tools (GitHub):
| Tool | What it does |
|---|---|
get_account_summaries | Lists your GA accounts and properties |
get_property_details | Details of one property |
list_google_ads_links | The Google Ads accounts linked to a property |
run_report | Any standard report: users, sessions, revenue, by page, source, device, country |
run_funnel_report | A step-by-step funnel, for example product view to purchase |
get_custom_dimensions_and_metrics | The custom fields set up on a property |
run_realtime_report | What's happening on the site right now |
The package is analytics-mcp on PyPI, version 0.7.0 since 29 July 2026 (PyPI). The first version reached PyPI in August 2025, and Google still calls it experimental, so expect changes.
Before you start
- GA4 access. The Google account you log in with has to see the property. On Shopify, GA4 is usually connected through the Google & YouTube sales channel (Shopify Help).
- A Google Cloud project with the Google Analytics Admin API and the Google Analytics Data API turned on. Any project works. It's the project your API calls run under.
- Python 3.10 or newer and pipx. The server is a Python package that pipx downloads and starts.
- The gcloud CLI and an OAuth client file. Create a desktop OAuth client in your Cloud project and download its JSON. gcloud uses it to sign you in.
You don't need an API key or a GA4 360 plan.
Set it up in Claude Code
Google's README gives a Claude Code command, so this is the shortest route.
In the Cloud console, enable the Google Analytics Admin API and the Google Analytics Data API for your project.
Install pipx if you don't have it.
Sign in with the account that can see your GA4 property:
gcloud auth application-default login \ --scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \ --client-id-file=YOUR_CLIENT_JSON_FILECopy the credentials file path that gcloud prints when it's done.
Add the server, with your path and project ID:
claude mcp add analytics-mcp --scope user \ -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" \ -e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" \ -- pipx run analytics-mcpStart Claude Code, run
/mcp, and checkanalytics-mcpis connected.Ask "what can the analytics-mcp server do?" Then ask for details on your property by name.
The commands are from the README. --scope user makes the server work in every project (Claude Code docs).
Claude Desktop
Google's README has no Claude Desktop example, but Desktop loads local servers the same way. Open Settings, then Developer, then Edit Config, and add this to claude_desktop_config.json (MCP docs):
{
"mcpServers": {
"analytics-mcp": {
"command": "pipx",
"args": ["run", "analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON",
"GOOGLE_PROJECT_ID": "YOUR_PROJECT_ID"
}
}
}
}
The command, args and env are the ones Google gives for Gemini CLI. Quit Claude Desktop fully and reopen it.
Cursor
Paste the same block into ~/.cursor/mcp.json. Cursor reads command, args and env in that format (Cursor docs).
What to ask once it's connected
Start a store's first chat with the questions GA4 handles well:
- "Run a funnel for the last 30 days, from product view to add to cart to checkout to purchase, split by mobile and desktop."
- "Which landing pages had the lowest engagement rate from paid social last week?"
- "Compare purchases and revenue by source and medium for the last 28 days against the 28 before."
- "How many people are on the site right now, and on which pages?"
- "Which Google Ads accounts are linked to this property?"
The funnel shows which step loses the most people, by device, in one answer.
What GA4 can't tell you about why buyers leave
GA4 is built to count, and the MCP inherits its blind spots. Four matter for a store.
"Engaged" is a low bar. A session counts as engaged if it lasts longer than 10 seconds, has a key event, or views 2 or more pages (GA4 Help). A visitor who sits on your product page for 12 seconds without touching it is engaged.
Scroll is all or nothing. The built-in scroll event fires only when someone reaches 90% of the page (GA4 Help). Someone who scrolled halfway to your size picker and left looks the same as someone who never moved.
You get tables, not visits. The Data API returns reports made of dimensions and metrics (Google for Developers). Raw events per visitor live in the BigQuery export, which caps standard properties at 1 million events a day (GA4 Help). Low-traffic rows can also be hidden by data thresholds (GA4 Help), and with consent mode, part of your users can be modeled rather than observed (GA4 Help).
Purchases are a browser event. GA4 counts a purchase when its tag fires. Shopify records the order on its own servers. Ruler Analytics, an attribution vendor, names ad blockers and cookie settings as the most common causes of the gap (Ruler).
Here's why the scroll point matters, from our own site. In October 2026 we paid Meta for 460 landing page views on anry.io. Anry saw that roughly 98% of those visitors left the page untouched, with no scroll and no tap, and that nearly all of them arrived from Reels and Stories on Instagram. GA4's default scroll event can't separate a visit that never moved from one that scrolled 80%. We paused the campaign the same day.
Here's how GA4's tools line up with Anry's (tool names from the Anry MCP docs):
| You want to know | GA4 MCP | Anry MCP |
|---|---|---|
| Which properties or stores can I see? | get_account_summaries | list_sites, get_site_status |
| How does traffic and the funnel look? | run_report, run_funnel_report | get_analytics_overview, get_top_pages, get_traffic_sources |
| What happened in one visit? | No tool | list_sessions, get_session |
| How far did people scroll, and what did they click? | 90% scroll event only | get_heatmap_summary |
| Which ads cost money without orders? | Google Ads only, if linked | get_campaign_spend, get_paid_waste_summary |
| Where is revenue leaking, and how much? | No tool | list_opportunities, get_revenue_leaks, get_issue |
| What did we find last week? | No tool | list_reports, get_report, list_questions |
| What's happening right now? | run_realtime_report | No tool |
GA4 wins on realtime and on the sheer range of reports. Anry wins on the single visit and the price of a leak.
GA4 MCP vs Anry vs a BigQuery export
| GA4 MCP | Anry MCP | GA4 BigQuery export | |
|---|---|---|---|
| Traffic, sources, funnels | Yes | Yes | Yes, if you write SQL |
| One visit, step by step | No | Yes | Raw events, you rebuild it |
| Ad spend joined to store orders | No | Yes, Meta and Google | No |
| A $ figure per leak | No | Yes | No |
| Runs where | Your computer | Remote, OAuth sign-in | Google Cloud |
| Cost | Open source, Data API quotas | Monthly plan, priced by traffic | BigQuery charges past the sandbox limits |
Prices checked October 2026.
For questions about traffic, sources and funnel steps, the GA4 server does the job, and all it asks for is a Cloud project. For what GA4 leaves out, here's how the other ecommerce analytics tools split the work.
Is it safe?
The login asks only for the analytics.readonly scope plus cloud-platform, and Google says the server can't edit your GA4 configuration or settings. It runs on your machine. Your report data does go to the model you connect, so treat it like any GA4 export.
To disconnect, gcloud auth application-default revoke cancels the gcloud login and removes the credentials file from your machine (gcloud reference). For how MCP servers work in general, local versus remote, see what is an MCP server.
Common errors and the fix
| Symptom | Likely cause | Fix |
|---|---|---|
| 403 about insufficient authentication scopes | The gcloud login didn't include both scopes | Rerun the login command with analytics.readonly and cloud-platform |
| Error saying the Analytics Data API is disabled | The API isn't enabled in the project you set as GOOGLE_PROJECT_ID | Enable both Analytics APIs in that project |
| No properties come back | You signed in with a Google account that can't see GA4 | Log in again with the account that has access |
analytics-mcp doesn't appear in Claude Desktop | The config didn't load: a typo, a relative path, or Claude still running | Validate the JSON, use absolute paths, quit and reopen, then read mcp-server-analytics-mcp.log in ~/Library/Logs/Claude |
| Tool calls hang on Windows | An old bug with gcloud's default credentials path | Update to 0.6.0 or later, or copy the credentials file elsewhere and point to the copy (issue #156) |
Also watch the quota. A standard property gets 200,000 Data API tokens a day and 40,000 an hour, with 10 requests at once (Google for Developers). A long chat with many reports eats into the hourly figure.
Where Anry fits
GA4 counts the people who left. Anry shows where they left, why, and what it cost you. It ties each Meta or Google ad click to its session and to any order, spots the leak (a page, a device, or an ad bringing the wrong crowd) and values it from your store's own sales. None of its tools can change anything, and "Ask Anry" passes the fix to your agent.
If your question is "how many" rather than "why", GA4's server is all you need. When people leave and you can't see why, our traffic but no sales guide has the order to check things in.
Frequently asked questions
Is there an official Google Analytics MCP server?
Yes. Google Analytics publishes it on GitHub as googleanalytics/google-analytics-mcp. It's open source, read-only, and still labelled experimental.
Can Claude change my GA4 settings through it?
No. Google says the server is for read requests only and can't edit your configuration or settings. The login scope is read-only.
Does the GA4 MCP work in Claude on the web?
No. claude.ai only connects to remote servers (Claude Help), and Google's README only describes running it locally. Use Claude Desktop, Claude Code or Cursor.
Why doesn't GA4 revenue match Shopify?
GA4 counts a purchase when its tag fires in the browser, which blockers and consent choices can stop. Shopify records every order on its servers. Trust Shopify for the order count.
Sources
- Google Analytics MCP server, GitHub, and README
- Try the Google Analytics MCP server, Google for Developers
- analytics-mcp on PyPI
- Data API basics and quotas, Google for Developers
- GA4 Help: engaged sessions, enhanced measurement, data thresholds, consent mode modeling, BigQuery export
- GA4 on Shopify, Shopify Help
- GA4 orders not matching Shopify, Shopify Community
- gcloud auth application-default revoke, Google Cloud
- Client docs: Claude Code, Claude Desktop local servers, Claude custom connectors, Cursor
- Anry MCP server docs
See which ad clicks leave your store before they buy.
14-day free trial, no card. Works in Claude, Claude Code and Cursor.