Google Tag Manager
MCP server for Google Tag Manager
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
Maintainer
Works with
Installation
Manual Installation
npx google-tag-managerConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
Edit your Claude Desktop configuration
Open Claude Desktop, go to Settings > Developer > Edit Config, and add the GTM MCP server to the mcpServers section.
Add the remote server endpoint
Configure the server to connect to the Stape-hosted MCP endpoint via mcp-remote.
Restart Claude Desktop
Save the config file and restart Claude Desktop completely so the new server is loaded.
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.
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.
Google Tag Manager Alternatives — Similar Marketing & SEO Servers
Looking for alternatives to Google Tag Manager? Here are other popular marketing & seo servers you can use with Claude, Cursor, and VS Code.
TopRank
★ 2.6kGoogle Ads analysis and operations — read performance, manage keywords, bids, and campaigns.
Open SEO
★ 2.1kOpen source alternative to Semrush and Ahrefs
ASO Skills
★ 1.4kAI agent skills for App Store Optimization (ASO) and app marketing. Built for indie developers, app marketers, and growth teams who want Cursor, Claude Code, or any Agent Skills-compatible AI assistant to help with keyword research, metadata optimiza
Google Meta Ads GA4
★ 994MCP server for Google Ads, Meta Ads & GA4 — works with ChatGPT, Claude, Cursor, n8n, Windsurf & more. 250+ tools for campaign management, analytics & optimization.
Meta Ads
★ 923A Model Context Protocol server that allows AI models to access, analyze, and manage Meta advertising campaigns, enabling LLMs to retrieve performance data, visualize ad creatives, and provide strategic insights for Facebook and Instagram platforms.
Google Search Console
★ 882Connects Google Search Console with Claude AI to enable SEO professionals to analyze their SEO data through natural language conversations, providing access to property information, search analytics, URL inspection, and sitemap management.
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.
Set Up Google Tag Manager in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.