Menu

AI

Google Analytics MCP Server: Tools, Setup and Security

What Google's Analytics MCP server can do, how to connect it to Claude Code or Gemini, which scopes it needs and where its one write tool sits.

By: Irina ShvayaOctober 28, 2026

Google Analytics MCP Server: Tools, Setup and Security

This profile is part of our MCP server directory, within The MCP Guide. Profiles are checked against each vendor's own documentation. Need a server built? See MCP development.

The Google Analytics MCP server lets an AI app such as Claude Code, Cursor or Gemini read your GA4 accounts, properties and reports. Google publishes it as open-source Python code in its googleanalytics GitHub organization. You run it on your own machine, and it talks to the Google Analytics Admin API and Data API for you.

Checked against: Google Analytics MCP documentation on 28 October 2026. eSEOspace did not install or test this server.

If MCP is new to you, start with what an MCP server is. This profile covers what the server does, how to connect it and what to watch for.

Key Takeaways

  • Google publishes this server, and Google's docs page says it can't create, modify or delete your Analytics configuration or settings.
  • The GitHub README also lists one write tool, create_property_annotation, which stays off unless you pass --allow-write.
  • It runs locally with pipx and signs in through Google Application Default Credentials (ADC).
  • There is no hosted remote URL in Google's docs as of October 2026.
  • The README is titled "Experimental," so expect changes.

At a glance

ItemDetail
PublisherGoogle (googleanalytics GitHub organization)
Official?Yes
HostingLocal package (analytics-mcp on PyPI)
Transportstdio (the app launches it as a local process)
Sign-inGoogle Application Default Credentials (user OAuth client or service account)
Read or writeRead by default; one annotation write tool behind a flag
PriceNo separate MCP price listed; Google Analytics API quotas apply
Source codegithub.com/googleanalytics/google-analytics-mcp
Status"Experimental" in the README title

What it can do

The GitHub README groups the tools like this:

Account and property information

  • get_account_summaries: your Analytics accounts and properties.
  • get_property_details: details about one property.
  • list_google_ads_links: Google Ads accounts linked to a property.
  • list_property_annotations: annotations on a property.
  • create_property_annotation: creates an annotation. It needs the --allow-write flag and the analytics.edit scope.

Reports

  • run_report: a standard report through the Data API.
  • run_funnel_report: a funnel report.
  • get_custom_dimensions_and_metrics: custom dimensions and metrics for a property.
  • run_realtime_report: a realtime report.

Google's documentation page also lists a run_conversions_report tool, which the README did not list when we checked. The two sources differ, so confirm the tool list in your client after you connect.

Sample prompts from the README include "what are the most popular events in my Google Analytics property in the last 180 days?" and "were most of my users in the last 6 months logged in?"

How to connect it

Google's docs describe these steps:

  1. Install Python 3.10 or later and pipx (the docs also mention uv).
  2. Enable the Google Analytics Admin API and Data API in a Google Cloud project.
  3. Give your user or service account the Viewer role on the property.
  4. Set up Application Default Credentials with the read-only scope https://www.googleapis.com/auth/analytics.readonly.
  5. Add the server to your MCP client.

For Claude Code, the README gives this command:

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

For clients that use an mcpServers JSON block, the README shows:

{
  "mcpServers": {
    "analytics-mcp": {
      "command": "pipx",
      "args": ["run", "analytics-mcp"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON",
        "GOOGLE_CLOUD_PROJECT": "YOUR_PROJECT_ID"
      }
    }
  }
}

Google's docs name Claude Desktop, Claude Code, Cursor and Antigravity as clients. The docs page notes that Gemini CLI is deprecated, although the README still shows a Gemini setup.

Security notes

  • Keep the read-only scope. The server only needs analytics.readonly for reporting. Add analytics.edit only if you truly want the AI to write annotations.
  • Leave --allow-write off by default. Without it, the annotation tool is not enabled.
  • Your credentials file is the key. The ADC JSON file grants the same access as the Google account behind it. Store it like a password and never commit it to a shared repository.
  • Use least privilege. Google's docs ask for the Viewer role on the property, which is enough for reports.
  • Data leaves Google. Report rows go to whichever AI model your client uses. Check that this fits your privacy policy.

Our MCP security hub covers the wider risks, and excessive permissions explains why narrow scopes matter.

Alternatives

  • Microsoft Clarity MCP server: session recordings and behavior metrics, also local and official.
  • Google Ads MCP server: Google's read-only server for paid search data.
  • Google Search Console: we found no official Google MCP server as of 28 October 2026, only community-built projects.

Next step

Want GA4, Ads and your CRM in one AI workflow without risky access? See how we approach MCP for marketing teams, browse more MCP server profiles, or talk to us about Claude Code consulting.

Frequently asked questions

Can the Google Analytics MCP server change my GA4 settings?

Google's docs say it can't create, modify or delete your configuration or settings. The README adds one write tool for property annotations. That tool only works if you pass --allow-write and grant the analytics.edit scope.

Is there a hosted version I can connect by URL?

Not in Google's docs as of 28 October 2026. The server runs on your machine through pipx or uvx. Your AI app starts it as a local process.

Does it cost anything?

The code is free and open source. Google's docs list no separate MCP price. Normal Google Analytics API quotas still apply to the calls it makes.

Is it production-ready?

The README title calls it "Experimental." Google's docs page carries no status label. Treat it as a reporting helper and check results against the GA4 interface before you act on them.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.