Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

google-analytics-mcp

MCP server by surendranb Community

Connects AI assistants to Google Analytics 4 for schema discovery, multi-dimensional reports and real-time queries. Includes guided analysis playbooks for traffic drops, channels and e-commerce. Built for analysts and marketers who use AI agents with GA4 data.

  • Score 82
  • 242 stars
  • MIT
  • Updated

Install google-analytics-mcp

Built from the published package, never by AI.

claude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -- uvx google-analytics-mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install google-analytics-mcp in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the google-analytics-mcp block.

About

google-analytics-mcp is a Model Context Protocol server for Google Analytics 4. It gives AI assistants tools to list accounts and properties, fetch property metadata including dimension and metric schemas, and run multi-dimensional GA4 reports with metric totals and server-side aggregation. It also includes a real-time report that covers the last 30 minutes.

The server ships with guided analytical skills that load dynamically from GitHub. These cover traffic diagnosis, channel acquisition, e-commerce analysis and AI referral analysis, which tracks referral traffic from ChatGPT, Claude, Perplexity and Gemini. It is aimed at analysts and marketers who want an AI agent to query GA4 data. It can be run with uvx or npx and is released under the MIT License.

Written from the project's README and checked against it.

Tools it gives your assistant

  • get_ga4_dataRuns multi-dimensional GA4 reports with automated metric totals and server-side aggregation.
  • list_accountsLists all accessible Google Analytics accounts and permission levels.
  • list_propertiesLists all GA4 properties associated with an account.
  • get_property_metadataFetches dimension and metric schemas, custom definitions and compatibility rules.
  • run_realtime_reportQueries real-time active users and event counts from the last 30 minutes.
  • search_skillsSearches built-in GA4 analytical playbooks such as e-commerce and channel attribution.
  • skill_readLoads procedural skills and analytical guides from GitHub.
  • skills_listLists all available live GA4 analytical skills.

What you need

  • A Google Analytics 4 property
  • Google service account credentials file
  • GA4 property ID
  • Python with uvx, or Node.js with npx
SettingNeededWhat it is
GOOGLE_APPLICATION_CREDENTIALSEnvironment variable, secretRequiredAbsolute path to your Google Cloud service account JSON key with GA4 property access.
GA4_PROPERTY_IDEnvironment variableRequiredNumeric GA4 Property ID to query, for example 123456789.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Run a GA4 report of sessions by channel group for the last 30 days.
  • Show me the real-time active users and event counts for my property.
  • Find referral traffic from ChatGPT and Perplexity in my GA4 data.

Good to know

  • Real-time reports only cover the last 30 minutes.
  • Collects anonymous diagnostic telemetry unless opted out.
  • Analytical skills are loaded from GitHub at runtime.

Security check

C
  • Downloads a script from the internet and runs itIn README.md: curl -fsSL "https://ga4.builditwithai.xyz/install" | bash

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to google-analytics-mcp

All alternatives →
World Monitor koala73
98

World Monitor is a real-time global intelligence dashboard covering conflict, markets, energy, trade, shipping and cyber. Its MCP server gives AI assistants access to that data, and it is aimed at analysts, agents and scripts.

ACA Remote 91k
Power BI Authoring MCP Server (Local) microsoft
95

Lets AI agents create and change Power BI semantic models through a local MCP server. Built for developers who want natural language modeling in Power BI Desktop, Fabric workspaces and PBIP files.

AAA Local 9.7k/wk
Seal Open Data ariacom
95

Seal Open Data serves French public datasets from data.gouv.fr to AI assistants. It covers topics such as territories, companies, housing and population. It is aimed at users who want to query French open data from clients like Claude.

AAA Remote 1.7k
OpenMetadataopen-metadata
94

OpenMetadata MCP server lets MCP-compatible assistants search metadata, inspect lineage, and manage data quality tests. It is for data teams and AI agents that need governed context about enterprise data.

AAA Remote 16k
Flint Chart MCP microsoft
94

Compiles, validates and renders semantic chart specs for AI assistants through the Model Context Protocol. It is for agents that need reliable, good-looking and interactive charts across several chart libraries.

AAA Local 4.6k
PostHog PostHog
94

Query PostHog analytics, manage feature flags and experiments, and investigate errors from your AI assistant. It suits product teams and developers who already use PostHog for analytics, replays, and error tracking.

AFA Remote 41k

Compare with World Monitor, Power BI Authoring MCP Server (Local) or Seal Open Data

google-analytics-mcp: common questions

Does google-analytics-mcp collect my data?

The source says it collects anonymous, non-PII diagnostic telemetry such as command executions, latency and error codes. It states that no queries, user credentials, personal data or environment variables are collected.

How do I turn off telemetry in google-analytics-mcp?

Set either DO_NOT_TRACK=1 or MCP_TELEMETRY_OPT_OUT=1 as an environment variable. The source says you can opt out at any time this way.

Which analytical skills does the GA4 MCP server include?

The source lists traffic-diagnosis, channel-acquisition, ecommerce-analysis and ai-referral-analysis. These load dynamically from GitHub.

How do I install google-analytics-mcp?

In Claude Code run claude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -- uvx google-analytics-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is google-analytics-mcp the official server?

google-analytics-mcp is a community project by surendranb, not verified by a company domain.

Is google-analytics-mcp free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is google-analytics-mcp safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality B. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.

What are alternatives to google-analytics-mcp?

Similar MCP servers: World Monitor, Power BI Authoring MCP Server (Local), Seal Open Data, OpenMetadata.

Does google-analytics-mcp work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

google-analytics-mcp Install

Add to stack

Loading.