mcp-google-analytics
v1.3.0GA4 MCP that reads AND writes: reports, funnels, audits, and server-side events.
Values you need
| Variable | What it is | |
|---|---|---|
GA_SERVICE_ACCOUNT_JSON | optional secret | Service account JSON for reading reports: file path or inline JSON (needed for read tools) |
GA_PROPERTY_ID | optional | Numeric GA4 property ID, e.g. 123456789 (needed for read tools) |
GA_MEASUREMENT_ID | optional | Measurement ID of the data stream, e.g. G-XXXXXXXXXX (needed for event-sending tools) |
GA_API_SECRET | optional secret | Measurement Protocol API secret (needed for event-sending tools) |
npm (npx) verified
Requires Node.js 18+
Run in a terminal
claude mcp add mcp-google-analytics -- npx -y mcp-google-analytics@1.3.0Add to
claude_desktop_config.json{
"mcpServers": {
"mcp-google-analytics": {
"args": [
"-y",
"mcp-google-analytics@1.3.0"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp-google-analytics": {
"args": [
"-y",
"mcp-google-analytics@1.3.0"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"mcp-google-analytics": {
"args": [
"-y",
"mcp-google-analytics@1.3.0"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp-google-analytics]
command = "npx"
args = ["-y", "mcp-google-analytics@1.3.0"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: ga_run_report, ga_run_realtime_report, ga_get_metadata, ga_list_accounts, ga_list_properties, ga_get_property, ga_list_data_streams, ga_run_pivot_report, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json