Google Analytics MCP logo

Google Analytics MCP

An MCP server that provides [describe what your server does]

Install Google Analytics 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-mcp": {
      "command": "uvx",
      "args": [
        "google-analytics-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 12 tools correctly (11d ago).

Overview

Tools12

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

Verified live~3.0k 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 2d ago

Recent health check succeeded.

8/8 checks healthy over the last 50d

What it can do

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

Handles credentials · 2Makes network requests · 7Read-only tools · 12
Network at startup3 connections
Files written at startup30

Observed 2026-10-17 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 12d ago via OSV.dev · google-analytics-mcp (PyPI)

Adoption & maintenance

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

GitHub stars243Stargazers on the source repository.
Last commit2d 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 exposed12Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

Google Analytics MCP Logo

Google Analytics 4 (GA4) MCP Server 📊

Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents.

CI PyPI version npm version OpenSSF Scorecard License: MIT

🌐 Live Documentation & Web Portal: https://ga4mcp.com/


⚡ Quickstart

bash
# 1-Line Universal Installer (Auto-configures Claude Desktop, Cursor, Claude Code, Antigravity, VS Code, Zed, Windsurf)
curl -fsSL "https://ga4.builditwithai.xyz/install" | bash

# Or run directly via your preferred runtime:
uvx google-analytics-mcp
uvx --from google-analytics-mcp ga4-mcp-server
python -m ga4_mcp
npx -y @surendranb/google-analytics-mcp


🤖 Client Setup

A. Claude Code (CLI)

Terminal
claude mcp add google-analytics -- uvx google-analytics-mcp

B. Cursor & Google Antigravity (mcp.json)

config.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": ["google-analytics-mcp"]
    }
  }
}

C. Claude Desktop (claude_desktop_config.json)

config.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "uvx",
      "args": ["google-analytics-mcp"],
      "env": {
        "GA4_PROPERTY_ID": "your_ga4_property_id",
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service_account.json"
      }
    }
  }
}

D. VS Code (Cline / Roo Code / Continue)

config.json
{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": ["-y", "@surendranb/google-analytics-mcp"]
    }
  }
}

🛠️ Tools & Capabilities

Tool NameParametersDescriptionReturn Type
get_ga4_datadimensions (list), metrics (list), date_ranges (list), limit (int)Runs multi-dimensional GA4 reports with automated metric totals and server-side aggregation.JSON / Markdown
list_accounts(none)Lists all accessible Google Analytics accounts and permission levels.JSON
list_propertiesaccount_id (optional)Lists all GA4 properties associated with an account.JSON
get_property_metadataproperty_id (optional)Fetches complete dimension and metric schemas, custom definitions, and compatibility rules.JSON
run_realtime_reportmetrics (list), dimensions (list)Queries real-time active users and event counts from the last 30 minutes.JSON
search_skillsquery (string)Searches built-in GA4 analytical playbooks (e-commerce, channel attribution, bot filtering).Markdown
skill_readskill_name (string)Dynamically loads procedural skills and analytical guides from GitHub.Markdown
skills_list(none)Lists all available live GA4 analytical skills.JSON

🧠 Dynamic Skills & Guided Playbooks

This server ships with built-in analytical recipes that load dynamically from GitHub:

  • traffic-diagnosis: Step-by-step root cause analysis for sudden traffic drops.
  • channel-acquisition: Best-practice channel grouping and attribution modeling.
  • ecommerce-analysis: Revenue, item purchase rate, and conversion funnel analysis.
  • ai-referral-analysis: Tracks and isolates referral traffic from ChatGPT, Claude, Perplexity, and Gemini.

🔒 Telemetry & Privacy

This package collects anonymous, non-PII diagnostic telemetry (command executions, latency, error codes) to improve tool reliability. No queries, user credentials, personal data, source code, or environment variables are ever collected or stored.

You can opt out anytime by setting either of the following environment variables:

server.ts
export DO_NOT_TRACK=1
# or
export MCP_TELEMETRY_OPT_OUT=1

📄 License

MIT License. See LICENSE for details.

Reviews

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

Frequently Asked Questions about Google Analytics MCP

google-analytics-mcp is an MCP server that connects AI agents to Google Analytics 4 for real-time query exploration, schema discovery, metric aggregation, and audience insights. It provides tools to query GA4 reports, inspect accounts, properties, dimensions, metrics, and compatibility rules, run real-time reports, and access analytical skills for guided investigations.

Use the get_ga4_data tool to run multi-dimensional GA4 reports. Provide dimensions, metrics, date ranges, and an optional result limit; the server returns JSON or Markdown with automated metric totals and server-side aggregation.

Use get_property_metadata to fetch a property’s complete dimension and metric schemas, custom definitions, and compatibility rules. You can use list_accounts and list_properties first to identify accessible accounts and GA4 properties.

Yes, run_realtime_report queries active users and event counts from the last 30 minutes. The tool accepts lists of metrics and dimensions and returns the real-time report.

Install it with uvx google-analytics-mcp or npx -y @surendranb/google-analytics-mcp. For Claude Desktop, configure the server command and set GA4_PROPERTY_ID plus GOOGLE_APPLICATION_CREDENTIALS to the GA4 property ID and service-account credentials path.

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