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.
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 223 GitHub stars.
google-analytics-mcp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
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!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
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
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 telemetry (mcp_started, tool_executed) to help maintainers track release adoption, improve error defenses, and optimize latency.
DISABLE_TELEMETRY=1.Developed by Surendran B (reachsuren@gmail.com) under the Apache License 2.0.
Website: https://ga4mcp.com