Google Tag Manager MCP

v1.4.0
io.github.A1-x-Tech/mcp-google-tagmanager Checked 1 hour ago Published 9 days ago

MCP server for the Google Tag Manager API v2: containers, workspaces, tags, triggers, publishing.

Values you need

VariableWhat it is
GOOGLE_TAGMANAGER_CLIENT_IDoptional Google OAuth client id (refresh-token flow).
GOOGLE_TAGMANAGER_CLIENT_SECREToptional secret Google OAuth client secret (refresh-token flow). Treat it as a secret.
GOOGLE_TAGMANAGER_REFRESH_TOKENoptional secret Google OAuth refresh token; exchanged for access tokens automatically. Treat it as a secret.
GOOGLE_TAGMANAGER_ACCESS_TOKENoptional secret Ready-made OAuth access token (~1h lifetime). Alternative to the client-id/secret/refresh-token trio.
GOOGLE_TAGMANAGER_OAUTH_PORToptional 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_BASEoptional API root host override. Default: https://tagmanager.googleapis.com
GOOGLE_TAGMANAGER_TIMEOUT_MSoptional Per-request timeout in milliseconds. Default: 60000
GOOGLE_TAGMANAGER_MAX_RETRIESoptional Retries on transient errors (429, quota 403, and 5xx/network for reads). Default: 3
GOOGLE_TAGMANAGER_MIN_INTERVAL_MSoptional Minimum spacing between API requests, for the 0.25 QPS quota. Default: 4200

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-google-tagmanager -- npx -y mcp-google-tagmanager@1.4.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-google-tagmanager": {
      "args": [
        "-y",
        "mcp-google-tagmanager@1.4.0"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-google-tagmanager": {
      "args": [
        "-y",
        "mcp-google-tagmanager@1.4.0"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "mcp-google-tagmanager": {
      "args": [
        "-y",
        "mcp-google-tagmanager@1.4.0"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-google-tagmanager]
command = "npx"
args = ["-y", "mcp-google-tagmanager@1.4.0"]

For AI agents

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: auth_status, setup_instructions, set_client, start_login, finish_login, logout, list_accounts, get_account, ….
  4. 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