Google Analytics MCP: how to set it up, and what it reads
Google's own MCP server lets Claude, Gemini and other AI tools read your GA4 reports. How to set it up step by step, what it can and can't read, and how to ask about your site with no Google Cloud project.

Leon Missoul6 min read · Published 1 Dec 2026
In short
- The Google Analytics MCP server is Google's open-source connector between GA4 and AI tools such as Claude and Gemini. It runs on your own computer and, set up as Google describes, it only reads.
- Setting it up takes five steps: install pipx, switch on the Analytics Admin and Data APIs in a Google Cloud project, sign in with gcloud using the read-only scope, set a quota project, and add the server to your AI tool.
- It reads GA4's reports: standard, realtime, funnel and conversions reports, plus your property's settings. It has no tool for path explorations, saved explorations or one visitor's visits.
- Orbit's MCP needs no Google Cloud project. Paste one address into Claude or ChatGPT, sign in, and ask about visits, funnels, paths and every person's visits. It comes with Launchpad, free on every site.
What is the Google Analytics MCP server?
MCP, the Model Context Protocol, is the open standard AI tools use to connect to other apps. The Google Analytics MCP server is Google's connector for GA4. Once it's added, an AI tool such as Claude or Gemini reads your Analytics data when you ask, instead of you pasting numbers into the chat.
Google publishes the code in the googleanalytics organisation on GitHub and documents the setup in its Analytics developer guide. In the setup Google's guide describes, the server runs on your own computer. Your AI tool starts it, and it uses your Google account's access, so it sees only the properties you can see.
Google's guide sets it up to read only. It can't create, change or delete anything in your property. The GitHub version can also create annotations, custom dimensions and key events, but only when you start it with --allow-write and sign in with the edit scope.
What you need before you start
- Python 3.10 or newer, and pipx to run the server. Google's guide also works with uv.
- A Google Cloud project where you can switch on APIs.
- The Google Cloud CLI, gcloud, to sign in from a terminal.
- The Viewer role or higher on the GA4 property you want to read.
How to set up the Google Analytics MCP server
These are the steps from Google's developer guide, read on 1 December 2026. Replace YOUR_PROJECT_ID with your Google Cloud project's ID. Google writes some commands over several lines; here each one is a single line, so it pastes into any terminal.
Step 1: install pipx
Follow the pipx installation guide for your system. pipx runs the server in its own space, so it doesn't touch your other Python tools.
Step 2: switch on the two Analytics APIs
Your project needs the Google Analytics Admin API, which lists your accounts and properties, and the Google Analytics Data API, which runs the reports.
Step 3: sign in with read-only access
This saves Application Default Credentials that the server uses to read Analytics as you.
If you sign in with an OAuth client file of your own, add --client-id-file=YOUR_CLIENT_JSON_FILE to the command. When it finishes, copy the path printed after "Credentials saved to file". That path is PATH_TO_CREDENTIALS_JSON in the next steps.
Step 4: set the quota project
With your own Google account, the API calls need a project to count against.
Step 5: add the server to your AI tool
Pick your tool below. Use absolute paths for the credentials file.
Use the Google Analytics MCP with Claude Desktop
Open claude_desktop_config.json. On a Mac it's in ~/Library/Application Support/Claude/, on Windows in %APPDATA%\Claude\. Add the server:
Restart Claude so it loads the server. If Claude can't find pipx, put pipx's full path in "command". Google suggests which pipx to find it.
Use it with Claude Code
Run this once in a terminal:
Use it with Gemini or Cursor
Google's developer guide now calls Gemini CLI deprecated and gives the setup for Antigravity: the same "analytics-mcp" block goes in ~/.gemini/config/mcp_config.json, or in .agents/mcp_config.json inside a project. The GitHub README still shows Gemini CLI, where the block goes in ~/.gemini/settings.json.
In Cursor, Google's guide runs the server with uvx instead. In .cursor/mcp.json the command is uvx and the arguments are --from analytics-mcp google-analytics-mcp.
Then ask a first question to check it works. Google's own examples include "How many users did I have yesterday?" and "What custom dimensions and custom metrics are configured in my property?"
What the GA4 MCP server can read
| Tool | What your AI tool gets |
|---|---|
| get_account_summaries | Your Analytics accounts and properties |
| get_property_details | One property's details |
| list_google_ads_links | The Google Ads accounts linked to a property |
| list_property_annotations | The notes on a property's charts |
| get_custom_dimensions_and_metrics | The custom dimensions and metrics you set up |
| run_report | A standard report: any dimensions and metrics over any dates |
| run_realtime_report | What is happening on the site right now |
| run_funnel_report | A funnel report |
| run_conversions_report | Ad costs, conversions, return on ad spend and attribution |
That covers most questions you'd answer in GA4's standard reports: users, sessions, pages, sources, events and key events, broken down any way the reports allow. The GitHub version also lists your key events with list_key_events.
What it can't read
- Path explorations and saved explorations. There is no tool for them, so the routes people take through your site stay in GA4's Explore screen.
- One visitor's visits. The reports return totals and averages. GA4's user explorer, where you follow one person's sessions, has no tool.
- Funnels further back than your retention setting. A standard property keeps user-level and event-level data for 2 or 14 months, and that setting limits funnel reports and explorations.
- Endless questions. Every report spends Data API quota. A standard property gets 200,000 core tokens a day and 40,000 an hour, and a long chat with many large reports can run into it.
Common setup errors
Google lists the usual ones:
- A 403 error means the APIs aren't switched on in your project, or your account doesn't have the Viewer role on the property.
- A 403 that mentions insufficient scopes means you signed in without both scopes. Run the sign-in command from step 3 again.
- The tool can't find pipx. Give pipx's full path in the config instead of the bare name.
Other analytics tools with an MCP server
Google isn't alone. Plausible launched an official MCP server on 30 November 2026, on every plan, read-only and without funnels; Plausible has no free plan. Simple Analytics has one on every plan, its free plan included. Matomo, PostHog, Mixpanel and Microsoft Clarity have official servers too, and Umami's starts on its paid Pro plan. What differs is what each one reads and what it takes to get there. The best web analytics tools puts them side by side.
Your site's analytics in Claude or ChatGPT, with no Google Cloud project
Orbit is free website analytics with an MCP server built in. You add Orbit's one-line script to your site. Then you paste https://mcp.goorbit.io into Claude, ChatGPT, Cursor, VS Code or Claude Code as a connector, sign in and click Allow. There's no Cloud project, no API key and nothing running on your computer. See how for Claude and ChatGPT.
Your AI tool can then read every number on every Analytics tab:
- Visits, people, leads and time engaged, by way in, page, campaign, AI assistant, country or device, over any dates.
- Funnels: the ones Orbit suggests from the routes people really took to a lead, and the ones you build. People on the site's team can also have their AI tool create and change funnels from the chat.
- Paths: the routes people take from the way they came in to the lead.
- Every person's visits, one by one, from the first visit to the lead.
- People counted apart from AI agents and bots, with each AI assistant named as a way in.
| Google Analytics MCP | Orbit's MCP | |
|---|---|---|
| Setup | Google Cloud project, two APIs, gcloud sign-in, pipx | Paste one address and sign in |
| Where it runs | On your computer | Hosted by Orbit |
| Reports and trends | Yes | Yes |
| Funnels | Funnel reports | Suggested and your own, and it can build them |
| Paths | No tool | Yes |
| One visitor's visits | No tool | Yes |
| Bots and AI agents | Known bots removed | Counted apart, in their own lanes |
| Cost | Free | Free on Launchpad |
Orbit starts counting the day its script goes on your site, and it can run beside GA4 while you compare. Its MCP comes with Launchpad, which is free on every site, with no card, no time limit and no traffic limit. More on your analytics in your AI tool, or see Orbit vs Google Analytics and the Google Analytics alternatives.
Start free, add the line to your site, and ask Claude about it as soon as the first visits come in.
Written by

Leon Missoul, Founder
I started the web agency Luniq in 2025 and built Orbit from the software we used to keep our clients’ sites growing after launch. I write about search, AI answers and how to prove what website work earns.


