Google Analytics Has an Official MCP: Web Analytics Is Now Just Asking an AI

An illustration of a microphone pointed at a bar chart and a pie chart

Google Analytics, the web analytics tool, now has an official MCP. AI agents such as Codex and Claude Code can analyze your traffic data directly. This was exactly the combination I had been wanting, so I set it up straight away.

What it makes possible

MCP is a common standard for connecting AI to outside services. Connect Google’s official MCP server (google-analytics-mcp) and asking your AI to analyze your traffic, in plain language, is enough for it to fetch and analyze the Analytics data itself.

That it comes from Google officially is reassuring in itself. Setup instructions are published on the official GitHub page.

Setup can be handed to the AI

The configuration steps are somewhat involved, but the AI-era approach applies here too. Give the GitHub page’s URL to your AI agent and ask how to set it up. If you get stuck partway, reporting the error as it appears is enough for it to correct course. Keep the conversation going and the configuration will complete.

How loose the instructions can be

Once it is in place, the vagueness you can get away with is surprising.

  • “Analyze traffic for the last 30 days”
  • “Tell me which articles grew and which fell compared with last month”
  • “What kind of analysis would be worth doing with this MCP?” — asking about the uses themselves

Many people stopped being able to find their way around the interface after GA4 arrived; I had stopped looking at Analytics closely myself. Removing the need to learn the interface, and leaving only asking what you want to know, changes the relationship with web analytics at the root.

Combine with gogcli to output to a spreadsheet

Combined with gogcli, which operates Google services from the CLI, you can automate as far as writing the results to a spreadsheet on Google Drive. Analysis, reporting, and sharing complete in one run of instructions.

In summary

This is the combination to try if you want to use your data to improve your articles but find the analytics interface tiresome. Routine blog-running work, such as identifying which articles to rewrite, gets considerably lighter.

This article is adapted for AI Jiten from testing notes originally published on the author’s blog, Delaymania.

Search this site