Google Analytics MCP
Connect Google Analytics 4 to Claude, Cursor, and other MCP clients. Query GA4 traffic, user behavior, and conversion data using natural language. Supports 200+ dimensions and metrics via the GA Data API.
Install on your platform
We auto-selected MCP (generic) based on this skillβs supported platforms.
mcp.json or your client settings).Add this to the mcpServers section
{
"mcpServers": {
"google-analytics-mcp": {
"command": "npx",
"args": [
"-y",
"@trustedskills/google-analytics-mcp"
]
}
}
}About This Skill
What it does
The Google Analytics MCP Server connects Google Analytics 4 (GA4) data to AI agents, enabling them to analyze website traffic, user behavior, and performance. It provides analysis-ready outputs through server-side aggregation, automatically discovers the schema for each GA4 property, and uses context-safe defaults to handle large datasets efficiently. This allows agents to focus on answering questions rather than data wrangling.
When to use it
- Performance Analysis: An agent needs to analyze website traffic trends over a specific period to identify potential issues or opportunities.
- User Behavior Insights: An agent is tasked with understanding how users interact with key pages on a website, including bounce rates and conversion paths.
- Campaign Effectiveness: An agent requires data to assess the performance of marketing campaigns and their impact on website traffic.
- Automated Reporting: Automate the generation of regular reports summarizing key GA4 metrics for stakeholders.
Key capabilities
- Schema discovery for GA4 properties (dimensions & metrics)
- Server-side aggregation of data
- Context-safe defaults for handling large datasets
- Compatibility with various agent runtimes (Claude, ChatGPT, Cursor, Windsurf, and custom hosts)
Example prompts
- "What was the total number of users on our website last week?"
- "Show me a breakdown of traffic sources for the month of July."
- βCompare conversion rates between mobile and desktop users.β
- "Identify pages with high bounce rates and suggest potential improvements."
Tips & gotchas
A Google Analytics 4 property with data is required. You'll also need to create a service account with access to the Google Analytics Data API and your GA4 property.
Requirements
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates β what you install today is exactly what was reviewed and verified.
Installing this skill downloads the exact code at commit 791103c9, not the current state of the repository. This prevents supply-chain attacks from unauthorized updates.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
Details
- Version
- v1.0.0
- License
- MIT
- Author
- surendranb
- Installs
- 0
- Updated
- Mar 4, 2026
- Published
- Mar 4, 2026
π Community
Passed automated security scans.
Install command fetches the verified snapshot, not the live repository.