GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
MCPpedia last refreshed this data
io.github.surendranb/google-analytics-mcp is an MCP server that GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults. Its tool list has not been published yet over stdio, requires no API key, and scores 90/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"ga4-analytics": {
"env": {
"GA4_PROPERTY_ID": "123456789",
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/service-account-key.json"
},
"command": "ga4-mcp-server"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'google-analytics-data' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked google-analytics-data against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in analytics
Ask your agent about your own Apple Health data: 194 metrics, 22 tools, local, 0 deps.
MCP server for Dynatrace Managed to access logs, events, and metrics.
Official PostHog MCP Server for product analytics, feature flags, experiments, and more.
Read and manage Churnkey cancel flows, retention metrics, and payment recovery
MCP Security Weekly
Get CVE alerts and security updates for io.github.surendranb/google-analytics-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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://ga4mcp.com/
# 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: Rev