Google Tag Manager MCP Server
by a1-x-techio.github.A1-x-Tech/mcp-google-tagmanagerv1.2.0
MCP server for the Google Tag Manager API v2: containers, workspaces, tags, triggers, publishing.
context tax
queued
security
queued
cold start
queued
freshness
Active5d ago
Install Google Tag Manager MCP server
Install in Claude Code
claude mcp add google-tagmanager -e GOOGLE_TAGMANAGER_CLIENT_SECRET='<google-tagmanager-client-secret>' -e GOOGLE_TAGMANAGER_REFRESH_TOKEN='<google-tagmanager-refresh-token>' -e GOOGLE_TAGMANAGER_ACCESS_TOKEN='<google-tagmanager-access-token>' -- npx -y mcp-google-tagmanagerInstall in Cursor
{
"mcpServers": {
"google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google-tagmanager-client-secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google-tagmanager-refresh-token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google-tagmanager-access-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google-tagmanager-client-secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google-tagmanager-refresh-token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google-tagmanager-access-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"google-tagmanager": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google-tagmanager-client-secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google-tagmanager-refresh-token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google-tagmanager-access-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google-tagmanager-client-secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google-tagmanager-refresh-token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google-tagmanager-access-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GOOGLE_TAGMANAGER_CLIENT_ID | — | — | Google OAuth client id (refresh-token flow). |
| GOOGLE_TAGMANAGER_CLIENT_SECRET | — | yes | Google OAuth client secret (refresh-token flow). Treat it as a secret. |
| GOOGLE_TAGMANAGER_REFRESH_TOKEN | — | yes | Google OAuth refresh token; exchanged for access tokens automatically. Treat it as a secret. |
| GOOGLE_TAGMANAGER_ACCESS_TOKEN | — | yes | Ready-made OAuth access token (~1h lifetime). Alternative to the client-id/secret/refresh-token trio. |
| GOOGLE_TAGMANAGER_OAUTH_PORT | — | — | Fixed port for the loopback listener of the in-chat login (127.0.0.1 + PKCE). Set it when the client runs over SSH port forwarding; otherwise a free port is picked per login. |
| GOOGLE_TAGMANAGER_API_BASE | — | — | API root host override. |
| GOOGLE_TAGMANAGER_TIMEOUT_MS | — | — | Per-request timeout in milliseconds. |
| GOOGLE_TAGMANAGER_MAX_RETRIES | — | — | Retries on transient errors (429, quota 403, and 5xx/network for reads). |
| GOOGLE_TAGMANAGER_MIN_INTERVAL_MS | — | — | Minimum spacing between API requests, for the 0.25 QPS quota. |
Freshness
Active — last maintenance signal 5d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-04 · 5d ago · GitHub
Latest release
2026-09-20 · 19d ago · GitHub · v1.2.0
Package published
no data · npm/PyPI
Registry entry updated
2026-09-20 · 19d ago · official registry · v1.2.0
FAQ
›How do I install the Google Tag Manager MCP server in Claude Code?
Run: claude mcp add google-tagmanager -e GOOGLE_TAGMANAGER_CLIENT_SECRET='<google-tagmanager-client-secret>' -e GOOGLE_TAGMANAGER_REFRESH_TOKEN='<google-tagmanager-refresh-token>' -e GOOGLE_TAGMANAGER_ACCESS_TOKEN='<google-tagmanager-access-token>' -- npx -y mcp-google-tagmanager. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Google Tag Manager require an API key?
Yes. It expects GOOGLE_TAGMANAGER_CLIENT_SECRET, GOOGLE_TAGMANAGER_REFRESH_TOKEN, GOOGLE_TAGMANAGER_ACCESS_TOKEN, of which 3 are secrets.
›Can I use Google Tag Manager as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Google Tag Manager in the official MCP registry?
Yes, as io.github.A1-x-Tech/mcp-google-tagmanager.
Alternatives to Google Tag Manager
Other crm & marketing MCP servers.