MCP Ecommerce

Security and governance

Is Google Analytics MCP Safe? What Claude Can Read in GA4

By , Editor, MCP Ecommerce · Published · 7 min read

Woman in glasses and a striped shirt leans over a desk in a dim office, reaching toward a laptop trackpad beside printed charts

The short answer

Mostly yes, if you keep it read-only and limit access. Google's official Google Analytics MCP server is designed for read requests and asks for the analytics.readonly scope by default, so an AI assistant cannot change your GA4 settings. It can still read your reports and property details, and that data enters the AI conversation. Optional write tools exist behind a flag.

Mostly yes. The official Google Analytics MCP server is built for read requests, and with the default read-only permission an AI assistant cannot edit your GA4 configuration. That does not make it risk-free. The assistant can still read your analytics data, that data enters the AI conversation, and a few settings can widen access beyond what you intended.

This article explains what MCP (Model Context Protocol) gives Claude or ChatGPT access to in GA4, where the real risks sit, and how to set it up conservatively. Check the primary Google pages named below before you rely on any detail here, because the server is labeled experimental and changes.

Is Google Analytics MCP safe to use with GA4?

Safe enough for most stores when four conditions hold:

  1. You use Google's official server, or another server you have evaluated.
  2. You sign in with a Viewer-level account, on the specific properties you need.
  3. You leave write tools switched off.
  4. You are comfortable with the AI vendor receiving the report data you ask about.

The word "safe" covers three separate questions: can the AI change things, what can it see, and where does the data go. The sections below take them in turn.

What is the Google Analytics MCP server?

MCP is an open protocol, introduced by Anthropic in November 2024, that lets AI assistants connect to external tools and data. A server exposes tools. A client, such as Claude, calls them.

Google publishes an open-source Google Analytics MCP server. Its code is on GitHub (googleanalytics/google-analytics-mcp), it is Apache 2.0 licensed, and it is published as the PyPI package analytics-mcp. Google's developer page is titled "Try the Google Analytics MCP server." Several guides describe it as experimental. It runs on your own computer over stdio (a local connection), not as a hosted service.

For setup steps, see Connect Claude to GA4 with the Google Analytics MCP Server.

What can Claude or ChatGPT read in GA4?

The server wraps two Google interfaces: the Admin API (configuration) and the Data API (reports). According to the GitHub README, the tools fall into these groups:

  • Account and property discovery: account summaries, property details, Google Ads links, property annotations.
  • Reporting: standard reports, funnel reports, conversions reports, and custom dimensions and metrics.
  • Realtime: a realtime report.

In practice, once you sign in, the assistant can list the accounts and properties your Google login can access, read property settings and custom definitions, and pull traffic, conversion and revenue figures. One guide says the conversions tool covers ad costs, conversions, ROAS and attribution models. Test this yourself, since tool lists differ between sources and Google's docs page may show fewer tools than the README.

What it does not cover:

  • It sees GA4 only. There are no Search Console tools in the official server.
  • It does not read your store platform, ad accounts or email tool.
  • GA4 Data API limits still apply, including sampling, thresholds and quotas. Requests count against your property's Data API quota.

Reports from the Data API are aggregated rows, not individual user records. Verify this in Google's Data API documentation before you promise it to a client or legal team.

Is the GA4 MCP server read-only?

By default, yes. Google's developer page states that the server is available for read requests only, and setup requests the analytics.readonly permission scope.

This matters because the limit is enforced by Google's OAuth permissions, not by the AI's good behavior. If a prompt tells the assistant to "fix" a conversion setting, the token it holds does not permit the change.

One nuance: the README now lists optional write tools. At least one (creating a property annotation) requires the --allow-write flag and the analytics.edit scope. Some sources say there are more, such as creating custom dimensions or key events. Tool counts vary across sources (7, 9, 10 and 13 all appear), so read the current README on the day you install. If you never pass the flag and never grant the edit scope, those tools are not usable.

Google Analytics MCP permissions: what to set

Permissions exist at three layers. Restrict each one.

Layer Safer setting Riskier setting
GA4 user role Viewer, on specific properties Editor or Administrator on the account
OAuth scope analytics.readonly analytics.edit added
Server flags No --allow-write --allow-write enabled
Credentials Personal login for testing, service account for team use Shared admin credentials

Practical steps:

  • Use a Viewer account. Even if the scope is read-only, a Viewer role caps the damage if you accidentally broaden the scope later.
  • Use a service account for teams. Create a service account, add its email to only the needed GA4 properties as Viewer, and point the server at its key file. Store the key file as a secret and rotate it if it leaks.
  • Look at the login scopes. The documented login command requests analytics.readonly together with the cloud-platform scope. That second scope is broader than Analytics. The resulting Application Default Credentials (ADC) file sits on your machine. Treat it like a password: do not put it in a shared folder or a synced repository, and confirm the current scope list in Google's docs.
  • Scope the properties. The server can list every property your login can reach. An agency login with 40 client properties exposes all 40 to the assistant. Use a narrower login.

Does Claude see my Google Analytics data, and what about privacy?

Yes. Everything a tool returns goes into the conversation. That can include property IDs, account names, custom dimension names, traffic and revenue figures and Google Ads link information. Once it is in the chat, it is handled under the AI vendor's terms.

"Read-only" therefore describes what the assistant can change in Google Analytics. It says nothing about where the data goes afterward. For Claude Google Analytics privacy questions, check:

  • The current data-use terms for your plan (consumer, team or enterprise) in Anthropic's or OpenAI's documentation.
  • Whether chat history is retained, and for how long.
  • Your own obligations: client contracts, privacy notices and consent settings that cover sharing analytics data with a processor.

One secondary source claims connector content is excluded from model training. Do not rely on that. Confirm it in the vendor's own documents.

What is the biggest real risk: prompt injection?

Prompt injection is when text inside data tells the AI to do something the user did not ask for. In GA4, text can arrive through fields that outsiders can influence, such as page titles, campaign names or UTM parameters that appear in reports. An assistant that also has other tools connected (email, files, a browser) could be nudged to send data somewhere.

OWASP warns that attackers can use prompt injection to encode sensitive data into seemingly normal tool calls. Read-only GA4 access reduces the damage, but it does not remove the risk if the same chat can also send messages or call other services.

Ways to reduce it:

  • Connect GA4 in a session that has no write-capable tools for other systems.
  • Read what the assistant plans to do before approving tool calls.
  • Be cautious with reports that contain free text from unknown sources.

More on this in MCP Security: Is MCP Safe for Your Store? A Merchant Checklist.

Can ChatGPT connect to Google Analytics MCP safely?

Not directly. Google's open-source server runs on your computer, while ChatGPT connects to servers on the internet by URL. Guides report that Google does not document a ChatGPT setup for it. Claude Desktop, Claude Code, Gemini CLI and Cursor can run the local server.

You may see a hosted endpoint for the Analytics Data API mentioned in third-party guides. Sources disagree on whether Google documents it. One tester reported four reporting tools and no account lookup, while another found Google's reference page returning an error. Treat it as unconfirmed until you see it in Google's own documentation. If you host the local server yourself to reach ChatGPT, you take on authentication and hosting security, which is a larger risk than running it locally.

Third-party GA4 connectors from analytics vendors are separate products with their own permission models. Evaluate each one before connecting.

What can go wrong?

  • Over-broad access: an admin login exposes every property and, with the write flag, allows changes.
  • Credential leaks: the ADC file or a service account key left in an unprotected place.
  • Wrong conclusions: sampling, thresholds and attribution differences make AI answers differ from the GA4 interface. Spot-check numbers.
  • Quota use: heavy questions consume your Data API quota.
  • Outdated advice: this is an experimental server. Tool lists and scopes change.

Quick safety checklist

  1. Install only from Google's documented sources.
  2. Use a Viewer account or a Viewer-only service account.
  3. Keep analytics.readonly. Do not enable --allow-write.
  4. Limit properties to those you need.
  5. Protect credential files on disk.
  6. Check your AI plan's data terms before connecting client data.
  7. Revoke access when the project ends.

For comparison with other connectors, see MCP Security: Is MCP Safe for Your Store? A Merchant Checklist, which covers the same questions for store and ad accounts.

Frequently asked questions

+

Is GA4 MCP safe?

It is reasonably safe when configured conservatively. Google's official server is meant for read requests and requests the analytics.readonly scope by default, so the assistant cannot change your setup. The remaining risks are data exposure to the AI vendor, broad account access, stored credentials and prompt injection. Use a Viewer role, keep write tools off and check your AI plan's data terms.

+

Is Google Analytics MCP read-only?

By default, yes. Google's developer page says the server is available for read requests only. However, the README lists optional write tools that need the --allow-write flag and the analytics.edit scope. If you do not enable the flag or grant that scope, the write tools cannot be used. Check the current README for the exact tool list.

+

Can Claude change my Google Analytics settings through MCP?

Not with the default setup. A token with the analytics.readonly scope does not allow edits, whatever the prompt says. Claude could only change things if you deliberately start the server with the write flag and grant the edit scope. Using a Viewer role on the GA4 property adds a second barrier.

+

Does Claude see my Google Analytics data and is it private?

Claude sees whatever the tools return in the conversation, such as property names, traffic and revenue figures. That data is handled under Anthropic's terms for your plan, so read the current data-use policy before connecting client or sensitive data. Read-only access does not keep the data out of the chat.

+

What permissions does the Google Analytics MCP server need?

At minimum, the analytics.readonly scope and a Google login or service account with access to the GA4 properties. The documented login also requests the broader cloud-platform scope, so review it. Best practice is a Viewer role on only the needed properties. Write use would additionally need the analytics.edit scope.

+

Can I use Google Analytics MCP with ChatGPT?

Not directly with Google's local server. It runs on your computer, while ChatGPT connects to servers by public URL. Google does not appear to document a ChatGPT setup. A hosted endpoint is mentioned in third-party guides, but sources disagree on whether it is official, so confirm it in Google's documentation first.

Sources

Questions and answers

Questions readers and searchers ask about this guide, answered by the site editor from the vendor documentation, plus reader experience. Every comment is reviewed before it appears.

Ask a question or share what worked

Reviewed before publishing. One link max, no HTML.

Keep reading