google-analytics-mcp

Google Analytics 4 data to AI agents, agentic workflows, and MCP clients. Give agents analysis-ready access to website traffic, user behavior, and performance d

What is google-analytics-mcp?

Google Analytics 4 data to AI agents, agentic workflows, and MCP clients. Give agents analysis-ready access to website traffic, user behavior, and performance data with schema discovery, server-side aggregation, and safe defaults that reduce data wrangling.

Overview of google-analytics-mcp

What it is

Google Analytics 4 (GA4) MCP Server is a Model Context Protocol (MCP) server that provides AI agents, agentic workflows, and MCP clients with analysis-ready access to GA4 data. It enables schema discovery, server-side aggregation, and safe defaults to reduce data wrangling. The server supports real-time query exploration, metric aggregation, and audience insights.

Key features

  • Multi-dimensional GA4 reports with automated metric totals and server-side aggregation via get_ga4_data
  • Account and property listing (list_accounts, list_properties)
  • Complete dimension and metric schema discovery with custom definitions and compatibility rules (get_property_metadata)
  • Real-time active users and event counts from the last 30 minutes (run_realtime_report)
  • Built-in analytical playbooks for e-commerce, channel attribution, bot filtering, and AI referral analysis (search_skills, skill_read, skills_list)
  • Dynamic skills that load procedurally from GitHub (traffic-diagnosis, channel-acquisition, ecommerce-analysis, ai-referral-analysis)

Use cases

  • Diagnose sudden traffic drops using the traffic-diagnosis skill - Analyze e-commerce revenue, item purchase rate, and conversion funnels - Perform channel grouping and attribution modeling - Track and isolate referral traffic from AI sources (ChatGPT, Claude, Perplexity, Gemini)
  • Run real-time reports for active users and event counts - Explore GA4 property metadata and custom definitions

Getting started

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 For client-specific configuration (Claude Code, Cursor, Claude Desktop, VS Code), see the repository README.

License and pricing

Licensed under the MIT License. The project is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/surendranbgoogle-analytics-mcp.svg)](https://yunodb.com/tools/surendranbgoogle-analytics-mcp?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/surendranbgoogle-analytics-mcp?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/surendranbgoogle-analytics-mcp.svg" alt="Featured on YunoDB" height="20"></a>