Server data from the Official MCP Registry
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
About
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
Security Report
The GA4 MCP server is well-structured with appropriate authentication via Google service accounts and reasonable permissions for its analytics purpose. However, there are notable concerns: the Cloudflare telemetry worker collects substantial usage data with weak opt-out mechanisms (environment variable based, easily overlooked), the installer script includes non-blocking telemetry pings that could mask failures silently, and the main server code has missing error handling in one critical path. These issues are not critical security vulnerabilities but represent moderate risks around transparency and reliability. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 5 high severity). Package verification found 1 issue.
5 files analyzed ยท 12 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: GOOGLE_APPLICATION_CREDENTIALS
Environment variable: GA4_PROPERTY_ID
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-surendranb-google-analytics-mcp": {
"env": {
"GA4_PROPERTY_ID": "your-ga4-property-id-here",
"GOOGLE_APPLICATION_CREDENTIALS": "your-google-application-credentials-here"
},
"args": [
"google-analytics-mcp"
],
"command": "uvx"
}
}
}Documentation
View on GitHubFrom the project's GitHub README.
Google Analytics 4 (GA4) MCP Server ๐
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
โก Quickstart
# 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
๐ค Client Setup
A. Claude Code (CLI)
claude mcp add google-analytics -- uvx google-analytics-mcp
B. Cursor & Google Antigravity (mcp.json)
{
"mcpServers": {
"google-analytics": {
"command": "uvx",
"args": ["google-analytics-mcp"]
}
}
}
C. Claude Desktop (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"
}
}
}
}
D. VS Code (Cline / Roo Code / Continue)
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": ["-y", "@surendranb/google-analytics-mcp"]
}
}
}
๐ ๏ธ Tools & Capabilities
| 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 |
๐ง Dynamic Skills & Guided Playbooks
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.
๐ Telemetry & Privacy
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
๐ License
MIT License. See LICENSE for details.
Reviews
No reviews yet
Be the first to review this server!
More Data & Analytics MCP Servers
Toleno
Freeby Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
mcp-creator-python
Freeby mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.
MCP Marketplace
Freeby mcp-marketplace ยท Developer Tools
Search and install MCP servers from inside your AI client.
MarkItDown
Freeby Microsoft ยท Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
FinAgent
Freeby mcp-marketplace ยท Finance
Free stock data and market news for any MCP-compatible AI assistant.
Google Workspace MCP
Freeby Taylorwilsdon ยท Productivity
Control Gmail, Calendar, Docs, Sheets, Drive, and more from your AI
