by surendranb
Google Analytics 4 data to AI agents, agentic workflows, and MCP clients. Give agents analysis-ready access to website traffic, user behavior, and performance data with schema discovery, server-side aggregation, and safe defaults that reduce data wrangling.
# Add to your Claude Code skills
git clone https://github.com/surendranb/google-analytics-mcpGuides for using ai agents skills like google-analytics-mcp.
Last scanned: 7/4/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-07-04T06:46:38.509Z",
"npmAuditRan": true,
"pipAuditRan": false,
"promptInjectionRan": true
}google-analytics-mcp is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by surendranb. Google Analytics 4 data to AI agents, agentic workflows, and MCP clients. Give agents analysis-ready access to website traffic, user behavior, and performance data with schema discovery, server-side aggregation, and safe defaults that reduce data wrangling. It has 226 GitHub stars.
Yes. google-analytics-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/surendranb/google-analytics-mcp" and add it to your Claude Code skills directory (see the Installation section above).
google-analytics-mcp is primarily written in Python. It is open-source under surendranb on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh google-analytics-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
mcp-name: io.github.surendranb/google-analytics-mcp
Connect Google Analytics 4 data directly to AI agents, analyst copilots, and MCP runtimes across Claude, ChatGPT, Gemini, Cursor, VS Code, and OpenClaw. Gives models analysis-ready GA4 access with live schema discovery, metric auto-aliasing, server-side aggregation, and autonomous self-healing defenses.
🌐 Website & Documentation: https://ga4mcp.com
🔗 Sister Project: Google Search Console MCP
Auto-detects your system, configures Gemini CLI, Claude Desktop, Cursor, and VS Code automatically in 1 command:
curl -fsSL https://ga4.builditwithai.xyz | bash
brew tap surendranb/tap
brew install google-analytics-mcp
Add to your MCP configuration file (claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"ga4-analytics": {
"command": "npx",
"args": ["-y", "google-analytics-mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
Install directly into Google Gemini CLI with a single command:
gemini extensions install github.com/surendranb/google-analytics-mcp
uvx & Explicit python -m ga4_mcp{
"mcpServers": {
"ga4-analytics": {
"command": "uvx",
"args": ["--from", "google-analytics-mcp", "ga4-mcp-server"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
Or run directly via ga4-mcp-server / python -m ga4_mcp:
{
"mcpServers": {
"ga4-analytics": {
"command": "python",
"args": ["-m", "ga4_mcp"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/service-account-key.json",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}
get_troubleshooting_guide.'conversions' → 'keyEvents', preventing unnecessary query failures./Users/yourname/keys/ga4-key.json).client_email) with the Viewer role.123456789).| Tool Name | Purpose |
|---|---|
get_ga4_data |
Execute GA4 queries with dimensions, metrics, date ranges, and optional filters. |
search_schema |
Keyword search across 200+ GA4 dimension and metric API names. |
get_property_schema |
Inspect all available dimensions and metrics for your specific property. |
list_metric_categories |
Browse metric categories (User, Session, Revenue, Event). |
list_dimension_categories |
Browse dimension categories (Geography, Traffic Source, Device). |
get_troubleshooting_guide |
Self-healing guide for IAM permissions, setup, and filter syntax. |
GA4 MCP collects anonymous usage telemetry to improve the server — no personal data, no GA4 report data, ever. Opt out anytime with DISABLE_TELEMETRY=1 or DO_NOT_TRACK=1.
Developed by Surendran B under the Apache License 2.0.
Website: https://ga4mcp.com