MCP server for the Google Tag Manager API v2: containers, workspaces, tags, triggers, publishing.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Google Tag Manager MCP.
list_accountsList all GTM accounts the user can access
get_accountGet one account
list_containersList containers of an account (with `GTM-XXXXXX` public ids)
get_containerGet one container
create_containerCreate a container (`web`, `server`, ...)
list_workspacesList workspaces of a container
English | Π ΡΡΡΠΊΠΈΠΉ
A1 Google Tag Manager MCP lets an AI app inspect and manage Google Tag Manager containers in plain language. See what fires on a page, work with tags, triggers and variables in a draft workspace, then deliberately compile and publish a version when you are ready.
It connects to the Google Tag Manager API v2 through your Google account. The difference from asking an AI to guess a GTM setup is that it works with the actual container, workspace and version you choose.
127.0.0.1 with PKCE and keeps the tokens itself β no config files, no restart.Start with a read-only question:
Which tags in my containers fire on the page-view trigger?
Connect the server Β· Explore use cases Β· Open technical documentation
You: List my GTM containers and show which tags fire on page view.
Assistant: Lists the containers, their workspaces, relevant triggers and the tags attached to them. Nothing changes.
You: In the Default Workspace of
GTM-ABC123, prepare a GA4 configuration tag for measurement IDG-XXXXXXXon all pages.Assistant: Shows the workspace, proposed tag and trigger configuration, then asks for confirmation before creating the draft.
You: Confirm the draft.
Assistant: Creates the tag in the workspace. It does not publish the container; compiling and publishing a version remains a separate step.
You need Node.js 20+ and a Google account. Credentials are not required at install time β the server connects from the conversation.
In the app:
npx -y mcp-google-tagmanager@latest and the three environment variables below.| Variable | Value |
|---|---|
GOOGLE_TAGMANAGER_CLIENT_ID | Your Google OAuth client ID |
GOOGLE_TAGMANAGER_CLIENT_SECRET | Your Google OAuth client secret |
GOOGLE_TAGMANAGER_REFRESH_TOKEN | Your Google OAuth refresh token |
From the command line:
The current official path is Settings β Extensions. For a custom desktop extension, open Advanced settings β Extension Developer β Install Extensionβ¦, select a .mcpb file and follow the prompts.
This repository currently publishes an npm stdio package and does not contain a .mcpb bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:
In those builds, save it to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows.
Add a user-level server to ~/.cursor/mcp.json on macOS/Linux or %USERPROFILE%\.cursor\mcp.json on Windows:
Run MCP: Open User Configuration from the Command Palette and add:
Check it with MCP: List Servers.
April release.42 after I confirm the version and its changes.GTM has a clear release path:
This server can inspect each step. It does not treat a draft as a release: version creation and publishing are separate operations.
| Operation | What happens | Confirmation boundary |
|---|---|---|
| List accounts, containers, workspaces, tags, triggers, variables and versions | Reads GTM configuration | No change |
| Create a container or workspace | Adds a new GTM object | Changes GTM |
| Create a tag, trigger or variable | Adds a draft object to a workspace | Changes a draft workspace |
| Enable or disable built-in variables | Changes the workspace configuration | Changes a draft workspace |
| Update a tag, trigger or variable | Replaces the complete resource, protected by its fingerprint | Potentially destructive |
| Delete a tag, trigger or variable | Removes the selected object | Destructive |
| Compile a workspace | Creates a version and deletes the source workspace | Destructive |
| Publish a version | Makes a selected version live | Destructive |
| Raw API request | Can call API methods without a dedicated tool | Potentially destructive |
The AI client decides how it asks for confirmation. The server marks read-only, write and destructive operations so the client can distinguish inspection from a real change.
Google Tag Manager requires OAuth 2.0; an API key is not enough. There are two ways in, and the first one needs no configuration files.
Say "connect Google Tag Manager" and the assistant runs the flow with you:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/google-tag-manager-mcp)<a href="https://allmcps.com/mcp/google-tag-manager-mcp"><img src="https://allmcps.com/api/badge/google-tag-manager-mcp?style=directory" alt="Google Tag Manager MCP on AllMCPs" /></a>