Google Analytics 4 MCP: reports, realtime data, custom dimensions, data streams.
If you already use Ga4, the ga4 mcp server is the piece that lets your assistant work with it directly. Google Analytics 4 MCP: reports, realtime data, custom dimensions, data streams.
mcp-ga4 on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
ga4_get_client_context — Returns the active GA4 property ID and client namega4_run_report — Run a standard GA4 report with dimensions, metrics, date range, and filtersga4_realtime_report — Query realtime data (last 30 minutes)ga4_list_custom_dimensions — List all custom dimensions for the propertyga4_create_custom_dimension — Create a new custom dimensionga4_list_custom_metrics — List all custom metrics for the propertyga4_list_data_streams — List web/app data streams and their measurement IDsga4_send_feedback — Submit feedback on a query resultga4_suggest_improvement — Suggest a new query pattern or improvementConfiguration is passed through the environment: GA4_PROPERTY_ID, GOOGLE_APPLICATION_CREDENTIALS, GA4_CLIENT_ID, GA4_CLIENT_SECRET, GA4_REFRESH_TOKEN, REFRESH_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Ga4's toolset — ga4_get_client_context, ga4_run_report, ga4_realtime_report and 6 more — is a fair guide to whether it matches your workflow. It is maintained by mharnett; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| ga4_get_client_context | Returns the active GA4 property ID and client name |
| ga4_run_report | Run a standard GA4 report with dimensions, metrics, date range, and filters |
| ga4_realtime_report | Query realtime data (last 30 minutes) |
| ga4_list_custom_dimensions | List all custom dimensions for the property |
| ga4_create_custom_dimension | Create a new custom dimension |
| ga4_list_custom_metrics | List all custom metrics for the property |
| ga4_list_data_streams | List web/app data streams and their measurement IDs |
| ga4_send_feedback | Submit feedback on a query result |
| ga4_suggest_improvement | Suggest a new query pattern or improvement |
Multi-client mode:
```json
{
"mcpServers": {
"ga4": {
"command": "node",
"args": ["/path/to/mcp-ga4/dist/index.js"]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| GA4_PROPERTY_ID | Configuration value read at startup. | Optional |
| GOOGLE_APPLICATION_CREDENTIALS | Configuration value read at startup. | Optional |
| GA4_CLIENT_ID | Configuration value read at startup. | Optional |
| GA4_CLIENT_SECRET | Credential the server authenticates with. | Yes |
| GA4_REFRESH_TOKEN | Credential the server authenticates with. | Yes |
| REFRESH_TOKEN | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.