Gtm Ga4 MCP Server
by mharnettio.github.mharnett/gtm-ga4v1.0.1
GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.
context tax
queued
security
queued
cold start
queued
freshness
Maintained35d ago
Install Gtm Ga4 MCP server
Install in Claude Code
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>' -- npx -y mcp-gtm-ga4Install in Cursor
{
"mcpServers": {
"gtm-ga4": {
"command": "npx",
"args": [
"-y",
"mcp-gtm-ga4"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GTM_ACCOUNT_ID": "<gtm-account-id>",
"GTM_CONTAINER_ID": "<gtm-container-id>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"gtm-ga4": {
"command": "npx",
"args": [
"-y",
"mcp-gtm-ga4"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GTM_ACCOUNT_ID": "<gtm-account-id>",
"GTM_CONTAINER_ID": "<gtm-container-id>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"gtm-ga4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-gtm-ga4"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GTM_ACCOUNT_ID": "<gtm-account-id>",
"GTM_CONTAINER_ID": "<gtm-container-id>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"gtm-ga4": {
"command": "npx",
"args": [
"-y",
"mcp-gtm-ga4"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"GTM_ACCOUNT_ID": "<gtm-account-id>",
"GTM_CONTAINER_ID": "<gtm-container-id>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | yes | — | Path to service account JSON credentials file |
| GTM_ACCOUNT_ID | yes | — | GTM account ID |
| GTM_CONTAINER_ID | yes | — | GTM container ID |
| GA4_PROPERTY_ID | — | — | GA4 property ID (numeric) |
Freshness
Maintained — last maintenance signal 35d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-04 · 35d ago · GitHub
Latest release
2026-09-03 · 37d ago · GitHub · v1.3.0
Package published
no data · npm/PyPI
Registry entry updated
2026-04-08 · 6mo ago · official registry · v1.0.1
FAQ
›How do I install the Gtm Ga4 MCP server in Claude Code?
Run: 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>' -- npx -y mcp-gtm-ga4. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Gtm Ga4 require an API key?
Yes. It expects GOOGLE_APPLICATION_CREDENTIALS, GTM_ACCOUNT_ID, GTM_CONTAINER_ID.
›Can I use Gtm Ga4 as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Gtm Ga4 in the official MCP registry?
Yes, as io.github.mharnett/gtm-ga4.