Google Analytics 4 logo

Google Analytics 4

Read-only MCP access to GA4 reports, realtime data, metadata, administration, diagnostics, and audience exports.

Install Google Analytics 4

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "google-analytics-4": {
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "YOUR_VALUE_HERE",
        "GA4_CLIENT_SECRET": "YOUR_VALUE_HERE",
        "GA4_REFRESH_TOKEN": "YOUR_VALUE_HERE",
        "GA4_PROPERTY_ID": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env GA4_CLIENT_ID=YOUR_VALUE_HERE --env GA4_CLIENT_SECRET=YOUR_VALUE_HERE --env GA4_REFRESH_TOKEN=YOUR_VALUE_HERE --env GA4_PROPERTY_ID=YOUR_VALUE_HERE --transport stdio google-analytics-4 -- npx -y @getmcpads/google-analytics-mcp-server

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 27 tools correctly ().

Overview

Google Analytics 4 MCP server connects AI clients to the Google Analytics Data API and Admin API through 27 read-only tools. It supports core and realtime reports, funnels, pivots, metadata inspection, property administration, audience exports, and diagnostics for ecommerce, BigQuery, tagging, and quotas. Local use requires Google OAuth credentials and a compatible stdio MCP client, with an optional property ID to simplify requests. Reach for it when an agent needs to inspect GA4 data or configuration without changing the analytics account.

Use cases

  • Run GA4 traffic and conversion reports
  • Inspect dimensions, metrics, and query compatibility
  • Diagnose ecommerce and BigQuery export coverage
  • Review property configuration and accessible resources
  • Query existing audience export snapshots

Key features

  • 27 read-only Data API and Admin API tools
  • Core, realtime, pivot, batch, and funnel reporting
  • Metadata and dimension-metric compatibility checks
  • Ecommerce, audience, BigQuery, and tagging diagnostics
  • Property quota snapshots and configuration inspection
  • Default redaction for identifiers in audience-related results

Tools27

What Google Analytics 4 lets your agent do. Expand a tool for its parameters.

Verified live~7.7k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/18 checks healthy over the last 85d

What it can do

From the 27 tools this server returned when we ran it; 27 declare their own safety hints.

Handles credentials · 4Makes network requests · 27Read-only tools · 27
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age64 days
Maintainers1

Observed 2026-11-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @getmcpads/google-analytics-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads949Package downloads in the last 30 days.
Last commit27d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed27Callable tools this server registers over MCP.

How Google Analytics 4 works

What Google Analytics 4 MCP server does

Google Analytics 4 MCP server exposes read-only access to Google Analytics 4 through the Data API and Admin API. It provides 27 tools for discovering accessible accounts and properties, running reports, inspecting configuration, and diagnosing common analytics setup issues. No tool creates, edits, or deletes GA4 resources.

Reporting tools cover standard reports, realtime reports, pivot reports, batch report requests, configurable funnels, and the Data API v1alpha funnel endpoint. The server also provides metadata and compatibility checks so an agent can inspect available dimensions and metrics, validate a proposed selection, and check whether a combination is supported before running it.

Administration tools can list accounts, properties, and selected Admin API collections, including data streams, custom definitions, key events, audiences, product links, annotations, channel groups, expanded datasets, access bindings, and subproperty or rollup configuration. Other tools read property-level settings such as attribution, retention, Google Signals, reporting identity, and user-provided-data settings.

How it works

The server runs as a local stdio MCP process. An MCP client sends tool calls, and the process makes read requests directly to Google’s Data API or Admin API using the configured OAuth credentials. ga4_health_check can verify access and show reachable properties without exposing the configured secrets.

A default property can be supplied through GA4_PROPERTY_ID; otherwise, calls can identify the property themselves. Query planning, compatibility checks, and quota snapshots help an agent avoid invalid combinations and monitor the Data API property quota. Batch tools accept one to five independent reports or pivot reports for the same property.

Personal identifiers are redacted by default in access bindings and audience export results. The relevant tools accept an explicit opt-in to include them. Report results are not redacted, so callers should avoid requesting identifiers as report dimensions when conversation data may leave the local environment.

Setup and configuration

To run the Google Analytics 4 MCP server locally, use Node.js 22.12 or newer. In a Google Cloud project, enable the Google Analytics Data API and Google Analytics Admin API, then create a desktop OAuth client. Complete the consent flow with a Google account that can access the required properties and retain the resulting refresh token. The documented scope is analytics.readonly.

The source-release installation sequence is:

bash
git clone --branch v2.0.0 --depth 1 https://github.com/getmcpads-com/google-analytics-mcp-server.git
cd google-analytics-mcp-server
npm ci
npm run build

Configure the client to run Node with the absolute path to dist/cli.js, or use the npm package command shown in the client configuration. Set GA4_CLIENT_ID, GA4_CLIENT_SECRET, and GA4_REFRESH_TOKEN. GA4_PROPERTY_ID is optional and supplies a default property. Run the health check after configuration.

Tools and capabilities

  • Discover accessible accounts, properties, Admin resources, and property settings.
  • Run core, realtime, pivot, batch, and funnel reports.
  • Inspect dimensions, metrics, custom definitions, key events, channel groups, and compatibility rules.
  • Diagnose ecommerce coverage, audience exports, BigQuery export links, server-side tagging, and property quotas.
  • List existing audience export snapshots and recurring audience lists, then query existing export rows.
  • Read six catalog resources covering metrics, dimensions, compatibility rules, and workflow recipes.

Limitations and notes

The Google Analytics 4 MCP server is read-only by design. It cannot create audience exports, modify properties, edit data streams, or perform other writes. The standalone repository provides native API tools; hosted product features and MCP Apps interfaces are outside this release.

GA4 access is limited by the authenticated Google account and the APIs enabled in its Cloud project. The refresh token is sensitive and should be stored and managed accordingly. Reports can still return identifiers if they are explicitly requested as dimensions, because report rows are not subject to the export-specific redaction behavior.

The source release requires Node.js 22.12 or later and drops Node.js 18 and 20 support. The release instructions also distinguish the pinned GitHub source version from separately published npm and MCP Registry versions.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Google Analytics 4

Google Analytics 4 is an MCP server that connects AI clients to the Google Analytics Data API and Admin API. Its main tools run reports, inspect realtime data and metadata, list properties and Admin resources, query audience exports, and diagnose ecommerce, BigQuery, tagging, audience, and quota issues. All tools are read-only.

Install it by cloning the v2.0.0 source release, running `npm ci` and `npm run build`, then configuring an MCP client to execute `dist/cli.js`. Node.js 22.12 or newer is required. You must also provide a Google OAuth client ID, client secret, and refresh token.

It needs a Google OAuth client ID, OAuth client secret, and refresh token. Enable the Google Analytics Data API and Admin API in a Google Cloud project, create a desktop OAuth client, and authorize the `analytics.readonly` scope. A GA4 property ID is optional.

Yes, it works with Cursor through the standard local stdio MCP configuration. The README also names Claude Desktop and Claude Code as supported local clients. Configure Cursor to launch the server process and pass the required OAuth environment variables.

No, it cannot change a GA4 property. Every exposed tool calls a read method from the Data API or Admin API, so the server cannot create exports, edit settings, modify streams, delete audiences, or perform other write operations.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGoogle Analytics 4 AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/google-analytics-4?style=directory)](https://allmcps.com/mcp/google-analytics-4)
HTML Embed
<a href="https://allmcps.com/mcp/google-analytics-4"><img src="https://allmcps.com/api/badge/google-analytics-4?style=directory" alt="Google Analytics 4 on AllMCPs" /></a>