Product
MCP Subscription
Official MCP Server
Give your AI eyes on your Google Analytics.
This MCP connector enables LLM clients (like Gemini and Codex) to query your GA4 properties directly via the Model Context Protocol. Connect your accounts once, and your AI can fetch precise, real-time analytics data to answer complex questions or execute multi-step investigations.
Note: This tool is built for developers and technical users comfortable with AI agents, CLIs, or IDE integrations. If you just want automatic, client-ready reports, check out our Performance Intelligence feature.
Compatible With
What is an MCP server?
- · A standard way for AI tools to call external APIs and data sources.
- · This server exposes read-only Google Analytics data to your AI.
- · Works in any MCP-compatible client (Gemini, Codex, and more coming soon).
Why use this MCP Server?
-
No API Keys Required We handle OAuth 2.0. You never share persistent credentials with the AI.
-
Real-time Analysis Queries run against live data. No stale exports or outdated contexts.
-
Secure & Granular Connect only the specific properties you want. Revoke access anytime.
Terminal — ga-mcp demo
Desktop: 3.2% (1,204 conversions)
Mobile: 1.1% (843 conversions)
# Try asking:
- # Why did traffic drop yesterday?
- # Which blog posts have the highest conversion rate?
- # Compare mobile vs desktop conversion rates for last week.
Pick your AI tool
Use the Gemini instructions if you’re in Google AI Studio or Gemini Code Assist. Use the Codex instructions if you’re using Codex in your terminal or IDE.
How to Install (Gemini)
You’ll do one thing in ga-mcp (subscribe and connect Google Analytics), then two small steps in Gemini: add the config and run auth.
In ga-mcp: Subscribe & Connect
Start a subscription and authorize your Google Analytics account via our secure OAuth flow.
In Gemini: Update settings.json
Paste the JSON snippet below into your Gemini settings.json.
In Gemini: Run /mcp auth
In Gemini run
/mcp auth agent-ga
to connect your MCP client. Do step 1 first.
{
"mcpServers": {
... other servers may be here {},
"agent-ga": {
"url": "https://agent-ga.dev/mcp/gateway" //--> add a comma here if you have other servers
}
}
}
How to Install (Codex)
You’ll do one thing in ga-mcp (subscribe and connect Google Analytics), then two small steps in Codex: run the add command and complete auth.
In ga-mcp: Subscribe & Connect
Start a subscription and authorize your Google Analytics account via our secure OAuth flow.
In Codex: Run the add command
Paste the command below into your terminal. This registers the GA MCP server with Codex.
In Codex: Authenticate
The command will open the secure OAuth page to connect Google Analytics. Do step 1 first.
codex mcp add agent-ga --url https://agent-ga.dev/mcp/gateway
// if you wanted to remove it
codex mcp remove agent-ga