Google has launched an open-source Mannequin Context Protocol (MCP) server that allows you to analyze Google Analytics knowledge utilizing massive language fashions like Gemini.
Introduced by Matt Landers, Head of Developer Relations for Google Analytics, the instrument serves as a bridge between LLMs and analytics knowledge.
As a substitute of navigating conventional report interfaces, you’ll be able to ask questions in plain English and obtain responses immediately.
A Shift From Conventional Studies
The MCP server gives an alternative choice to digging by menus or configuring reviews manually. You’ll be able to sort queries like “What number of customers did I’ve yesterday?” and get the reply you want.
Screenshot from: YouTube.com/GoogleAnalytics, July 2025.
In a demo, Landers used the Gemini CLI to retrieve analytics knowledge. The CLI, or Command Line Interface, is an easy text-based instrument you run in a terminal window.
As a substitute of clicking by menus or dashboards, you sort out questions or instructions, and the system responds in plain language. It’s like chatting with Gemini, however out of your desktop or laptop computer terminal.
When requested about person counts from the day prior to this, the system returned the proper whole. It additionally dealt with follow-up questions, displaying the way it can refine queries primarily based on context with out requiring extra technical setup.
You’ll be able to watch the total demo within the video beneath:
What You Can Do With It
The server makes use of the Google Analytics Admin API and Information API to assist a variety of capabilities.
In keeping with the undertaking documentation, you’ll be able to:
- Retrieve account and property info
- Run core and real-time reviews
- Entry commonplace and customized dimensions and metrics
- Get hyperlinks to linked Google Adverts accounts
- Obtain hints for setting date ranges and filters
To set it up, you’ll want Python, entry to a Google Cloud undertaking with particular APIs enabled, and Software Default Credentials that embrace read-only entry to your Google Analytics account.
Actual-World Use Circumstances
The server is very useful in additional superior eventualities.
Within the demo, Landers requested for a report on top-selling merchandise over the previous month. The system returned outcomes sorted by merchandise income, then re-sorted them by items bought after a follow-up immediate.
Screenshot from: YouTube.com/GoogleAnalytics, July 2025.
Later, he entered a hypothetical situation: a $5,000 month-to-month advertising funds and a objective to extend income.
The system generated a number of reviews, which revealed that direct and natural search had pushed over $419,000 in income. It then instructed a plan with particular funds allocations throughout Google Adverts, paid social, and e-mail advertising, every backed by efficiency knowledge.
Screenshot from: YouTube.com/GoogleAnalytics, July 2025.
How To Set It Up
You’ll be able to set up the server from GitHub utilizing a instrument known as pipx, which helps you to run Python-based purposes in remoted environments. As soon as put in, you’ll join it to Gemini CLI by including the server to your Gemini settings file.
Setup steps embrace:
- Enabling the mandatory Google APIs in your Cloud undertaking
- Configuring Software Default Credentials with read-only entry to your Google Analytics account
- (Non-compulsory) Setting surroundings variables to handle credentials extra persistently throughout totally different environments
The server works with any MCP-compatible shopper, however Google highlights full assist for Gemini CLI.
That can assist you get began, the documentation contains pattern prompts for duties like checking property stats, exploring person habits, or analyzing efficiency tendencies.
Wanting Forward
Google says it’s persevering with to develop the undertaking and is encouraging suggestions by GitHub and Discord.
Whereas it’s nonetheless experimental, the MCP server provides you a hands-on method to discover what pure language analytics may appear to be sooner or later.
When you’re on a advertising crew, this might enable you get solutions sooner, with out requiring dashboards or customized reviews. And when you’re a developer, you may discover methods to construct instruments that automate elements of your workflow or make analytics extra accessible to others.
The complete setup information, supply code, and updates can be found on the Google Analytics MCP GitHub repository.
Featured Picture: Mijansk786/Shutterstock