# Google Tag Manager MCP

> Google Tag Manager MCP is an open-source MCP server for marketing and seo. Inspect and manage Google Tag Manager containers, with drafts kept apart from publishing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Repository:** https://github.com/a1-x-tech/mcp-google-tagmanager
- **MCP Registry name:** io.github.A1-x-Tech/mcp-google-tagmanager
- **Categories:** [marketing and SEO](https://ai-powered.com/categories/marketing-and-seo), [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-11-18

## About

Tag changes are risky when they go live straight away, so this server mirrors Tag Manager's own release path. Accounts hold containers, containers hold workspaces for drafts, tags, triggers and variables live in a workspace, compiling a workspace makes a container version, and publishing makes a version live. Each step is a separate operation, and the assistant is expected to ask before changing anything.

The README counts 25 tools: 10 only read, 4 create drafts or adjust built-in variables, and 5 can alter, delete, compile or publish live configuration. Updates replace a whole resource and are protected by its fingerprint. A typical flow lists containers and the tags firing on page view, then prepares a GA4 configuration tag as a draft without publishing it.

You can say connect Google Tag Manager and the server guides you through creating an OAuth client, catches the redirect on 127.0.0.1 with PKCE and keeps the tokens itself, or you can supply a client ID, secret and refresh token. Google allows 0.25 requests per second per project, so requests are spaced at least 4.2 seconds apart. It needs Node.js 20 or newer.

## Features

- **Draft-first workflow:** Tags, triggers and variables are created in a workspace, and publishing is separate.
- **Conversational sign-in:** Connects Google from the chat using OAuth with PKCE, with no config files.
- **Tiered tools:** 10 read-only tools, 4 draft tools and 5 that can change live configuration.
- **Quota-aware:** Spaces requests by at least 4.2 seconds to respect the 0.25 per second quota.
- **Fingerprint-protected updates:** Whole-resource updates are guarded by the resource's fingerprint.
- **Version compile and publish:** Compiles a workspace into a named version and publishes it deliberately.

## Good for

- List which tags fire on the page-view trigger
- Prepare a GA4 configuration tag as a draft
- Enable the click variables a trigger needs
- Compile and publish a named container version after review

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-google-tagmanager --env GOOGLE_TAGMANAGER_CLIENT_SECRET='<GOOGLE_TAGMANAGER_CLIENT_SECRET>' --env GOOGLE_TAGMANAGER_REFRESH_TOKEN='<GOOGLE_TAGMANAGER_REFRESH_TOKEN>' --env GOOGLE_TAGMANAGER_ACCESS_TOKEN='<GOOGLE_TAGMANAGER_ACCESS_TOKEN>' -- npx -y mcp-google-tagmanager
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-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>"
      }
    }
  }
}
```

## FAQ

### Does it publish automatically?

No. Creating drafts and publishing a version are separate operations.

### What do I need?

Node.js 20 or newer and a Google account with Tag Manager access.

### How does it sign in?

Through an in-chat OAuth flow, or with a client ID, secret and refresh token you supply.

### Why is it slow on big jobs?

Google limits Tag Manager to 0.25 requests per second per project.

### Is Google Tag Manager MCP free?

Yes. Google Tag Manager MCP is open source, so you can use and self-host it for free.

### How do I add Google Tag Manager MCP to Claude Code?

Run this command in your terminal: claude mcp add mcp-google-tagmanager --env GOOGLE_TAGMANAGER_CLIENT_SECRET='<GOOGLE_TAGMANAGER_CLIENT_SECRET>' --env GOOGLE_TAGMANAGER_REFRESH_TOKEN='<GOOGLE_TAGMANAGER_REFRESH_TOKEN>' --env GOOGLE_TAGMANAGER_ACCESS_TOKEN='<GOOGLE_TAGMANAGER_ACCESS_TOKEN>' -- npx -y mcp-google-tagmanager

### What are the best alternatives to Google Tag Manager MCP?

The closest alternatives to Google Tag Manager MCP are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, dashboard-icons, Tapetide - Indian Stock Market MCP and World Monitor.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [dashboard-icons](https://ai-powered.com/mcp/dashboard-icons): dashboard-icons is an open-source MCP server for analytics and data.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [Calven](https://ai-powered.com/mcp/calven): Calven is an MCP server for marketing and seo.
- [DataArcus for Power BI](https://ai-powered.com/mcp/dataarcus-for-power-bi): DataArcus for Power BI is a free MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/google-tag-manager-mcp-2
