
A complete tutorial for marketers on setting up Google Analytics MCP for Claude Desktop. Learn to analyze your data with AI, understand the limitations, and discover alternative solutions.
If you're a marketer working with Google Analytics, you've probably wished you could just ask questions about your data in plain English. "Why did conversions drop last week?" "Which landing pages are performing poorly on mobile?" Instead of clicking through dashboards and exporting data to spreadsheets, what if you could just ask Claude AI directly?
That's exactly what MCP (Model Context Protocol) makes possible.
MCP is a standard protocol that allows AI assistants like Claude to connect to external data sources and tools. Think of it as a bridge that lets Claude access your Google Analytics data, Search Console metrics, or other analytics platforms—without you having to copy and paste numbers back and forth.
When you set up a Google Analytics MCP server, Claude can:
Instead of spending 30 minutes building reports, you can have a natural conversation: "Show me pages where bounce rate increased more than 20% this month" or "What are the top traffic sources for users who convert?"
If you're curious about analyzing your analytics with AI but want to skip the technical setup, Eyes offers this capability ready to use. You can connect your Google Analytics and start asking questions immediately—no code required.
For those who want to understand how this works under the hood or prefer to run everything locally, let's walk through the setup process.
This tutorial will guide you through setting up the official Google Analytics MCP server. I'll explain each step assuming no prior technical knowledge.
The Google Analytics MCP server is built with Python and distributed via pipx. pipx is a tool that installs Python applications in isolated environments.
For Mac:
brew install pipx
pipx ensurepath
source ~/.zshrc
pipx --version
For Windows:
python -m pip install --user pipx
python -m pipx ensurepath
pipx --version
You'll need the Google Cloud CLI (gcloud) to authenticate with Google's services.
For Mac:
./google-cloud-sdk/install.sh
gcloud init
For Windows:
gcloud init
For the MCP server to access your Google Analytics data, you need to enable two APIs in Google Cloud Platform.
Now you need to create OAuth credentials for authentication.
~/.config/google/client_secret.json)Now you'll authenticate using the Google Cloud CLI. This creates the Application Default Credentials that the MCP server will use.
gcloud auth application-default login \
--scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \
--client-id-file=/path/to/your/client_secret.json
/Users/yourname/.config/gcloud/application_default_credentials.json)Important: Note down this credentials file path—you'll need it in the next step.
Now you need to tell Claude Desktop about the MCP server.
Find your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonOpen it in a text editor (TextEdit on Mac, Notepad on Windows). If the file doesn't exist, create it.
Add the MCP server configuration:
{
"mcpServers": {
"analytics-mcp": {
"command": "pipx",
"args": ["run", "analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/application_default_credentials.json",
"GOOGLE_PROJECT_ID": "your-google-cloud-project-id"
}
}
}
}
Replace:
/path/to/application_default_credentials.json with the actual path from Step 5your-google-cloud-project-id with your Google Cloud project ID (find it in the Cloud Console)Save the file
If everything is set up correctly, Claude will query your Google Analytics data and give you answers based on your actual metrics.
Congratulations! You've successfully set up Claude to analyze your Google Analytics data.
Now that you have this working, it's important to understand some practical limitations of this setup:
The authentication token you created is linked to your personal Google account. This means:
For agencies or consultants who need to analyze multiple clients' data, this becomes cumbersome. You'd need to reconfigure authentication each time you switch clients.
This MCP server runs locally on your computer, which means:
When you find an interesting insight, there's no simple way to share it:
Technical things change:
If you found this tutorial helpful, you now understand both the power and the limitations of running your own analytics MCP server. For individual use on a single machine, it works great. But many marketing teams run into the constraints pretty quickly.
This is exactly why we built Eyes.
Eyes provides the same AI-powered analytics conversations you just experienced, but solves the limitations:
Multi-Account Support: Connect multiple Google Analytics properties, even from different Google accounts. Perfect for agencies managing client accounts or companies with multiple brands.
Access Anywhere: Use Eyes from your desktop, laptop, phone, or tablet. The analysis is cloud-based, so you can check insights during a client meeting or while traveling.
Team Collaboration: Share analysis links with teammates or clients. When you discover "mobile conversion rates dropped 15% on these three landing pages," you can send a link that shows exactly what you found—no screenshots needed.
No Setup or Maintenance: Connect your Google Analytics account and start analyzing immediately. No code to download, no credentials to manage, no updates to worry about.
Broader Data Integration: Eyes connects to Google Analytics, Search Console, and PageSpeed Insights automatically, giving you a complete picture without juggling multiple MCP servers.
If you're managing analytics for a team, working with multiple accounts, or need to access insights from anywhere, try Eyes free. You'll get all the AI analysis capabilities you just set up, without the friction.
For those who prefer to keep everything local and self-hosted, the MCP setup you just completed will serve you well. Both approaches make analytics more accessible—it just depends on your specific needs.
Whether you choose to run your own MCP server or use a tool like Eyes, the important thing is making analytics more approachable. Too many marketing decisions get made on gut feeling because the data is hard to access or interpret.
AI can change that. When you can have a natural conversation with your data—asking follow-up questions, testing hypotheses, drilling into anomalies—analytics becomes less about building reports and more about understanding your users.
I hope this tutorial helps you get started with AI-powered analytics, whichever path you choose.
Have questions about setting up MCP servers or want to share your experience? Feel free to reach out at contact@geteyes.ai
covelline, LLC
Towa Ikebukuro Coop 801, 5-8-9 Nishi-Ikebukuro, Toshima-ku, Tokyo 171-0021, Japan
Tel: +81-3-6912-5502