Google Tag Manager

v1.0.0Marketing & SEOstable

MCP server for Google Tag Manager

gtmgtm-server-sidemcpmcp-serverstape
Share:
155
Stars
0
Downloads
0
Weekly
0/5

What is Google Tag Manager?

Google Tag Manager is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for google tag manager

MCP server for Google Tag Manager

This server falls under the Marketing & SEO category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server for Google Tag Manager

Use Cases

MCP server for Google Tag Manager
stape-io

Maintainer

LicenseApache-2.0
Languagetypescript
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx google-tag-manager

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Google Tag Manager

The Google Tag Manager MCP Server by Stape provides AI assistants with a natural language interface to the Google Tag Manager API, enabling automated creation and management of tags, triggers, and variables across GTM containers. Running as a hosted remote MCP server at gtm-mcp.stape.ai, it eliminates local setup and handles authentication via Google OAuth. Analytics engineers and marketing teams use it to accelerate GTM implementation tasks — from setting up GA4 event tracking to publishing container versions — all through conversational commands in Claude.

Prerequisites

  • A Google account with Editor or Publish access to at least one GTM container
  • Claude Desktop with support for remote MCP connections
  • No local installation needed — the server is hosted remotely by Stape
  • GTM Account ID and Container ID for containers you wish to manage
1

Edit your Claude Desktop configuration

Open Claude Desktop, go to Settings > Developer > Edit Config, and add the GTM MCP server to the mcpServers section.

2

Add the remote server endpoint

Configure the server to connect to the Stape-hosted MCP endpoint via mcp-remote.

3

Restart Claude Desktop

Save the config file and restart Claude Desktop completely so the new server is loaded.

4

Authenticate with Google

When you first invoke a GTM tool, Claude Desktop will open a browser window for Google OAuth. Sign in and grant access to your Google Tag Manager data.

5

Test the connection

Ask Claude to list your GTM accounts to confirm authentication succeeded and the server is responding correctly.

Google Tag Manager Examples

Client configuration

Add this block to claude_desktop_config.json to register the Stape GTM MCP server. Authentication is handled via OAuth — no API keys required in the config.

{
  "mcpServers": {
    "gtm": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://gtm-mcp.stape.ai/mcp"
      ]
    }
  }
}

Prompts to try

These prompts demonstrate how to manage Google Tag Manager containers through your AI assistant.

- "List all GTM containers in my account"
- "Create a GA4 configuration tag in container GTM-XXXXXX with measurement ID G-XXXXXXXXXX"
- "Set up a click trigger that fires when users click elements with class 'cta-button'"
- "Create a dataLayer variable called 'transactionId' in my container"
- "Publish the latest version of container GTM-XXXXXX with the description 'Added GA4 ecommerce tracking'"

Troubleshooting Google Tag Manager

Authentication loop — browser opens repeatedly without completing

Clear cached auth tokens by running 'rm -rf ~/.mcp-auth' in your terminal, then restart Claude Desktop and retry. Ensure no browser extensions are blocking OAuth redirect URLs.

Server not appearing in Claude's available tools

Confirm the config JSON is valid (no trailing commas, correct nesting). You can validate it at jsonlint.com. After fixing, fully quit and reopen Claude Desktop — not just a window close.

Changes made via MCP do not appear in GTM web interface

GTM changes made through the API are saved as workspace drafts. You must publish the container version from the GTM web interface or via a publish command to make changes live on your website.

Frequently Asked Questions about Google Tag Manager

What is Google Tag Manager?

Google Tag Manager is a Model Context Protocol (MCP) server that mcp server for google tag manager It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Google Tag Manager?

Follow the installation instructions on the Google Tag Manager GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Google Tag Manager?

Google Tag Manager works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Google Tag Manager free to use?

Yes, Google Tag Manager is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Marketing & SEO MCP Servers

Explore all marketing & seo servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "google-tag-manager": { "command": "npx", "args": ["-y", "google-tag-manager"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Google Tag Manager?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides