deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Google's official Analytics MCP server gives AI agents read-only access to GA4 data

Google ships an experimental MCP server for Google Analytics, letting Gemini and Claude clients query GA4 reports directly under a read-only scope. Setup runs through pipx with Application Default Credentials.

Google's official Analytics MCP server gives AI agents read-only access to GA4 data

What shipped

Google now maintains a first-party Model Context Protocol (MCP) server for Google Analytics, published in the googleanalytics GitHub organisation. According to a dev.to post by Nokka that reviews the repository and Google's developer documentation, the project lets AI clients such as Gemini CLI and Claude Code read Google Analytics data directly, instead of forcing users to export CSV reports and hand them to a model.

The protocol behind it has moved fast. MCP is the open standard Anthropic introduced in November 2024 for wiring models up to external tools and data. The dev.to post, citing Anthropic and coverage by Knak, reports SDK downloads of roughly 100,000 in the first month, growing to about 97 million per month by March 2026. On 9 December 2025, Anthropic donated MCP to the Agentic AI Foundation under the Linux Foundation, co-founded with Block and OpenAI and supported by Google, Microsoft, AWS, Cloudflare and Bloomberg. The post's reading is that this vendor-neutral governance is what made Google comfortable shipping its own server.

Repository figures cited in the post: Apache-2.0 licence, created 16 July 2025, last updated 7 August 2026, 3,203 stars, 690 forks, 9 contributors, and a latest release of 0.7.0 from 29 July 2026. PyPI statistics quoted by the author show the analytics-mcp package at around 73,067 downloads per month, roughly 23 times its star count — a ratio the author computed themselves. Their interpretation is that because the recommended install path runs through pipx without cloning anything, most users never visit the repo to star it. That explanation is the author's, not a statement from Google.

What the server can do

The server exposes seven tools grouped into three categories, per the repository's README:

  • Account data: get_account_summaries, get_property_details and list_google_ads_links
  • Core reporting: run_report (via the Data API), run_funnel_report and get_custom_dimensions_and_metrics
  • Real-time: run_realtime_report

The funnel tool is the standout. Conversion funnels normally have to be configured in the Google Analytics interface, so calling them programmatically lets an agent answer questions like "where are users dropping out" without someone building the report first.

Google's documentation also suggests example prompts that go beyond simple retrieval — from "how many users did I have yesterday" to "I have a $5,000 monthly marketing budget and want more revenue, build me a data-driven plan". The second kind requires the model to pull several datasets and reason across them, which is the use case MCP exists for.

Setup, credentials and scope

Installation requires Python 3.10 or newer and pipx. The labour-intensive part is authentication: users must configure Application Default Credentials, and the account involved needs access to the relevant Google Analytics property. Google provides gcloud commands for either a user login or a service-account impersonation flow.

Notably, the scope is analytics.readonly. The agent can read reporting data but cannot modify anything in the property, which the dev.to post flags as a sensible safety property for anyone pointing an AI at production analytics.

Caveats before adopting

A few things the post highlights for prospective users:

  • The project still carries an Experimental label despite its download volume, so the team is not calling it stable — relevant for client-facing work.
  • Google's own developer documentation was last updated 16 September 2025 while the code moved on to August 2026, so the README is the more reliable reference.
  • Google publishes other MCP servers, including googleapis/mcp-toolbox (16,405 stars) and gcloud-mcp (903 stars). The Analytics server is not the most-starred Google project, but it is the one aimed squarely at web analytics.
  • The author discloses that they did not install or run the server, that all figures were pulled from live APIs on the day of writing and will shift, and that the post itself was AI-assisted.

Why it matters

GA4 data has traditionally lived behind a reporting interface built for analysts, which is friction for everyone else. An official MCP server turns the reporting API into something an agent can query conversationally, and the read-only scope keeps the risk of giving a model that access low. It is also a signal of where developer tooling is heading: first-party MCP servers from major platform vendors look set to become the default way data systems expose themselves to agents, now that the protocol has foundation governance and adoption measured in tens of millions of monthly downloads.

  • #mcp
  • #google-analytics
  • #ai-agents
  • #developer-tools
  • #gemini

Related posts