Guide · GA4 · Claude
How to connect Claude to Google Analytics, and keep it read-only
GA4 is the easy one. Unlike Google Ads, it has a scope that only reads, and Google’s own server asks for that one by default. Here is the route for each Claude you might be using, checked on 31 October 2026.
Short answer: run Google’s open-source Google Analytics MCP server on your computer and add it to Claude Desktop or Claude Code, or add a hosted connector by its address in Claude’s Connectors settings. Either way, sign in with a Google user that can see your GA4 properties. Give it the analytics.readonly scope, and Claude can run reports but cannot change your property.
Which Claude are you using?
The route depends on where your Claude runs. A connector added in claude.ai is called from Anthropic’s cloud, so it can only reach a server at a public web address. A server that runs on your own machine needs Claude Desktop or Claude Code.
| Where you use Claude | What it can connect to | Where you add it |
|---|---|---|
| claude.ai, the desktop app and the mobile apps (custom connector) | A server at a public HTTPS address | Pro and Max: Customize > Connectors > + Add > Add custom connector. Team and Enterprise: an Owner adds it in Organization settings > Connectors. The Free plan allows one custom connector. |
| Claude Desktop, with a local server | A server that runs on your own computer | Settings > Developer > Edit Config, which opens claude_desktop_ |
| Claude Code | Either kind | The claude mcp add command |
Plans and menu names from Anthropic’s help article on custom connectors, checked on 31 October 2026. The labels have moved before, so look for Connectors if yours read differently.
Or try Climent Ads on one of your own accounts: 14 days, no cardRoute 1: Google’s open-source server on your computer
Google publishes the code at github.com/googleanalytics/google-analytics-mcp. It is read-only unless you switch writing on, and it is the cautious option. The tools it lists are further down.
- A Google Cloud project with two APIs enabled: the Google Analytics Admin API and the Google Analytics Data API. GA4 has no developer token and no access level to apply for.
- Credentials with the read-only scope. The README uses Application Default Credentials:
gcloud auth application-default loginwith your OAuth client file and two scopes,https://www.googleapis.com/andauth/ analytics.readonly https://www.googleapis.com/. The command prints where it saved the credentials file. Keep that path.auth/ cloud-platform - Python 3.10 or newer, and pipx, the tool that runs the server without installing it for good.
- The server in Claude’s config. In Claude Desktop, open Settings > Developer > Edit Config and add the block below, then restart the app.
claude_desktop_config.json, with your own path and project
{
"mcpServers": {
"analytics-mcp": {
"command": "pipx",
"args": ["run", "analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/application_default_credentials.json",
"GOOGLE_CLOUD_PROJECT": "your-cloud-project-id"
}
}
}
}
The README shows this block for Gemini; Claude Desktop reads the same mcpServers format.
In Claude Code
The same server is one command: claude mcp add analytics-mcp --scope user -e "GOOGLE_APPLICATION_.
Check that it works
To check it works, ask Claude which Google Analytics properties it can see. That calls get_account_summaries, and an empty list means the Google user behind the credentials has no access to any property.
And from claude.ai or your phone?
Then the server has to live at a public address. Google also runs one for the Data API at https://analyticsdata.. On 31 October 2026 it answered a connection and listed four tools, all marked read-only: run_report, get_metadata, run_realtime_report and check_compatibility. Its reference page in Google’s developer docs returned an error the same day, so I have not written up how to sign in to it from claude.ai. Until Google documents it, treat it as one to watch, not one to set up.
What Google’s server can do
Nine tools, and only one of them writes:
| Tool | What it does |
|---|---|
get_account_summaries | Lists the accounts and properties your Google user can see |
get_property_details | Describes one property |
list_google_ads_links | Shows which Google Ads accounts the property is linked to |
list_property_annotations | Reads the annotations on a property |
get_custom_dimensions_ | Lists your custom dimensions and metrics |
run_report | Runs a report through the Data API |
run_funnel_report | Runs a funnel report |
run_realtime_report | Runs a realtime report |
create_property_ | Adds an annotation. The only tool that writes, and it is off unless you start the server with --allow-write |
So out of the box, Claude can list your properties, read their setup and run reports. To let it add annotations, you start the server with --allow-write and sign in with the edit scope as well.
Route 2: a hosted connector
A vendor runs the server, and you paste its address into Claude. On Pro or Max: Customize > Connectors > + Add > Add custom connector, a name, the address, then Add. Claude finds the sign-in on its own, and you sign in with the Google account that sees your GA4 properties. In each conversation, switch the connector on from the + menu.
Before you click Allow on Google’s screen, check three things:
- The scope it asks for. “See your Google Analytics data” is the read-only one. If the screen also asks to edit your Google Analytics management entities, the connector can change your property.
- Whose app you are signing into. The consent screen names the app. It should match the vendor you chose.
- Where your data goes. A hosted server sees every answer it sends to Claude. If you manage clients, that is their data, not yours.
Climent Ads has its own server in the hosted app. It is in testing, behind OAuth, and it reads the data already imported into the console rather than calling Google live.
Route 3: build your own
If you want your own tools, you need the same Cloud project, the two APIs, an OAuth client and a consent screen. A public app needs Google’s verification first. MCP vs API covers what changes once the model picks the calls.
Or try Climent Ads on one of your own accounts: 14 days, no cardWhat Claude can change once it is connected
GA4 differs from Google Ads here. The Google Ads API has one scope, and it writes. Google Analytics has a read-only scope, so you can lock it at the sign-in. There are three places to keep Claude reading:
| Lock | What it stops | Where you set it |
|---|---|---|
| The scope | With analytics.readonly, nothing the connector asks for can change the property. | The sign-in, or the gcloud command for a local server |
| The server’s tools | Claude cannot call a tool that does not exist. Google’s server only adds its one writing tool with --allow-write. | Your choice of server and how you start it |
| The Google user’s role | A user with the Viewer role can see reports and cannot edit the property. | GA4 > Admin > Account access management, or Property access management |
For a client’s property, the cleanest setup is a Google user with the Viewer role on that property, and you sign in to the connector with that one.
Reading has its own traps. Claude writes the report request itself, so check the date range, the dimensions and the filters before you trust a total. The last two or three days are still filling in. And GA4 counts sessions and conversions its own way, so its numbers will not match the ad platforms’. Reading Google and Meta together covers what to line up first.
Why GA4 and the ad platforms give you different conversion countsQuestions people actually ask
Does Google have an official Google Analytics connector for Claude?
Google publishes an open-source Google Analytics MCP server, and you run it yourself in Claude Desktop or Claude Code. Google also runs a remote endpoint for the Data API, but on 31 October 2026 its reference page returned an error, so I found no documented address to paste into claude.ai.
Can Claude change my GA4 property?
Not with the read-only scope. Google’s server only has one tool that writes, for annotations, and it is off unless you start the server with --allow-write and add the edit scope. A Google user with the Viewer role cannot edit the property either.
Which GA4 role should I give the Google user?
Viewer, on the properties Claude needs. It can see reports and data, and it cannot change settings, events or access. If you only want one property, grant the role on that property, not the whole account.
Which Claude plan do I need?
Custom connectors work on Free, Pro, Max, Team and Enterprise. The Free plan allows one. On Team and Enterprise an Owner adds the connector and each member connects their own account. A local server only needs Claude Desktop or Claude Code.
Can I connect a client’s GA4 property?
Yes, if your Google user has access to it. Ask the client for the Viewer role on that property and sign in with that user, so the connector can read their reports and cannot change their setup.
Is it free?
Google’s server and the Google Analytics APIs cost nothing at normal use. You pay for your Claude plan. A hosted connector has its own price.
Related reading
- How to connect Claude to Google Ads. Google’s server, a hosted connector or your own, and why the access level does the locking there.
- How to connect Claude to Meta Ads. Meta hosts its own connector, so the setup is shorter, and the permissions matter more.
- Google Analytics MCP: the options. Official, third-party and ours, and what each one reads.
- Marketing attribution. Why GA4 and the platforms never agree on conversions.
- Connect your AI to your ad data. The same choice across Meta, Google and GA4, for any assistant.
- What is MCP. The standard behind every connector, in plain words.
Written by Manuel Climent · Last updated:
Who wrote this
I’m Manuel Climent, Manu to most people. I’m a media buyer, and I built Climent Ads Assistant because no ads software I paid for was worth it. It reads Meta, Google Ads, GA4 and Search Console one client at a time, and changes a campaign only through a proposal that a person signs in the product.