Google Analytics MCP connects GA4 reporting data to an AI assistant through the Model Context Protocol. Google's official server is read-only and runs locally. You configure it for Claude Desktop or Claude Code using two Google APIs, Application Default Credentials, and at least Viewer access on your GA4 property.
In 2027, connecting GA4 to an AI assistant is the starting move for most marketing teams, not a niche experiment. The question has shifted from "can it be done?" to "what can I build once it's connected?"
This guide walks through the full setup, permissions, the best prompts for GA4 analysis, and how to extend the workflow into Search Console, SEO, and content once the data connection is live.
If you are new to MCP in general, the guide to MCP for SEO explains the protocol clearly before you touch any config file. For the broader SEO agent picture, the Keytomic SEO MCP server shows what the connection unlocks beyond GA4.
What Google Analytics MCP Does (and What It Does Not Do)
The Model Context Protocol is an open standard for connecting AI applications to external systems. It acts as the bridge: your Claude client on one side, the GA4 property on the other.
Google's documented server exposes tools built on the Google Analytics Admin API and the Google Analytics Data API. It is read-only. It cannot create, change, or delete Analytics settings.
Here is what that means in practice:
What it does: retrieves account and property details, runs Data API report queries, and returns structured results Claude can summarize.
What it does not do: change GA4 settings, include Search Console data, or guarantee that Claude's interpretation is correct.
What it does not replace: GA4 itself as your source of record.
Which GA4 data can Claude query?
Reports return combinations of dimensions and metrics for a selected property: sessions by default channel group, views by page path, key events by landing page. Google's Data API reporting basics explain this model in detail.
What the connection does not prove
GA4 shows what visitors did after they arrived. It does not show rankings, impressions, or whether SEO caused a conversion change. Google Search Console is a separate data source and needs its own supported connection. The Google Search Console MCP guide covers that setup. GA4 access does not imply Search Console access.
What You Need Before Connecting GA4 to Claude
Prepare these before you open a Claude config file. All requirements below come from Google's Analytics MCP setup guide, so verify versions and commands against the current page before you start.
Requirement | What Google specifies | Easy-to-miss detail |
|---|---|---|
GA4 property access | At least Viewer for the user or service account | A Cloud project does not grant it |
Google Cloud project | A project where the APIs are enabled | Select the intended project |
APIs | Analytics Admin API and Analytics Data API | You need both |
Runtime | Python 3.10 or higher, plus pipx or uv | Confirm before installing |
Credentials | Application Default Credentials (ADC) | A service account JSON file is a secret |
Claude client | Claude Desktop or Claude Code | Local config, not Claude.ai |
The two most common gaps: teams enable APIs in the wrong Cloud project, and they forget that the Cloud project and the GA4 property are separate permission layers. Neither one inherits the other.
Which Claude environment to use
Google's guide documents Claude Desktop and Claude Code, both configured locally. Claude.ai is a hosted browser session with a different authentication model. If you explore that route, check the provider, scopes, retention, and client support independently.
For teams that want a hosted, no-install option alongside GA4, the Keytomic MCP server connects via a single URL and handles Search Console, site audits, keyword research, and publishing from the same assistant session.
How to Connect GA4 to Claude: Step by Step
These steps follow Google's documented procedure. Commands can change, so compare each step against the current guide before running it.
Select or create a project in the Google Cloud Console.
Enable the Analytics Admin API and the Analytics Data API in that project.
Give your Google user or service account at least Viewer access to the GA4 property.
Set up Application Default Credentials (ADC).
Add the server to Claude Desktop or Claude Code using
pipx run analytics-mcp(or the uv equivalent).Fully restart or reload the client.
Run one minimal read-only test report.
Configure authentication before launching the server
Google's guide uses ADC. With a Google user account, run this in the gcloud CLI:
With a service account, point to a JSON key file and confirm that account has Viewer access on the property. The file is a credential: treat it like a password, keep it out of source control, and do not paste it into prompts or screenshots.
Add the server to Claude Desktop
Edit claude_desktop_config.json (at ~/Library/Application Support/Claude/ on macOS or %APPDATA%\\Claude\\ on Windows) and add this under mcpServers:

Add the server to Claude Code
Register it from the terminal:
Replace the placeholders with your values and copy variable names from Google's current page.
Verify the connection with a minimal test
Fully restart Claude Desktop so it reloads the config, then run:
List the GA4 properties you can access. For one of them, return sessions by default channel group for the last 7 completed days. Name the property, period, dimensions, metrics, and any missing data.
Compare a sample against the GA4 interface before you rely on the results for decisions.
Permissions and Security Controls
Start with the narrowest access that works.
Grant Viewer on the one property you need, not on every property your account can reach.
Keep Cloud API enablement and GA4 property access as separate checks in your notes.
Keep credential files out of source control, prompts, shared folders, and screenshots.
Remove property access when it is no longer needed, following Google's current account-access instructions.
The two authentication options carry different tradeoffs:
User account (OAuth 2.0): quick for solo analysis, but access is tied to a person. If their permissions change, what Claude can see changes too.
Service account: a separate identity you can scope to specific properties, but it creates a key file you must protect and rotate.
A read-only server and least-privilege credentials are complementary controls, not interchangeable guarantees.
Useful Claude Prompts for GA4 Analysis in 2027
Good prompts act like analyst briefs. Add this guardrail to each one:
State the property, date range, dimensions, metrics, and any missing data. Show observed GA4 values first, then label interpretation separately. Do not make causal claims.
Traffic and channel analysis
Compare sessions and key events by session default channel group for the last 28 completed days against the previous 28. Show percent change only if both periods return data.
List the top 10 landing pages by sessions for last month versus the prior month, with the exact metric names you used.
Conversion and landing page analysis
Show configured key events by landing page for organic traffic over the last full month, and flag rows where data is sparse.
Using only those GA4 rows, which landing pages deserve a closer look? Describe any pattern as association, not proof of cause.
Combining GA4 with Search Console
GA4 shows what happens after the click. Search Console shows the click itself. For query impressions and rankings, connect Google Search Console via MCP separately, then combine the signals in Claude by referencing both data sources in a single prompt.
For teams using the Keytomic SEO MCP server, this combination is built in: GA4 traffic, Search Console clicks and positions, and content workflows all run in the same assistant session through one URL.
What Most GA4 MCP Setups Get Wrong
Most setups stop at "it works." Here are the gaps that actually matter in 2027:
1. Read-only is not the same as risk-free
The official Google Analytics MCP server cannot modify GA4. That does not mean every third-party server or hosted connector is equally constrained. Before connecting any non-Google MCP server to your analytics property, check explicitly whether it has write access.
2. GA4 is behavior data, not intent data
A spike in organic sessions from GA4 tells you something happened. It does not tell you which queries drove it, whether rankings moved, or whether a content change caused it. For that, you need Search Console. For keyword intent, topic gaps, and content planning on top of that data, you need an SEO automation workflow.
3. API totals and the GA4 interface can differ
Sampling, filter settings, default channel groupings, and data freshness all affect whether a number from the API matches what you see in the GA4 interface. Always verify consequential numbers by comparing the report parameters, not just the totals.
4. MCP is the protocol, not the product
Searching for "Google Analytics MCP" in 2027 returns Google's official server, third-party servers, hosted connectors, and directory listings. These are different things with different capabilities, authentication models, pricing, and scopes. The guide to what MCP is for marketers is worth reading before you evaluate options.
5. Local servers need ongoing maintenance
Google's server runs locally. When Python, pipx, or the package updates, you may need to reconfigure. Teams that want a managed, always-on alternative should evaluate hosted remote MCP servers like the Keytomic SEO MCP server, which requires no installation and no ongoing package management.
How to Fix Common Google Analytics MCP Problems
Work through these in order. Not every failure is a credential problem.
Symptom | Likely cause | Next check |
|---|---|---|
"spawn pipx ENOENT" or Python errors | Desktop apps often do not inherit your shell PATH | Use the full command path; confirm Python 3.10+ |
Authentication fails | Wrong credentials path, expired sign-in, or missing scopes | Recheck the path variable and rerun ADC login |
Empty property list | The identity lacks property access | Confirm Viewer on that exact account |
Permission or API-disabled error | An API is not enabled in the selected project | Check project selection and both APIs |
Unsupported metric or dimension | Incompatible pair or wrong name | Check the API schema and compatibility |
Quota error | Request limits for the property type or method | Narrow the request; read current quota docs |
No rows returned | Empty date range or wrong property | Test a recent completed range on a known property |
Totals differ from the GA4 interface | Different report setup, filters, or data freshness | Compare like for like before calling either wrong |
Check credentials, APIs, and property access first
Verify: the credentials file path, the selected Cloud project, both APIs enabled, and the authenticated identity's access to the GA4 property. These are four separate checks, and any one can fail while the others pass.

Check schema, quotas, and reporting expectations
Use Google's Data API schema reference to confirm valid dimension and metric names. Quota limits vary by property type and method. Check Google's Data API quota documentation for current limits rather than trusting a fixed number from any blog post.
When to Use Claude Instead of the GA4 Interface
Claude helps you phrase and summarize supported report queries quickly. The GA4 interface stays better for visual exploration, configuration, and verification.
Use Claude for: quick comparisons, plain-language summaries of a known report shape, and repeatable question templates across multiple properties.
Keep the GA4 interface for: visual exploration, admin changes (the server is read-only), and exports when you need an auditable record.
A poor fit: auditing sensitive or consequential figures without comparing against the underlying GA4 report.
Building a Measurement Workflow Beyond GA4
A GA4 MCP connection is one input. The teams getting the most from AI-assisted analysis in 2027 are combining it with other data sources and acting on the signals, not just reading them.
A practical measurement stack looks like this:
GA4 via MCP covers on-site behavior: sessions, engagement, conversions by landing page and channel.
Search Console via MCP covers search demand: clicks, impressions, positions, and CTR by query and page. The Google Search Console MCP setup guide covers this.
SEO automation covers what to do with those signals: identifying content decay, running technical SEO audits, planning keyword research, and publishing updated content.
AI visibility tracking covers what happens in AI answer engines: whether ChatGPT, Perplexity, and Gemini cite your content. The AI Visibility Tracker handles this.
The Keytomic SEO MCP server connects layers 2, 3, and 4 through a single URL and your Keytomic account. There is nothing to install and no API key to manage. You get Search Console data, site audits, keyword research, content drafting, publishing, and AI visibility monitoring in the same assistant session where you are already analyzing GA4.
For teams evaluating how to build this kind of workflow, the guide to SEO automation workflows and the guide to building an SEO agent cover the architecture decisions in detail.
If you work at an agency managing multiple client sites, the Keytomic for agencies solution handles multi-site MCP access from one sign-in.
Frequently Asked Questions About Google Analytics MCP
What is Google Analytics MCP?
Google Analytics MCP is Google's official MCP server that lets a compatible AI assistant read GA4 reporting data through the Analytics Admin API and Data API. MCP is the Model Context Protocol, an open standard; Google's server is one implementation of it.
Is there an official Google Analytics MCP server in 2027?
Yes. Google's documented server is available at developers.google.com/analytics/devguides/MCP. It is read-only and runs locally on your machine.
Can I connect GA4 to Claude without installing anything locally?
Google's official server requires a local installation. If you want a hosted, no-install option, remote MCP servers like Keytomic connect via a URL and handle authentication through your existing account. That server covers Search Console, audits, and content workflows rather than raw GA4 queries.
What permissions does the GA4 MCP server need?
At least Viewer access on the target GA4 property for the user or service account. Enabling APIs in Google Cloud is a separate step and does not grant property access.
Does GA4 MCP work with ChatGPT?
Google's documented support covers Claude Desktop and Claude Code. For ChatGPT-specific MCP configuration, the ChatGPT MCP server for SEO guide covers setup and limitations.
Does Google Analytics MCP change GA4 settings?
Google's server is read-only and cannot create, modify, or delete Analytics settings. This applies to the official server; third-party servers may differ.
Can Claude query multiple GA4 properties?
It depends on the authenticated identity's permissions and your server version's available tools. Check what Claude lists rather than assuming all properties are accessible.
What is the difference between Google Analytics MCP and the GA4 API?
The GA4 API requires you to write code for each integration. An MCP server publishes its tools in a standard format, so a compatible AI assistant can call them from a plain-language question without additional code.
Is Google's GA4 MCP server free?
The server package itself is open source. Check Google's API quota terms, Anthropic's pricing for your Claude plan, and any third-party connector you add; they carry their own terms.
How is GA4 MCP different from Google Search Console MCP?
They are two separate data sources. GA4 covers on-site behavior after the click. Google Search Console covers search performance: queries, impressions, positions, and CTR. Connecting one does not give you access to the other. See the Google Search Console MCP guide for that setup.
What can I do after connecting GA4 to Claude?
The most common next steps: combine GA4 with Search Console for a full picture of organic performance, run a technical SEO audit to find issues affecting traffic, and set up AI visibility tracking to monitor how your content appears in ChatGPT, Gemini, and Perplexity answers. The guide to running an AI visibility audit is a practical starting point.
Summary
The short version:
Google Analytics MCP is a read-only local server that lets Claude query GA4 through the Admin and Data APIs.
You need a Google Cloud project, both APIs enabled, GA4 Viewer access, Python 3.10+, and Application Default Credentials.
Claude Desktop and Claude Code are the documented clients. Claude.ai is a different setup.
GA4 covers behavior data. It does not cover rankings or search intent.
Google Search Console needs its own separate MCP connection.
Useful prompts follow the same structure: property, date range, metrics, then interpretation labeled separately.
The setup that gets the most from AI-assisted SEO in 2027 connects GA4 and Search Console, adds technical auditing, keyword research, and AI visibility tracking in the same workflow.
If you are ready to extend beyond GA4, Keytomic's SEO MCP server connects the rest of the stack through one URL and your existing Keytomic account.







