
Google Analytics MCP Server
by surendranbio.github.surendranb/google-analytics-mcpv2.8.2
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
context tax
queued
security
queued
cold start
queued
freshness
Active7d ago
Install Google Analytics MCP server
Install in Claude Code
claude mcp add google-analytics-surendranb -e GOOGLE_APPLICATION_CREDENTIALS='<google-application-credentials>' -e GA4_PROPERTY_ID='<ga4-property-id>' -- uvx google-analytics-mcpInstall in Cursor
{
"mcpServers": {
"google-analytics-surendranb": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GA4_PROPERTY_ID": "<ga4-property-id>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"google-analytics-surendranb": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GA4_PROPERTY_ID": "<ga4-property-id>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"google-analytics-surendranb": {
"type": "stdio",
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GA4_PROPERTY_ID": "<ga4-property-id>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"google-analytics-surendranb": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GA4_PROPERTY_ID": "<ga4-property-id>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | yes | yes | Absolute path to your Google Cloud service account JSON key with GA4 property access. |
| GA4_PROPERTY_ID | yes | — | Numeric GA4 Property ID to query, for example 123456789. |
Freshness
Active — last maintenance signal 7d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-03 · 7d ago · GitHub
Latest release
2026-08-18 · 53d ago · GitHub · v2.11.3
Package published
no data · npm/PyPI
Registry entry updated
2026-07-27 · 3mo ago · official registry · v2.8.2
FAQ
›How do I install the Google Analytics MCP server in Claude Code?
Run: claude mcp add google-analytics-surendranb -e GOOGLE_APPLICATION_CREDENTIALS='<google-application-credentials>' -e GA4_PROPERTY_ID='<ga4-property-id>' -- uvx google-analytics-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Google Analytics require an API key?
Yes. It expects GOOGLE_APPLICATION_CREDENTIALS, GA4_PROPERTY_ID, of which 1 is a secret.
›Can I use Google Analytics as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Google Analytics in the official MCP registry?
Yes, as io.github.surendranb/google-analytics-mcp.
Alternatives to Google Analytics
Other data & analytics MCP servers.