Google Analytics MCP Server: How to Connect GA4 to Claude (2026)
How to set up Google's official Google Analytics MCP server so Claude, Claude Code or Cursor can read your GA4 data, what it can and cannot do, and a hosted option with no Python or Cloud project.

The short answer: Google ships an official Google Analytics MCP server. It lets an AI agent such as Claude Desktop, Claude Code or Cursor read your GA4 reports. It is read-only, and it runs on your own computer: you need Python 3.10 or newer,
pipxoruv, a Google Cloud project with the Analytics Admin and Data APIs turned on, and at least Viewer access to the GA4 property. Google's page does not mention a hosted version (developers.google.com/analytics/devguides/MCP, read 3 November 2026). If you want an agent to read your site data without that setup, a hosted analytics MCP server such as Humblytics (mcp.humblytics.com/v1) connects with one URL, and your agent can also install the tracking for you.
"google analytics mcp" is searched about 720 times a month in the US (Google Keyword Planner, November 2026), more than any other analytics MCP query we checked. Most people searching it want one thing: to ask Claude or ChatGPT about their traffic instead of digging through GA4 reports.
What the Google Analytics MCP server does
MCP (Model Context Protocol) is a standard way for an AI agent to call tools. Google's server gives the agent a set of read-only GA4 tools, taken from the Admin API and the Data API. On 3 November 2026, Google's page listed these:
| Tool | What it does |
|---|---|
get_account_summaries |
Lists your GA accounts and properties |
get_property_details |
Details about one property |
list_google_ads_links |
Google Ads accounts linked to a property |
list_property_annotations |
Notes on the property timeline |
get_custom_dimensions_and_metrics |
Your custom dimensions and metrics |
run_report |
A standard GA4 report |
run_realtime_report |
A realtime report |
run_funnel_report |
A funnel report |
run_conversions_report |
A conversions report |
It cannot change your GA settings. It cannot create audiences, edit events or touch your website.
How to set it up
These steps follow Google's own guide. Check it before you start, because the details change.
- Install the tools. You need Python 3.10 or newer and either
pipxoruv. - Make a Google Cloud project and turn on two APIs: the Google Analytics Admin API (
analyticsadmin.googleapis.com) and the Google Analytics Data API (analyticsdata.googleapis.com). - Give yourself access. Your Google account, or a service account, needs at least the Viewer role on the GA4 property.
- Sign in with Application Default Credentials. Run
gcloud auth application-default loginwith the read-only Analytics scope, or pointGOOGLE_APPLICATION_CREDENTIALSat a service account key. - Add the server to your agent. The package is
analytics-mcpon PyPI. In your MCP client's config, run it withpipx run analytics-mcp, or withuvx --from analytics-mcp google-analytics-mcp. - Restart your agent and ask it something like "How many users came from organic search last week?"
Google's page names Claude Desktop, Claude Code, Cursor and Google's Antigravity tools as clients.
What it is good for, and where it stops
Good for:
- Asking plain questions about traffic, sources and conversions you already track in GA4
- Pulling a report into a chat without opening GA4
- Free: the server and GA4 cost nothing
Where it stops:
- It runs on your machine. Claude or ChatGPT in the browser cannot reach a server on your laptop, so you need a desktop or terminal agent.
- Setup is a developer job. A Cloud project, two APIs, credentials and a config file is a lot for a marketer.
- It only reads what GA4 has. It does not know your Stripe revenue or your Meta ad spend unless that data is already in GA4.
- It cannot act. No A/B tests, no heatmaps, no funnel changes. It answers questions about reports.
A hosted option: let the agent set it all up
If you would rather not run a server, Humblytics is website analytics built for an agent to use. It is an agent-native analytics tool: the agent does the setup, not you.
- Paste this into Claude Code, Codex or Cursor: "Read https://app.humblytics.com/agent.md and sign me up for Humblytics as [email protected]."
- Open the one confirm link it sends.
- The agent adds your site and installs the script, asking before it publishes.
Then the agent reads visits, funnels, click and scroll heatmaps, Meta and Google Ads spend and Stripe revenue over the hosted MCP server at mcp.humblytics.com/v1. It can also set up an A/B test, after you confirm the change, the page and the goal. In the Claude and ChatGPT chat apps you connect it with the Humblytics connector instead.
The first 25,000 data points and 1 site are free, with no card. After that the Agents plan is $39 once for 100,000 data points.
What Humblytics does not do: it does not read your GA4 data, it has no session replay, and revenue comes from Stripe or Foxy only. Many sites run both: GA4 for the reports they already know, and Humblytics for questions about which pages and ads make money.
Google Analytics MCP vs a hosted analytics MCP
| Google Analytics MCP | Humblytics MCP | |
|---|---|---|
| Who makes it | Google (official) | Humblytics |
| Where it runs | Your computer (Python) | Hosted, one URL |
| Setup | Cloud project, two APIs, credentials, config | Agent signs you up from agent.md |
| Works in Claude and ChatGPT chat apps | No, local only | Yes, through the connector |
| Reads | GA4 reports | Visits, funnels, heatmaps, ad spend, Stripe revenue |
| Can change things | No | A/B tests and funnels, with your approval |
| Price | Free | First 25,000 data points free, then $39 once |
FAQ
Is there an official Google Analytics MCP server?
Yes. Google publishes it on GitHub as googleanalytics/google-analytics-mcp and on PyPI as analytics-mcp, with a setup guide at developers.google.com/analytics/devguides/MCP.
Can ChatGPT use the Google Analytics MCP server?
Not directly. The server runs on your own computer, and the ChatGPT and Claude web apps connect to hosted servers, not local ones. Use a desktop or terminal agent, or a hosted MCP server.
Can the Google Analytics MCP server change my GA4 settings?
No. It uses the read-only Analytics scope and only runs reports.
Is the Google Analytics MCP server free?
Yes. The server and GA4 are free. You may pay for the AI agent you use with it.
What is agent-native analytics?
Analytics built so an AI agent can set it up, read it and suggest changes, instead of a dashboard with an AI chat added later. See agent-native analytics.