GA4 Analytics MCP
v26.11.13GA4 MCP server: Google Analytics 4 reports, realtime data, property admin and Search Console.
Values you need
| Variable | What it is | |
|---|---|---|
GOOGLE_APPLICATION_CREDENTIALS | optional | Path to a service account key or authorized_user JSON file. Optional if you use gcloud Application Default Credentials or the OAuth variables. |
GOOGLE_OAUTH_CLIENT_ID | optional | OAuth client ID. Set together with the client secret and refresh token. |
GOOGLE_OAUTH_CLIENT_SECRET | optional secret | OAuth client secret. |
GOOGLE_OAUTH_REFRESH_TOKEN | optional secret | OAuth refresh token with the Analytics, Search Console and Indexing API scopes. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add ga4-mcp -- npx -y @renzo.johnson/ga4-mcp@26.11.13Add to
claude_desktop_config.json{
"mcpServers": {
"ga4-mcp": {
"args": [
"-y",
"@renzo.johnson/ga4-mcp@26.11.13"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"ga4-mcp": {
"args": [
"-y",
"@renzo.johnson/ga4-mcp@26.11.13"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"ga4-mcp": {
"args": [
"-y",
"@renzo.johnson/ga4-mcp@26.11.13"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.ga4-mcp]
command = "npx"
args = ["-y", "@renzo.johnson/ga4-mcp@26.11.13"]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: ping, get_account_summaries, get_property_details, list_google_ads_links, run_report, run_realtime_report, get_custom_dimensions_and_metrics, gsc_list_sites, ….
- 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