GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.
Connect Runs on your machine
claude mcp add gtm-ga4 -e GOOGLE_APPLICATION_CREDENTIALS=<GOOGLE_APPLICATION_CREDENTIALS> -e GTM_ACCOUNT_ID=<GTM_ACCOUNT_ID> -e GTM_CONTAINER_ID=<GTM_CONTAINER_ID> -e GA4_PROPERTY_ID=<GA4_PROPERTY_ID> -- npx -y [email protected]
{
"mcpServers": {
"gtm-ga4": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
"GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
"GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>",
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>"
}
}
}
}
{
"mcpServers": {
"gtm-ga4": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
"GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
"GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>",
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>"
}
}
}
}
{
"servers": {
"gtm-ga4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
"GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
"GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>",
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
GOOGLE_APPLICATION_CREDENTIALSRequired | Path to service account JSON credentials file |
GTM_ACCOUNT_IDRequired | GTM account ID |
GTM_CONTAINER_IDRequired | GTM container ID |
GA4_PROPERTY_IDOptional | GA4 property ID (numeric) |
Details
| Package | [email protected] (NPM, stdio) |
| First published | 8 Apr 2026 |
| Last updated | 8 Apr 2026 |
| Registry name | io.github.mharnett/gtm-ga4 |
More data and analytics servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
