To connect Claude to Google Analytics safely, give Claude a GA4 user with the Viewer role, sign in with only the analytics.readonly scope, add Google's official analytics-mcp server to Claude Code without the --allow-write flag, and deny the three write tools in Claude Code's permissions. Check one figure against GA4 before anyone relies on the answers.

TL;DR

There is no Google Analytics connector from Google in Claude's directory. The official route is Google's open-source Google Analytics MCP server, which Google documents for Claude Code with one command.

Connect it read-only in six steps: a GA4 user with the Viewer role, a Google sign-in with only the analytics.readonly scope, Google's server added without the --allow-write flag, write tools denied in Claude Code, a test against a number you already trust, and a plan for revoking access.

Turn on writes (annotations, custom dimensions, key events) only later, for one named task, with Claude asking before every change.

Short answer: to connect Claude to Google Analytics safely, give Claude a GA4 user with the Viewer role, sign in with the read-only scope, add Google's official analytics-mcp server to Claude Code without --allow-write, and block the three write tools. Check one figure against GA4 before anyone relies on the answers.

This page is the step-by-step how-to for connecting one tool, GA4, with read-only access first and approvals for anything that changes the property. It does not re-explain MCP; if you need that, read what a marketing MCP server is. If you want to know which other marketing tools have connectors in Claude's directory and what each can change, read the Claude connectors catalogue. If you would rather have it set up and checked for you, that is part of my Claude consultant and analytics and tracking work.

Every command and setting below was checked against Google's README and Help pages and Anthropic's docs on 17 and 18 November 2026.

Which way should you connect Claude to Google Analytics?

Short answer: use Google's official Google Analytics MCP server with Claude Code if someone on the team can run a few terminal commands. Use a third-party connector from Claude's directory if you need it in the Claude app with no setup, and accept that the vendor then holds your GA4 access.

RouteWhere it runsRead-only by default?Who holds your access
Google's GA MCP in Claude CodeYour computerYesYou
Third-party directory connectorVendor's serversDepends on vendorThe vendor
Google's GA MCP hosted by youYour Cloud Run serviceYes, unless you set the write flagYou

The first route is the one this guide walks through. Google's README documents it for Gemini and for Claude Code. The third route, running the same server over HTTP with its own sign-in so the whole team can add it as a custom connector in the Claude app, is also in the README; it is a small hosting project, not a setting. Third-party routes in the directory include Supermetrics, Funnel and Adspirer; the catalogue lists what each can change.

What do you need before you start?

Short answer: Claude Code, a Google Cloud project you control, admin access to the GA4 property (to add a user), the gcloud command-line tool, and pipx for Python. The server itself is free; Google API quotas apply.

You needWhyWhere to get it
Claude CodeGoogle documents this clientcode.claude.com
Google Cloud projectHolds the APIs and quotasconsole.cloud.google.com
GA4 admin, onceTo add a Viewer userAdmin, Property access management
gcloud CLISigns in with a chosen scopeGoogle Cloud SDK
pipxRuns the Python serverpipx.pypa.io
Illustrative animation of six steps to connect Claude to GA4 read-only: Viewer role, read-only scope, official server, no allow-write flag, tool permissions, test against GA4
Illustrative: the six settings in order. Each one is a separate lock.

Step 1: give Claude its own Viewer access in GA4

Short answer: in GA4 go to Admin, then Property access management, and give the Google account Claude will use the Viewer role on the one property it needs. Add the No Cost Metrics or No Revenue Metrics restriction if Claude should not see them.

The server acts as whichever Google account signs in, so the GA4 role is the first and strongest lock. Google's access management page says a Viewer "can see settings and data" and can use the APIs, but cannot change the property. A Marketer can create key events and audiences, and an Editor can also register custom dimensions, which is more than a reporting connection needs.

Google Analytics Help table describing the Viewer role and the No Cost Metrics and No Revenue Metrics data restrictions
GA4's Viewer role and data restrictions, from Google's Analytics Help, captured 18 November 2026.

In my own client work, access is the step that goes wrong most often: "I gave you access" turns out to be the wrong role, the wrong property or the wrong person. I check the real role on a shared screen before anything else. For an AI connection I would rather use a separate account with Viewer on one property than an admin's personal login, because then the worst case is a wrong answer, not a changed property. On a client's property, explain the extra account before you ask for it; an r/ClaudeAI thread describes how awkward a new, unexplained Google identity is with clients.

GA4 roleCan read reportsCan change the propertyUse for Claude?
ViewerYesNoYes, start here
AnalystYesShares explorationsNot needed
MarketerYesKey events, audiencesOnly for a planned write
EditorYesMost settingsOnly for custom dimensions
AdministratorYesEverything, including usersNever

Step 2: set up the Google Cloud project

Short answer: in a Google Cloud project, turn on the Google Analytics Admin API and the Google Analytics Data API, and create an OAuth client of the desktop type. Download its JSON file; the next step uses it.

The README lists those two APIs and links Google's guide to managing OAuth clients. Use a project your organisation owns, not a personal one, because API usage and quotas are counted against it.

Step 3: sign in with the read-only scope only

Short answer: run Google's gcloud sign-in with two scopes: analytics.readonly and cloud-platform. Do not add analytics.edit. Sign in as the Viewer account from step 1, not your own admin account.

gcloud auth application-default login \
  --scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \
  --client-id-file=YOUR_CLIENT_JSON_FILE

That command is the one in Google's README. When it finishes it prints the path of a credentials file; copy it for step 4. A scope is the permission list on the Google sign-in screen, so this is the second lock: even if a write tool were switched on later, the token could not change the property.

Google Analytics MCP README section Configure credentials, showing the analytics.readonly scope and that write tools need the analytics.edit scope and the allow-write flag
Google's README on credentials, captured 18 November 2026: read-only scope required, edit scope only for write tools.

Step 4: add Google's server to Claude Code, without --allow-write

Short answer: run the claude mcp add command from Google's README with your credentials path and project ID. Leave out --allow-write, so the three write tools never load. Then run claude mcp list to check it shows as connected.

claude mcp add analytics-mcp \
  --scope user \
  -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" \
  -e "GOOGLE_CLOUD_PROJECT=YOUR_PROJECT_ID" \
  -- pipx run analytics-mcp
Google Analytics MCP README section Configure Claude Code with the claude mcp add analytics-mcp command
The Claude Code section of Google's README, captured 18 November 2026.

The server, version 1.1.0 since 6 November 2026, has ten tools that read: account summaries, property details, Google Ads links, annotations, key events, custom dimensions and metrics, and four report types (standard, funnel, conversions with ad costs and ROAS, and realtime). Three more tools write, and they only exist when you pass --allow-write.

Write toolWhat it doesNeeds
create_property_annotationAdds a note to the timeline--allow-write, analytics.edit
create_key_eventMarks an event as a key eventSame, plus Marketer or Editor
create_custom_dimensionRegisters a custom dimensionSame, plus Editor

Step 5: block write tools in Claude's permissions

Short answer: add deny rules for the three write tools to your Claude Code settings file, even though they are not loaded. Leave the read tools without allow rules at first, so Claude Code asks before each call, and allow them one at a time once you trust the answers.

Claude Code's permissions docs say rules run in order: deny, then ask, then allow, and MCP tools are named mcp__server__tool. With the server named analytics-mcp, this goes in ~/.claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__analytics-mcp__create_property_annotation",
      "mcp__analytics-mcp__create_key_event",
      "mcp__analytics-mcp__create_custom_dimension"
    ]
  }
}

The deny rules are the fourth lock. If a future version adds write tools, or someone adds --allow-write to the command, the known write tools still will not run. Later, when the reads are trusted, add allow rules for specific read tools such as mcp__analytics-mcp__run_report rather than the whole server. Do not run this server in a permission mode that skips prompts.

If you use a third-party GA4 connector from the directory instead, the same lock lives in the Claude app: Customize, Connectors, the connector, then Tool permissions, where each tool can be Always allow, Needs approval or Blocked.

Anthropic documentation section Manage or disconnect a connector, showing tool permissions Always allow, Needs approval or Blocked, and Disconnect and Remove options
Anthropic's connector docs on tool permissions, captured 18 November 2026.

Step 6: test with read-only questions and check one number

Short answer: first ask Claude to list its tools and say which can change anything. Then ask one small report question and compare one figure with the same report in GA4. Expect small differences, because the server uses the Data API, not the GA4 screens.

List every tool on the analytics-mcp server. For each one, say whether it can change anything in Google Analytics, and quote the words in its description that tell you so. Do not run any report yet.
Using only analytics-mcp, for property [ID], show sessions and key events by session default channel group for the last 28 days. Show the exact report request you ran (dimensions, metrics, date range, filters). Do not create or change anything.

Open the same report in GA4 and compare one row. A Japanese analytics consultancy pointed out on X that the server's numbers come from the Data API and can differ from Explore and the standard reports. That is normal; what matters is knowing which dimensions, filters and dates Claude used. On client accounts I audit first, put the findings in a sheet, check them by hand, and change nothing until the change is approved. A connected AI does not change that order.

Chart of Google Analytics Data API quotas for a standard property: 200,000 core tokens per day, 40,000 per hour, 14,000 per project per property per hour; Analytics 360 has ten times more
Every report Claude runs spends Data API quota. Source: Google's Data API limits page, updated 10 November 2026.

Quotas are rarely a problem for one person asking questions, but they are shared with every other tool that reads the same property through the API, such as dashboards and connectors. Google's quota page says most requests cost 10 tokens or fewer and that high-cardinality dimensions such as page path cost more. If a dashboard starts failing after you connect Claude, check quotas first.

Step 7, later: how to allow one change with approval

Short answer: only when there is a named task, such as marking generate_lead as a key event. Add the analytics.edit scope, give the account the role the tool needs, add --allow-write, remove that one deny rule, and approve the single call when Claude Code asks. Then put the locks back.

Illustrative animation of one approved change: you ask, Claude proposes create_key_event, Claude Code stops for permission, you check, you approve once, you log it
Illustrative: one change, one approval, one log entry.
Check before approvingWhy
Right property IDAccounts often have test and live properties
Exact event or parameter nameA typo creates a second, empty item
Event already firesCheck DebugView first
LimitsStandard properties allow 30 key events
Who approved, and whenSo the change can be explained later

Approve with "Yes" once, never with an option that stops asking. Anthropic's help page on custom connectors gives the same advice for the Claude app: only choose "Allow always" for a tool you trust to run unsupervised. A write tool on a live property is not one of those. If you need Claude to fix tracking itself, rather than GA4 settings, the staged approach in Claude and Google Tag Manager keeps publishing with a person.

How do you disconnect Claude from Google Analytics?

Short answer: remove the server from Claude Code, revoke the Google credentials on your computer, and remove the Viewer user from GA4. Doing all three means nothing is left that could reconnect.

StepCommand or place
Remove the serverclaude mcp remove analytics-mcp
Revoke local credentialsgcloud auth application-default revoke
Remove GA4 accessAdmin, Property access management
Third-party connectorCustomize, Connectors, Disconnect, then Remove

Does the same method work for Google Ads, HubSpot or other tools?

Short answer: yes, the same four locks apply to any tool: a low-permission user, a read-only scope where one exists, the server's own read-only setting, and blocked write tools in Claude. What changes is where each lock lives.

ToolAccount roleRead-only scope?Server or connector setting
GA4Vieweranalytics.readonlyNo --allow-write
Google Ads (Google's MCP)Read only accessNoneLabels and assets off in its config
Meta Ads (Meta's MCP)Lowest that sees reportsads_readAds MCP rules, where available
HubSpot (directory)User with limited CRM accessSet by HubSpotBlock the manage tools
TikTok (directory)Lowest role that sees reportsSet by TikTokBlock smart_plus create and update

The Google Ads and Meta details are in the marketing MCP explainer, and the HubSpot and TikTok tool lists are in the connectors catalogue. For a tool that appears in neither, the order is the same every time: search Claude's directory, then look for an MCP server in the vendor's developer docs, and only then consider building a small connector on the vendor's API. In each case, start with the read-only user.

Where this advice is weak

Short answer: Google's server changes quickly, the Claude app has no official GA4 connector, and I have not tested every third-party route. Treat the commands here as correct on 18 November 2026.

  • Google's server went from read-only to optional writes in October 2026 (version 0.8.0) and to 1.1.0 by 6 November 2026. New tools may appear; run the tool-list prompt after every update.
  • Google's developer page for the server still describes it as handling read requests only, while the README documents the write tools. The README is the more current source.
  • The Claude Code steps assume one person's computer. A shared team setup in the Claude app means hosting the server with its own sign-in, which this guide only mentions.
  • TikTok role names and HubSpot permission details in the last table are general guidance; check each tool's own help pages.

What people say on X and Reddit

Short answer: people like asking GA4 questions in plain English, but the setup (Cloud project, OAuth, credentials) is the most common complaint, and analysts warn that API numbers need checking against the GA4 screens.

WhoWhat they saidTake it asLink
Google Analytics (official)The open-source server connects GA data to LLMs for questions beyond standard reports (8 Jan 2026)OfficialX post
A Japanese analytics consultancyNumbers come from the Data API and can differ from Explore and reports (4 Aug 2025)ExpertX post
A Spanish analytics practitionerWorks with Claude as well as Gemini, but it spends API quota (24 Jul 2025)OpinionX post
A Google Ads freelancerGoogle Ads and GA4 revenue differ because of attribution, and both can be right (4 Jun 2026)First-handX post
A developer and security bloggerAnother MCP example of hidden instructions in public text reaching private data (19 Jun 2025)OpinionX post
r/GoogleAnalyticsAsking GA4 questions in plain English works well; the top reply warns GA4 data is already shaky without AI on top (12 Jan 2026)First-handThread
r/GoogleAnalyticsSetup took a lot of back and forth with the Cloud project, sign-in and service accounts (24 Aug 2026)First-handThread
r/GoogleAnalyticsInstall trouble on an older Mac; replies suggest Docker or calling the API directly (17 Oct 2026)First-handThread
r/ClaudeAIOn client accounts, explaining a new Google Cloud identity to the client is awkward (2 Apr 2026)QuestionThread
r/analyticsDoes AI get basic data retrieval wrong? Top replies: assume it can, validate, and have it write the query rather than do the maths (17 Jun 2026)OpinionThread

Videos worth watching

Short answer: Google's own setup tutorial is the best walkthrough of the Cloud project and credentials, and its launch video shows the kind of questions that work. An independent tutorial shows the Claude Code side, including what went wrong.

Made by the Google Analytics channel, 3 September 2025. It does not sell anything. It uses Gemini as the client, but the Cloud project and credential steps are the same for Claude.

Made by the Google Analytics channel, 22 July 2025. It does not sell anything. It predates the October 2026 write tools.

Made by an independent developer channel, 14 August 2026. No product pitch in the opening description. Useful because it shows the setup problems as well as the fix.

VideoChannelDateWhat it covers
Google Analytics MCP Setup TutorialGoogle Analytics3 Sep 2025Cloud project, credentials
Introducing the Google Analytics MCP ServerGoogle Analytics22 Jul 2025What it can answer
Connect Google Analytics to Claude Code with MCP (Step-by-Step)An independent developer14 Aug 2026Claude Code setup, problems
Connect Google Analytics 4 to AI for Free (Claude + ChatGPT, Official Google MCP)An analytics creator21 Oct 2026Official server vs paid connectors
How to connect Google Analytics to ClaudeCoupler.io Academy26 May 2026A vendor's connector route
Permissions & Tool Allowlists in Claude Code: Control What Runs AutomaticallyA Claude tutorial channel1 Aug 2026Allow, ask and deny rules

Sources

SourceWhat it supportsDate
Google Analytics MCP READMETools, scopes, Claude Code commandRead 17 Nov 2026
Google Analytics MCP releases0.8.0 and 1.1.0 dates22 Oct and 6 Nov 2026
Google's GA MCP pageRead-only descriptionRead 17 Nov 2026
GA4 access managementViewer role, data restrictionsRead 18 Nov 2026
Data API limits and quotasToken quotas in the chartUpdated 10 Nov 2026
GA4 property limits30 key events per standard propertyRead 16 Nov 2026
Manage OAuth clientsCreating the OAuth clientRead 18 Nov 2026
gcloud revoke referenceRevoking local credentialsRead 18 Nov 2026
Claude Code permissionsDeny, ask, allow order; MCP namesRead 18 Nov 2026
Claude Code MCPclaude mcp list and removeRead 18 Nov 2026
Get started with connectorsTool permissions in the Claude appRead 17 Nov 2026
Custom connectors (help)Allow always guidanceRead 17 Nov 2026
Claude Connectors DirectoryNo Google-made GA4 connectorRead 18 Nov 2026
X and Reddit postsPractitioner reports, linked aboveJul 2025 to Nov 2026

Want it set up and checked on your property?

A read-only GA4 connection takes an afternoon if the access is right, and much longer if it is not. I can set it up with the right roles and permissions, check the numbers against your reports, and build the weekly questions your team actually asks. See Claude consultant or analytics and tracking, and the rates on the pricing page.

Keep reading: Claude MCP connectors for marketing, What is a marketing MCP server? and Claude and Google Tag Manager.

This article expands on my post on LinkedIn ↗.

FAQ

How do I connect Claude to Google Analytics?

The official route is Google's open-source Google Analytics MCP server. Turn on the Analytics Admin and Data APIs in a Google Cloud project, sign in with gcloud using the analytics.readonly scope, then add the server to Claude Code with the claude mcp add command from Google's README.

Is there an official Google Analytics connector in Claude's directory?

No. On 18 November 2026 Claude's Connectors Directory has no GA4 connector made by Google. Third-party connectors such as Supermetrics, Funnel and Adspirer can reach GA4, but the vendor then holds your access.

Can Claude change my Google Analytics settings?

Only if you let it. Google's server is read-only by default; its three write tools (annotations, custom dimensions and key events) load only with the --allow-write flag and the analytics.edit scope, and they also need the right GA4 role.

What GA4 role should Claude's account have?

Viewer, on the one property it needs. A Viewer can see settings and data and use the APIs but cannot change the property, and you can add the No Cost Metrics or No Revenue Metrics restriction if Claude should not see them.

Why do Claude's GA4 numbers differ from the GA4 reports?

The server uses the Google Analytics Data API, which can differ from Explore and the standard reports depending on dimensions, filters and dates. Ask Claude to show the exact request it ran, and compare one figure with the same report in GA4.

Does connecting Claude to GA4 use API quota?

Yes. Every report Claude runs spends Data API tokens; a standard property allows 200,000 core tokens a day and 40,000 an hour, and Google says most requests cost 10 tokens or fewer. Other dashboards reading the same property share those quotas.

Can I use Google's GA4 server in the Claude app instead of Claude Code?

Not with a single click. Google documents Claude Code; to use the same server in the Claude app you would host it over HTTP with its own sign-in and add it as a custom connector. A third-party directory connector is the easier option there.

How do I disconnect Claude from Google Analytics?

Run claude mcp remove analytics-mcp, revoke the local Google credentials with gcloud auth application-default revoke, and remove the account from GA4 under Property access management. For a directory connector, disconnect and remove it under Customize, then Connectors.

Does the same method work for Google Ads or HubSpot?

Yes. Use a low-permission user, a read-only scope where one exists, the server's own read-only setting, and blocked write tools in Claude. For Google Ads that means a Read only user and the labels and assets tools switched off; for HubSpot, its manage tools set to Blocked or Needs approval.