Google Analytics 4 MCP logo

Google Analytics 4 MCP

Read-only GA4 reporting, metadata, realtime, funnel, and property administration through 17 MCP tools.

Install Google Analytics 4 MCP

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "google-analytics-4-mcp": {
      "command": "uvx",
      "args": [
        "scalably-ga4-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "YOUR_VALUE_HERE",
        "GA4_LOG_LEVEL": "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 GOOGLE_APPLICATION_CREDENTIALS=YOUR_VALUE_HERE --env GA4_LOG_LEVEL=YOUR_VALUE_HERE --transport stdio google-analytics-4-mcp -- uvx scalably-ga4-mcp

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

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

Overview

Google Analytics 4 MCP MCP server exposes read-only Google Analytics Data API and Admin API operations through 17 MCP tools. It uses a Google service account, discovers accessible properties, and returns standard, batch, pivot, realtime, funnel, metadata, compatibility, and administration results. Reach for it when an agent needs to inspect GA4 data or configuration without write access. Reports may be delayed, sampled, thresholded, or limited by Google Analytics quotas.

Use cases

  • Discover accessible GA4 properties and data streams
  • Run filtered historical and realtime analytics reports
  • Inspect GA4 dimensions, metrics, and compatibility
  • Analyze funnel step drop-off
  • Audit GA4 property access activity

Key features

  • 17 read-only GA4 Data API and Admin API tools
  • Standard, batch, pivot, realtime, and funnel reports
  • Property metadata and administration lists
  • Dimension and metric catalog with compatibility checks
  • Service-account authentication
  • Structured responses with quota and data-quality details

Tools17

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

Verified live~4.1k 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.

15/15 checks healthy over the last 67d

What it can do

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

Makes network requests · 17Read-only tools · 17
Network at startup2 connections
Files written at startup12

Observed 2026-11-08 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 3d ago via OSV.dev · scalably-ga4-mcp (PyPI)

Adoption & maintenance

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

Last commit2mo 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 exposed17Callable tools this server registers over MCP.

How Google Analytics 4 MCP works

What Google Analytics 4 MCP MCP server does

Google Analytics 4 MCP MCP server gives MCP clients read-only access to Google Analytics 4 through the Google Analytics Data API and Admin API. It can discover accounts and properties, inspect property configuration, query historical reports, retrieve realtime data, analyze funnels, and examine the dimensions and metrics available to a property.

The server does not modify GA4 configuration or data. Authentication uses a Google Cloud service account with the analytics.readonly scope. The service account can read properties where its email has been granted Viewer access.

How it works

Start by calling ga4_list_account_summaries to find the GA4 properties visible to the service account. Pass a discovered property_id to reporting and administration tools. Standard reports support dimension and metric filters, including nested boolean filter groups. The server also accepts batch requests containing up to five reports in one call.

Responses use a consistent JSON structure with status, operation, summary, target, result, proof, warnings, and recovery fields. A partial response can include proof.nextOffset, which indicates that the caller should continue from the returned offset. proof.propertyQuota reports remaining Data API quota, while proof.dataQualityLimited identifies results affected by sampling, thresholding, or high-cardinality row collapse into (other).

The Google Analytics 4 MCP MCP server runs locally and communicates with the Google APIs it wraps.

Setup and configuration

Create or select a Google Cloud project and enable both the Google Analytics Data API and Google Analytics Admin API. Create a service account, download its JSON key, and add the account email as a Viewer under each target property's access management settings.

Set GOOGLE_APPLICATION_CREDENTIALS to the JSON key path. No OAuth consent screen or per-client property configuration is required. The optional GA4_LOG_LEVEL variable accepts INFO by default or DEBUG for more detailed logging.

Claude Code can register the server with claude mcp add, and Codex can use codex mcp add, both with uvx scalably-ga4-mcp. Claude Desktop can use the ga4-mcp.mcpb file from a GitHub release.

Tools and capabilities

The 17 tools cover these areas:

  • Account and property discovery, property details, and data streams for web, iOS, and Android.
  • Custom dimensions, custom metrics, key events, audiences, Google Ads links, and reporting annotations.
  • Access reports covering who read what on a property during the previous 12 months.
  • Standard, batch, pivot, realtime, and funnel reports.
  • The GA4 dimension and metric metadata catalog plus dimension-and-metric compatibility checks.

ga4_run_realtime_report covers the last 30 minutes and uses a separate, smaller catalog. ga4_run_funnel_report supports up to 10 steps and uses the v1alpha API. The Google Analytics 4 MCP MCP server caps Data API responses at 250,000 rows.

Limitations and notes

Historical GA4 data commonly lags by 24 to 48 hours, while realtime reports cover only the recent 30-minute window. Results can be sampled, thresholded, or grouped into (other), so flagged responses should be treated as directional rather than exact.

Each quota bucket—core reports, realtime, and funnel—allows roughly 14,000 quota tokens per project and property per hour, although complex queries can consume more than one token. GA4 360 properties have a stated 10x multiplier. Quotas can vary, so verify Google's current quota documentation before depending on an exact value.

Funnel reporting is marked v1alpha and its response shape may change upstream. Batch calls are limited to five reports, funnel requests to ten steps, and client-supplied row limits above 250,000 are capped by the server. The server is licensed under MIT.

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 MCP

Google Analytics 4 MCP is an MCP server that connects AI clients to the Google Analytics Data API and Admin API. Its 17 read-only tools run standard, batch, pivot, realtime, and funnel reports, inspect metadata, check query compatibility, and list GA4 property configuration using a service account.

Install it with `uvx scalably-ga4-mcp` through the Claude Code or Codex MCP registration commands, or download the `ga4-mcp.mcpb` release file for Claude Desktop. Set `GOOGLE_APPLICATION_CREDENTIALS` to a service-account JSON key when using the command-line setup.

Authenticate with a Google Cloud service account rather than OAuth. Enable the Google Analytics Data API and Admin API, download the service-account JSON key, set `GOOGLE_APPLICATION_CREDENTIALS`, and grant the account Viewer access to each GA4 property it should read.

No. The server is read-only.

It documents Claude Code, Codex, and Claude Desktop integrations; other compatibility depends on the client's support for the server's MCP transport and configuration.

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 MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/google-analytics-4-mcp?style=directory)](https://allmcps.com/mcp/google-analytics-4-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/google-analytics-4-mcp"><img src="https://allmcps.com/api/badge/google-analytics-4-mcp?style=directory" alt="Google Analytics 4 MCP on AllMCPs" /></a>