ga4-intelligence-mcp
v1.0.1
Published
Google Analytics 4 MCP for Claude Code — ask Claude anything about your GA4 traffic
Maintainers
Readme
ga4-intelligence-mcp
Ask Claude anything about your Google Analytics 4 data — sessions, top pages, traffic sources, conversions, audience — directly inside Claude Code or any MCP-compatible AI.
Install in 2 steps
Step 1 — Get your refresh token and property ID at ga4-connect.vercel.app
Step 2 — Add this to your .mcp.json:
{
"mcpServers": {
"ga4-intelligence": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ga4-intelligence-mcp"],
"env": {
"GA4_REFRESH_TOKEN": "paste-token-from-ga4-connect",
"GA4_PROPERTY_ID": "123456789"
}
}
}
}Restart Claude Code. Done.
What you can ask Claude
- "How many users visited my site this week?"
- "What are my top 10 pages this month?"
- "Where is my traffic coming from?"
- "Show me my conversion events"
- "Break down my audience by device and country"
Tools included
| Tool | Plan | Description |
|------|------|-------------|
| get_traffic_summary | Free | Sessions, users, pageviews, bounce rate, avg session duration |
| get_top_pages | Free | Top pages by pageviews |
| get_traffic_sources | Free | Organic, Direct, Social, Referral breakdown |
| get_conversions | Paid | Conversion events and counts |
| get_audience_insights | Paid | Countries, devices, new vs returning |
| list_properties | Free | List all GA4 properties in your account |
Paid tools available with a license key from mcpize.com ($19/mo).
Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| GA4_REFRESH_TOKEN | Yes | OAuth refresh token — get free at ga4-connect.vercel.app |
| GA4_PROPERTY_ID | Yes | Your GA4 property ID (numbers only, e.g. 123456789) |
| MCPIZE_LICENSE_KEY | No | Unlocks paid tools |
| GA4_CLIENT_ID | No | Override the default OAuth client |
| GA4_CLIENT_SECRET | No | Override the default OAuth client secret |
Multiple properties
To track several sites, add multiple MCP entries with different property IDs:
{
"mcpServers": {
"ga4-site1": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ga4-intelligence-mcp"],
"env": {
"GA4_REFRESH_TOKEN": "your-token",
"GA4_PROPERTY_ID": "111111111"
}
},
"ga4-site2": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ga4-intelligence-mcp"],
"env": {
"GA4_REFRESH_TOKEN": "your-token",
"GA4_PROPERTY_ID": "222222222"
}
}
}
}License
MIT — built by VibeDNA
