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
}See how google-analytics-mcp compares with popular alternatives.
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 242 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!
Based on votes and bookmarks from developers who liked this skill
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents.
🌐 Live Documentation & Web Portal: https://ga4.builditwithai.xyz
# 1-Line Universal Installer (Auto-configures Claude Desktop, Cursor, Claude Code, Antigravity, VS Code, Zed, Windsurf)
curl -fsSL "https://ga4.builditwithai.xyz/install" | bash
# Or run directly via your preferred runtime:
uvx google-analytics-mcp
uvx --from google-analytics-mcp ga4-mcp-server
python -m ga4_mcp
npx -y @surendranb/google-analytics-mcp
claude mcp add google-analytics -- uvx google-analytics-mcp
mcp.json){
"mcpServers": {
"google-analytics": {
"command": "uvx",
"args": ["google-analytics-mcp"]
}
}
}
claude_desktop_config.json){
"mcpServers": {
"google-analytics": {
"command": "uvx",
"args": ["google-analytics-mcp"],
"env": {
"GA4_PROPERTY_ID": "your_ga4_property_id",
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service_account.json"
}
}
}
}
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": ["-y", "@surendranb/google-analytics-mcp"]
}
}
}
| Tool Name | Parameters | Description | Return Type |
|---|---|---|---|
get_ga4_data |
dimensions (list), metrics (list), date_ranges (list), limit (int) |
Runs multi-dimensional GA4 reports with automated metric totals and server-side aggregation. | JSON / Markdown |
list_accounts |
(none) | Lists all accessible Google Analytics accounts and permission levels. | JSON |
list_properties |
account_id (optional) |
Lists all GA4 properties associated with an account. | JSON |
get_property_metadata |
property_id (optional) |
Fetches complete dimension and metric schemas, custom definitions, and compatibility rules. | JSON |
run_realtime_report |
metrics (list), dimensions (list) |
Queries real-time active users and event counts from the last 30 minutes. | JSON |
search_skills |
query (string) |
Searches built-in GA4 analytical playbooks (e-commerce, channel attribution, bot filtering). | Markdown |
skill_read |
skill_name (string) |
Dynamically loads procedural skills and analytical guides from GitHub. | Markdown |
skills_list |
(none) | Lists all available live GA4 analytical skills. | JSON |
This server ships with built-in analytical recipes that load dynamically from GitHub:
traffic-diagnosis: Step-by-step root cause analysis for sudden traffic drops.channel-acquisition: Best-practice channel grouping and attribution modeling.ecommerce-analysis: Revenue, item purchase rate, and conversion funnel analysis.ai-referral-analysis: Tracks and isolates referral traffic from ChatGPT, Claude, Perplexity, and Gemini.This package collects anonymous, non-PII diagnostic telemetry (command executions, latency, error codes) to improve tool reliability. No queries, user credentials, personal data, source code, or environment variables are ever collected or stored.
You can opt out anytime by setting either of the following environment variables:
export DO_NOT_TRACK=1
# or
export MCP_TELEMETRY_OPT_OUT=1
MIT License. See LICENSE for details.