google-analytics-mcp
CommunityMCP server by surendranb · updated · ★ 243
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults. google-analytics-mcp is a community project by surendranb, not verified by a company domain.
Last commit 3 days ago
MIT: permissive, fine for commercial use
Clear description, published package or server URL, 243 stars, original repository
Downloads a script from the internet and runs it
What you need
| Setting | Needed | What it is |
|---|---|---|
GOOGLE_Environment variable, secret | Required | Absolute path to your Google Cloud service account JSON key with GA4 property access. |
GA4_Environment variable | Required | Numeric GA4 Property ID to query, for example 123456789. |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Install google-analytics-mcp
Built from the published package, never by AIclaude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -- uvx google-analytics-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS",
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID"
}
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install google-analytics-mcp in Claude Desktop
{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS",
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID"
}
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS",
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID"
}
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add google-analytics-mcp --env GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS --env GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -- uvx google-analytics-mcp{
"mcpServers": {
"google-analytics-mcp": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "YOUR_GOOGLE_APPLICATION_CREDENTIALS",
"GA4_PROPERTY_ID": "YOUR_GA4_PROPERTY_ID"
}
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install google-analytics-mcp in Antigravity CLI
gemini mcp add google-analytics-mcp uvx google-analytics-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the google-analytics-mcp block.
Weekly newsletter
Like google-analytics-mcp? Get the best new MCP servers every week
The best new tools, security warnings before you install something risky, and one practical tip. Free, three minute read.
Security check
C- Downloads a script from the internet and runs itIn
README.md:curl -fsSL "https://ga4.builditwithai.xyz/install" | bash
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to google-analytics-mcp
All alternatives →The Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.
Agent-Native Amplitude/Mixpanel - connect data sources, prompt for charts
Google Ads, Meta Ads, Google Analytics (GA4) & Search Console MCP server by Ryze AI
A Model Context Protocol (MCP) server that provides chat functionality with Cube's AI agent for analytics and data exploration
Create and edit Excel files with AI: charts, PivotTables, formulas. No Excel needed.
MCP gateway for AI models (OpenAI, Grok, DeepSeek, Claude and other function-calling LLMs) and for web pages and apps: one authenticated, observable endpoint in front of your MCP servers with routing, scopes, rate limits and metrics.
google-analytics-mcp: common questions
How do I install google-analytics-mcp?
In Claude Code run claude mcp add google-analytics-mcp -e GOOGLE_APPLICATION_CREDENTIALS=YOUR_GOOGLE_APPLICATION_CREDENTIALS -e GA4_PROPERTY_ID=YOUR_GA4_PROPERTY_ID -- uvx google-analytics-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is google-analytics-mcp the official server?
google-analytics-mcp is a community project by surendranb, not verified by a company domain.
Is google-analytics-mcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is google-analytics-mcp safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality B. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to google-analytics-mcp?
Similar MCP servers: Power BI Authoring MCP Server (Local), Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Cube Dev MCP Server.
Does google-analytics-mcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
