AI & automation
Google Analytics MCP: how to ask an AI assistant about your GA4 data
Google publishes an open-source MCP server that lets an AI assistant run GA4 reports when you ask a question in plain English. It needs technical setup, and every answer should be checked against GA4 before you act on it.

The short answer
The Google Analytics MCP server is Google's open-source program for asking an AI assistant about your GA4 data in plain English, using the Analytics Admin API and Data API. In November 2026, Google's developer page describes read-only access, while its README also documents optional writing tools disabled by default. Use read-only credentials and leave writing disabled for reporting. Setup needs Python, a Google Cloud project and a compatible AI client. It suits report questions, such as traffic by channel, but cannot establish causes or recover uncollected data. With a hosted AI assistant, report results go to its provider, so check your data-sharing policy.
- Google's Analytics MCP server lets a compatible AI assistant run GA4 reports from a plain-English question.
- Use a Viewer-role account with the read-only scope, and leave the server's write option turned off.
- Ask the assistant which dates, dimensions and metrics it used, then compare the total with GA4.
What is the Google Analytics MCP server?
Google Analytics MCP is shorthand for an open-source server program, published by Google, that lets an AI assistant run reports against your Google Analytics 4 (GA4) property when you ask a question in plain English. You type something like "which channels brought the most sessions last month", and the assistant picks a report for the server to fetch through Google's Analytics application programming interfaces (APIs).
Google documents the server on its Analytics developer site, and the code sits in the googleanalytics organization on GitHub under the Apache 2.0 license. Third-party products with similar names also exist. This guide covers only Google's server.
What is MCP, and who publishes the standard?
MCP stands for Model Context Protocol. Its documentation defines it as an open-source standard for connecting AI applications to external systems, which in practice gives an assistant one common way to discover and call tools such as "run this report" without a custom integration for every product. An MCP server is the program that offers the tools, and the AI application you chat with is the client that calls them.
The protocol does not belong to Google. Anthropic donated it in December 2025 to the Agentic AI Foundation, a directed fund under the Linux Foundation, and the project's announcement names Google among the companies supporting that foundation.
Is the Google Analytics MCP server official, and is it read-only?
It is official, because Google publishes the code and documents it on its own developer site. The server uses two Google APIs: the Google Analytics Admin API for account and property information, and the Google Analytics Data API for reports.
On the read-only question, the two official pages differ slightly at the time of writing (November 2026). The developer page says the server is available for read requests only and cannot create, modify or delete your Google Analytics configuration or settings. The GitHub README lists the reading tools below and adds three writing tools, which create an annotation, a custom dimension or a key event, and which work only when someone starts the server with an allow-write flag and credentials that carry an edit scope. That option is off by default, so ask whoever installs the server to leave it off and to use read-only credentials.
- get_account_summaries: lists the Google Analytics accounts and properties your login can reach.
- get_property_details: returns the configuration details of one property.
- list_google_ads_links: lists the Google Ads accounts linked to a property.
- list_property_annotations: lists the annotations saved on a property.
- list_key_events: returns the key events, formerly called conversions, that are defined on a property. This tool appears in the README.
- get_custom_dimensions_and_metrics: retrieves the custom dimensions and custom metrics defined for a property.
- run_report, run_realtime_report and run_funnel_report: run a standard report, a realtime report and a funnel report through the Data API.
- run_conversions_report: runs a conversions report that covers ad costs, conversions, return on ad spend and attribution models.
What do you need before setting up the GA4 MCP server?
Setup requires someone comfortable with a terminal and the Google Cloud console. It follows the prerequisites on Google's developer page as they read in November 2026. The server is published on PyPI, the Python package index, under the name analytics-mcp.
Write down which Google account, Cloud project and computer hold the setup, because the person who built it may not be the person who has to fix it next year.
- Python 3.10 or higher, plus pipx or uv, which run the server in an isolated Python environment.
- A Google Cloud project with both the Google Analytics Admin API and the Google Analytics Data API enabled.
- A Google user account or a service account that holds at least the Viewer role on the GA4 property.
- Application Default Credentials, which is Google's standard credentials file, created with the read-only Google Analytics scope.
- A compatible AI client with a short configuration entry that names the server, the path to the credentials file and the Cloud project ID.
Which AI assistants can use the Google Analytics MCP server?
At the time of writing (November 2026), Google's developer page gives configuration steps for Google's Antigravity command-line interface (CLI) and integrated development environment (IDE), for Claude Desktop and Claude Code, and for Cursor. The same page notes that Gemini CLI is deprecated, while the GitHub README still shows steps for Gemini CLI and Gemini Code Assist next to Claude Code, so follow the developer page where the two disagree.
Several of these clients are coding tools that run in a terminal or a code editor, and Claude Desktop is the closest to an ordinary chat window. Neither official page gives steps for the ChatGPT app or the Gemini app. MCP is an open protocol, so other clients may be able to connect, but confirm that in the client's own documentation before you plan around it.
What can you ask, and what can it not answer?
The server answers questions that map to a GA4 report, which is a set of dimensions (the categories, such as channel or landing page), metrics (the numbers, such as sessions or key events) and a date range. Google's own sample prompts include "How many users did I have yesterday?" and "What are the most popular events in my Google Analytics property over the last 90 days?".
It cannot report anything GA4 never collected, such as closed sales that live in your customer relationship management (CRM) system. Questions about causes need more care, because the assistant can show what changed and may then offer a plausible reason that the data does not prove.
| Question type | Fit | What to check |
|---|---|---|
| Traffic by channel for a set period | Good | Whether it used the session or the first user channel group, and the exact dates |
| Top landing pages | Good | Whether the count is sessions, active users or total users |
| Key events by source | Good, if key events are set up | Which events it counted as leads |
| This month compared with last month | Good | That both periods are complete and the same length |
| Visitors on the site right now | Limited | Realtime reports cover only a few dimensions and metrics |
| Age or gender breakdowns | Limited | Data thresholds may withhold rows |
| Why leads dropped | Poor | Treat any stated cause as a guess to test |
| Revenue or deals recorded only in your CRM | Not possible | GA4 does not hold this data |
Which limits affect the numbers you get back?
Report questions become one or more Data API requests, and those requests draw on quotas measured in tokens. At the time of writing (November 2026), Google's quota page gives a standard property 200,000 core tokens per day and 40,000 per hour. Google says most requests charge 10 or fewer tokens, although long date ranges and fields with many unique values, such as page path, cost more.
Data thresholds can withhold rows in reports and API calls involving demographic data, and you cannot adjust them. Google's sampling guidance gives standard properties a 10 million-event limit for event-level queries; affected queries use a portion of the data and scale it up. This does not mean every aggregated report above that volume is sampled. Google also says data processing can take 24 to 48 hours and attribution credit for key events can change for up to 12 days.
Retention affects funnel questions. On a standard property the retention setting for user and event data is 2 or 14 months, and Google's help page says it affects explorations and funnel reports but leaves standard aggregated reports alone.
How do you check an answer against the GA4 interface?
One error to watch for is a wrong field, because GA4 has metrics and dimensions that sound alike. The Data API lists active users, total users and new users as separate metrics, and it has one channel group dimension for the session and another for the user's first visit.
An illustrative example: a marketing lead asks for October leads by channel, and the assistant reports 100 key events. She opens GA4 for the same dates and counts 80 form submissions. The gap comes from 20 newsletter signups, which are also marked as key events and which she never meant to count as leads. Once she names the form event in her question, the assistant and GA4 both show 80.
- Ask the assistant to state the property, date range, dimensions, metrics and filters it used.
- Open the matching report in GA4, set the same dates and compare the totals before you compare any rows.
- Leave out today and yesterday when you compare, because recent data may still be processing.
- Ask the same question in a new chat and confirm that the numbers match the first answer.
- Save the wording of each question that passes, and reuse it.
What data leaves your computer, and who should hold the credentials?
In the local setup described here, the server runs on your computer and talks to Google with your credentials; Google's repository also supports remote hosting. MCP's architecture documentation explains that the AI application returns tool results to the language model as part of the conversation. With a hosted AI assistant, the rows go to its provider, so treat revenue figures, campaign names and page addresses as shared business information and confirm that your AI use policy allows it.
For access, follow least privilege, which means granting the smallest permission that does the job. Google's documentation asks for at least the Viewer role and the read-only scope for reporting. Consider a service account with Viewer access to the property rather than an owner's personal login, and assign someone to manage its credentials. Keep the credentials file on a company-managed computer, and never paste it into a chat or a shared folder.
Simpler options: Ask Advisor, scheduled reports and spreadsheet exports
GA4 has its own conversational analytics feature called Ask Advisor, which Google's help center labels as Beta at the time of writing (November 2026) and describes as a conversational experience powered by Gemini models. It needs no installation. Google says it appears for eligible accounts, currently in properties with English as the selected language, and that it may make mistakes.
A GA4 administrator can schedule a report email each day, week, month or quarter, as a PDF or comma-separated values (CSV) attachment, to up to 50 addresses. Anyone with the Viewer role can export a report to Google Sheets or CSV, and the file includes up to 100,000 rows. The MCP server is worth its setup when your questions change from week to week and someone has time to check the answers.
Questions before you start
Is Google using MCP?
Yes. Google publishes and documents its own MCP server for Google Analytics, and its developer page gives setup steps for Google's Antigravity tools as well as for Claude and Cursor. Google is also named among the supporters of the Agentic AI Foundation, the Linux Foundation fund that has hosted the Model Context Protocol since Anthropic donated it in December 2025. The protocol is an open standard under vendor-neutral governance, which is why one Analytics server can work with AI clients from different companies.
Do you need a developer to set up the Google Analytics MCP server?
You need someone who is comfortable with a terminal and the Google Cloud console, though it does not have to be a full-time developer. The work is installing Python tooling, enabling two APIs, creating read-only credentials and adding a short configuration entry to the AI client. After setup, you can ask questions in plain language. Someone should still own upkeep, because the server and the clients keep changing; in November 2026, for example, Google's developer page already marks Gemini CLI as deprecated.
Can GLCO help us ask better questions of our GA4 data?
Bring the five or ten questions you most want answered, the name of whoever administers your GA4 property, the AI tools your team already uses, and a note on where leads and sales are recorded outside GA4. With that list, a call can sort the questions into those a scheduled report or dashboard already answers, those that suit an AI assistant connected to GA4, and those that need data GA4 does not hold. GLCO can then recommend the smallest setup your team can run and check.
Sources and further reading
- Google for Developers: Google Analytics MCP server (read-only note, prerequisites, supported clients, tools, sample prompts)
- GitHub (googleanalytics): google-analytics-mcp README (APIs used, tool list, write flag, credentials and scopes, hosted mode)
- Model Context Protocol: what MCP is (open-source standard for connecting AI applications to external systems)
- Model Context Protocol Blog: MCP joins the Agentic AI Foundation (donation, Linux Foundation, supporting companies)
- Google for Developers: Google Analytics Data API limits and quotas (token quotas, concurrent requests, token cost factors)
- Google Analytics Help: about data thresholds in GA4 reports, explorations and API calls
- Google Analytics Help: data freshness (processing time, realtime coverage, key event attribution changes)
- Google Analytics Help: Ask Advisor in Google Analytics (Beta), availability and limitations
- Model Context Protocol: architecture and tool results returned to the model
- Google Analytics Help: sampling and event-level query limits
- Google Analytics Help: retention for explorations and funnel reports
- Google Analytics Help: scheduled report emails
- Google Analytics Help: report exports and row limits
Make this useful for my team.
Bring the question you want your reports to answer. We can look at the data, website or sales workflow and scope a practical next step. We reply within one business day.


