Koskamo

Google Tag Manager MCP

An MCP server for the Google Tag Manager API v2 that allows AI agents to inspect containers, tags, triggers, and variables. It supports preparing workspace changes in drafts and explicitly publishing versions. The server handles OAuth authentication via PKCE and manages API quota awareness to prevent overwhelming the GTM service.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

Google Tag Manager MCP logo, by A1-x-TechCommunity listingLocal stdioSource reviewed; not executedPublished by A1-x-Tech
You need:You need Node.js 20+ and a Google account.Credentials are not required at install time — the server connects from the conversation.
Vendor documentation

Checks and signals

Each line is separate evidence, not a trust score.

  • Popularity 1 GitHub star

What you can do with it

  • List GTM containers and show which tags fire on page view
  • Prepare a GA4 configuration tag in a draft workspace
  • Inspect tags, triggers, and variables in a container
  • Compile and publish a new container version

Source and maintenance

Community listingRegistry 1.3.1MIT
Last repository push
Latest release
v1.3.1
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

mcp-google-tagmanager 1.3.1

npm
mcp-google-tagmanager package definition
{
  "version": "1.3.1",
  "transport": "stdio",
  "identifier": "mcp-google-tagmanager",
  "registryType": "npm",
  "registryBaseUrl": "https://registry.npmjs.org",
  "environmentVariables": [
    {
      "name": "GOOGLE_TAGMANAGER_CLIENT_ID",
      "description": "Google OAuth client id (refresh-token flow)."
    },
    {
      "name": "GOOGLE_TAGMANAGER_CLIENT_SECRET",
      "description": "Google OAuth client secret (refresh-token flow). Treat it as a secret."
    },
    {
      "name": "GOOGLE_TAGMANAGER_REFRESH_TOKEN",
      "description": "Google OAuth refresh token; exchanged for access tokens automatically. Treat it as a secret."
    },
    {
      "name": "GOOGLE_TAGMANAGER_ACCESS_TOKEN",
      "description": "Ready-made OAuth access token (~1h lifetime). Alternative to the client-id/secret/refresh-token trio."
    },
    {
      "name": "GOOGLE_TAGMANAGER_OAUTH_PORT",
      "description": "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."
    },
    {
      "name": "GOOGLE_TAGMANAGER_API_BASE",
      "default": "https://tagmanager.googleapis.com",
      "description": "API root host override."
    },
    {
      "name": "GOOGLE_TAGMANAGER_TIMEOUT_MS",
      "default": "60000",
      "description": "Per-request timeout in milliseconds."
    },
    {
      "name": "GOOGLE_TAGMANAGER_MAX_RETRIES",
      "default": "3",
      "description": "Retries on transient errors (429, quota 403, and 5xx/network for reads)."
    },
    {
      "name": "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS",
      "default": "4200",
      "description": "Minimum spacing between API requests, for the 0.25 QPS quota."
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Maintenance history

Public check and source-refresh events. Editorial and ownership records remain private.

  • · repository · passed · metadata changed · updated
  • · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "google-tag-manager-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-tagmanager@1.3.1"
      ],
      "env": {
        "GOOGLE_TAGMANAGER_CLIENT_ID": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_ID>",
        "GOOGLE_TAGMANAGER_CLIENT_SECRET": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_SECRET>",
        "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_REFRESH_TOKEN>",
        "GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_ACCESS_TOKEN>",
        "GOOGLE_TAGMANAGER_OAUTH_PORT": "<YOUR_GOOGLE_TAGMANAGER_OAUTH_PORT>",
        "GOOGLE_TAGMANAGER_API_BASE": "<YOUR_GOOGLE_TAGMANAGER_API_BASE>",
        "GOOGLE_TAGMANAGER_TIMEOUT_MS": "<YOUR_GOOGLE_TAGMANAGER_TIMEOUT_MS>",
        "GOOGLE_TAGMANAGER_MAX_RETRIES": "<YOUR_GOOGLE_TAGMANAGER_MAX_RETRIES>",
        "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS": "<YOUR_GOOGLE_TAGMANAGER_MIN_INTERVAL_MS>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "google-tag-manager-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-tagmanager@1.3.1"
      ],
      "env": {
        "GOOGLE_TAGMANAGER_CLIENT_ID": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_ID>",
        "GOOGLE_TAGMANAGER_CLIENT_SECRET": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_SECRET>",
        "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_REFRESH_TOKEN>",
        "GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_ACCESS_TOKEN>",
        "GOOGLE_TAGMANAGER_OAUTH_PORT": "<YOUR_GOOGLE_TAGMANAGER_OAUTH_PORT>",
        "GOOGLE_TAGMANAGER_API_BASE": "<YOUR_GOOGLE_TAGMANAGER_API_BASE>",
        "GOOGLE_TAGMANAGER_TIMEOUT_MS": "<YOUR_GOOGLE_TAGMANAGER_TIMEOUT_MS>",
        "GOOGLE_TAGMANAGER_MAX_RETRIES": "<YOUR_GOOGLE_TAGMANAGER_MAX_RETRIES>",
        "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS": "<YOUR_GOOGLE_TAGMANAGER_MIN_INTERVAL_MS>"
      }
    }
  }
}

VS Code

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "google-tag-manager-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-tagmanager@1.3.1"
      ],
      "env": {
        "GOOGLE_TAGMANAGER_CLIENT_ID": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_ID>",
        "GOOGLE_TAGMANAGER_CLIENT_SECRET": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_SECRET>",
        "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_REFRESH_TOKEN>",
        "GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_ACCESS_TOKEN>",
        "GOOGLE_TAGMANAGER_OAUTH_PORT": "<YOUR_GOOGLE_TAGMANAGER_OAUTH_PORT>",
        "GOOGLE_TAGMANAGER_API_BASE": "<YOUR_GOOGLE_TAGMANAGER_API_BASE>",
        "GOOGLE_TAGMANAGER_TIMEOUT_MS": "<YOUR_GOOGLE_TAGMANAGER_TIMEOUT_MS>",
        "GOOGLE_TAGMANAGER_MAX_RETRIES": "<YOUR_GOOGLE_TAGMANAGER_MAX_RETRIES>",
        "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS": "<YOUR_GOOGLE_TAGMANAGER_MIN_INTERVAL_MS>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "google-tag-manager-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-tagmanager@1.3.1"
      ],
      "env": {
        "GOOGLE_TAGMANAGER_CLIENT_ID": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_ID>",
        "GOOGLE_TAGMANAGER_CLIENT_SECRET": "<YOUR_GOOGLE_TAGMANAGER_CLIENT_SECRET>",
        "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_REFRESH_TOKEN>",
        "GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<YOUR_GOOGLE_TAGMANAGER_ACCESS_TOKEN>",
        "GOOGLE_TAGMANAGER_OAUTH_PORT": "<YOUR_GOOGLE_TAGMANAGER_OAUTH_PORT>",
        "GOOGLE_TAGMANAGER_API_BASE": "<YOUR_GOOGLE_TAGMANAGER_API_BASE>",
        "GOOGLE_TAGMANAGER_TIMEOUT_MS": "<YOUR_GOOGLE_TAGMANAGER_TIMEOUT_MS>",
        "GOOGLE_TAGMANAGER_MAX_RETRIES": "<YOUR_GOOGLE_TAGMANAGER_MAX_RETRIES>",
        "GOOGLE_TAGMANAGER_MIN_INTERVAL_MS": "<YOUR_GOOGLE_TAGMANAGER_MIN_INTERVAL_MS>"
      }
    }
  }
}

Let your agent find its tools

Find servers like Google Tag Manager MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.