Skip to content
VS Code

Google Tag Manager MCP for VS Code

io.github.a1-x-tech/mcp-google-tagmanager

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

client:VS Code transport:stdio runtime:npm

Install Google Tag Manager MCP in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "google-tagmanager-client-id",
      "description": "GOOGLE_TAGMANAGER_CLIENT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-client-secret",
      "description": "GOOGLE_TAGMANAGER_CLIENT_SECRET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-refresh-token",
      "description": "GOOGLE_TAGMANAGER_REFRESH_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-access-token",
      "description": "GOOGLE_TAGMANAGER_ACCESS_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-oauth-port",
      "description": "GOOGLE_TAGMANAGER_OAUTH_PORT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-api-base",
      "description": "GOOGLE_TAGMANAGER_API_BASE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-timeout-ms",
      "description": "GOOGLE_TAGMANAGER_TIMEOUT_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-max-retries",
      "description": "GOOGLE_TAGMANAGER_MAX_RETRIES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-tagmanager-min-interval-ms",
      "description": "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS",
      "password": true
    }
  ],
  "servers": {
    "mcp-google-tagmanager": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-tagmanager"
      ],
      "env": {
        "GOOGLE_TAGMANAGER_CLIENT_ID": "${input:google-tagmanager-client-id}",
        "GOOGLE_TAGMANAGER_CLIENT_SECRET": "${input:google-tagmanager-client-secret}",
        "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "${input:google-tagmanager-refresh-token}",
        "GOOGLE_TAGMANAGER_ACCESS_TOKEN": "${input:google-tagmanager-access-token}",
        "GOOGLE_TAGMANAGER_OAUTH_PORT": "${input:google-tagmanager-oauth-port}",
        "GOOGLE_TAGMANAGER_API_BASE": "${input:google-tagmanager-api-base}",
        "GOOGLE_TAGMANAGER_TIMEOUT_MS": "${input:google-tagmanager-timeout-ms}",
        "GOOGLE_TAGMANAGER_MAX_RETRIES": "${input:google-tagmanager-max-retries}",
        "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS": "${input:google-tagmanager-min-interval-ms}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Google Tag Manager MCP in other clients