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.

Find your route ↓

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 ClaudeWhat it can connect toWhere you add it
claude.ai, the desktop app and the mobile apps (custom connector)A server at a public HTTPS addressPro 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 serverA server that runs on your own computerSettings > Developer > Edit Config, which opens claude_desktop_config.json
Claude CodeEither kindThe 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 card

Route 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.

  1. 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.
  2. Credentials with the read-only scope. The README uses Application Default Credentials: gcloud auth application-default login with your OAuth client file and two scopes, https://www.googleapis.com/auth/analytics.readonly and https://www.googleapis.com/auth/cloud-platform. The command prints where it saved the credentials file. Keep that path.
  3. Python 3.10 or newer, and pipx, the tool that runs the server without installing it for good.
  4. 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_CREDENTIALS=/path/to/file.json" -e "GOOGLE_CLOUD_PROJECT=your-project" -- pipx run analytics-mcp.

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.googleapis.com/mcp/v1. 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.

Or skip the setup: the Google Analytics MCP options, and what each one reads

What Google’s server can do

Nine tools, and only one of them writes:

ToolWhat it does
get_account_summariesLists the accounts and properties your Google user can see
get_property_detailsDescribes one property
list_google_ads_linksShows which Google Ads accounts the property is linked to
list_property_annotationsReads the annotations on a property
get_custom_dimensions_and_metricsLists your custom dimensions and metrics
run_reportRuns a report through the Data API
run_funnel_reportRuns a funnel report
run_realtime_reportRuns a realtime report
create_property_annotationAdds 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:

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 card

What 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:

LockWhat it stopsWhere you set it
The scopeWith 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 toolsClaude 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 roleA 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 counts

Questions 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.

Google Ads next? Its scope always writes, so the locks matter more

Related reading

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.