Skip to content

What is Google Analytics MCP? Connecting GA4 data to your assistant, setup and read-only access

You ask your assistant about your site's traffic, conversions or real-time visitors; Google Analytics MCP pulls account and property summaries, custom dimensions and metrics and Google Ads links from your GA4 property, and runs standard, real-time, funnel and conversion reports. It is an open-source local MCP server in Google's googleanalytics repository (Apache-2.0, version 0.7.0). Google's page says it only accepts read requests and cannot edit configuration or settings; the credential scope is analytics.readonly. The README title labels the server "experimental". Setup requires Python (pipx), a Google Cloud project and two enabled APIs.

What it does
Lets your assistant read GA4 reports
Type
MCP server (local, open source)
Maker
Google
Read-only
Yes, at the scope level
Status
README: experimental
Setup
Needs a Cloud project + Python
Price
No fee for the server; API quotas apply

What does Google Analytics MCP do?

MCP is the standard that lets AI programs connect to outside tools. With Google Analytics MCP, the assistant queries GA4 data on your behalf: it reads account and property summaries, property details, linked Google Ads accounts, property annotations, and custom dimensions and metrics; it runs standard, real-time, funnel and conversion reports. All of it is read-only work.

YouYou ask about traffic or conversions
AssistantAn assistant that supports MCP
Google Analytics MCPOn your computer, via pipx
Your GA4 propertyStandard, real-time, funnel, conversion reports

Scope is analytics.readonly: it only reads and cannot change settings.

The tool count differs by source: the README lists seven tools, while the code on the repository's main branch defines nine (property annotations and the conversion report are not in the README). That is why no single number is given.

Who it's for: marketers and agencies who would rather ask an assistant than pull GA4 reports by hand. It is not suited to changing settings.

How do you install Google Analytics MCP?

Requirements: Python 3.10+ and pipx, the gcloud command line, a Google Cloud project with the Google Analytics Admin API and Data API enabled, and a Google user with access to the GA4 property. The commands are taken verbatim from the README.

  1. Install pipx.
  2. In your Google Cloud project, enable the Google Analytics Admin API and the Google Analytics Data API.
  3. Create Application Default Credentials with the analytics.readonly scope; note the credentials file path in the output.
  4. Add the server to your MCP client (tabs below) and restart the client.
Credentials (ADC)› 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
Add› claude mcp add analytics-mcp --scope user -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" -e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" -- pipx run analytics-mcp

The README gives steps only for Gemini and Claude Code; there is no official setup for other clients. The README text recommends GOOGLE_CLOUD_PROJECT while its examples use GOOGLE_PROJECT_ID (internally inconsistent). The --spec analytics-mcp==0.7.0 pinning format on the atlas card is not in the README.

How do you use Google Analytics MCP?

After setup, you write your request normally. Start by asking which properties you can access.

See properties"Use Google Analytics MCP to list the accounts and GA4 properties I can access."
Report"Show the 10 channels that brought the most sessions in the last 28 days, with session and conversion counts. Tell me which property you pulled it from."
Real time"How many active users are on the site right now, and on which pages?"

State which dimensions and metrics you want in a report; the Data API rejects incompatible combinations. For small audience groups, dimensions such as age and gender may be thresholded because of the privacy threshold.

Which clients does Google Analytics MCP work with?

Claude CodeYesThe README has a claude mcp add step.
Gemini CLI / Code AssistYesThe README has a settings.json step.
Other MCP clients (Cursor, Codex, etc.)UnclearNo official setup; some users report using it in issues.
Chat apps (claude.ai, ChatGPT)NoThe server runs locally; the docs describe no remote connector.

What does Google Analytics MCP access, and can it change settings?

Reads

Account and property summaries, property details, Google Ads links, property annotations, custom dimensions and metrics, standard/real-time/funnel/conversion reports.

Writes

Nothing: Google's page says configuration and settings cannot be edited; the credential scope is analytics.readonly.

Deletes

There is no delete tool.

Data

The results of the reports you run enter the context of the assistant you connected, meaning they go to the AI service you use. API calls carry analytics-mcp and its version as the user agent.

The README labels the server "experimental", and the PyPI package is in Beta status. Reports can include dimensions that contain personal data; be careful about what you have the assistant read.

GitHub Security Advisories and OSV are not covered here; whether any advisories are on record is not stated. That does not mean the server is "safe".

Is Google Analytics MCP free, and what are the quotas?

The server is open source and lists no fee. The Data API has quota limits rather than charges:

Property typeCore quota
Standard GA4 property200,000 tokens per day, 40,000 per hour; 10 concurrent requests
Analytics 360 property2,000,000 tokens per day, 400,000 per hour; 50 concurrent requests

Source: the Analytics Data API quotas page. Real-time and funnel reports have separate rows. For your Cloud project's billing, check your Google Cloud page. This is not financial advice.

Common problems and fixes

What happensWhat to do
On Windows, tool calls take minutes or hangThe release notes include stdio deadlock fixes (v0.4.0, v0.6.0); use the current version.
Reported by users "Failed to resolve analyticsadmin.googleapis.com" under Claude Code (macOS)Open issues (#179, #180); no official fix. The text points to the gRPC resolver; this is a user diagnosis.
"Tool object has no attribute inputSchema" on startupAn mcp SDK 2.0.0 incompatibility; the current package is pinned to mcp versions before 2 (issue #199 closed).

How do you remove Google Analytics MCP?

  1. Claude Code: run claude mcp remove analytics-mcp.
  2. Gemini: delete the analytics-mcp entry in settings.json.
  3. Credentials: delete the ADC file or run gcloud auth application-default revoke (the general gcloud method).

The official pages don't describe removal; the removal commands are the general method.

Frequently asked questions

Can Google Analytics MCP change my settings?

No. Google's page says it only accepts read requests and cannot edit configuration or settings; the credential scope is analytics.readonly. A proposal issue for write tools is open, but it is not an accepted feature (#224).

Is it experimental?

The README title says Experimental and the PyPI classifier is Beta. Google's developer page does not use the word experimental, but that page was last updated on September 16, 2025.

Which data goes where?

The results of the reports you run enter the context of the assistant you connected. The server runs locally and makes calls to the Google Analytics APIs.

Does it connect to Claude.ai?

No, there is no official way: the server runs locally, and the README gives steps only for Gemini and Claude Code.

Related guides

Sources

Not clear in the official sources: Data sampling behavior · how many tools each version has · security advisory status · an official record of removal steps · who owns the similarly named third-party package on PyPI · Turkish-language and local-currency information. Each is noted in the relevant section.