google-tag-manager-mcp-server

MCP.Pizza Chef: stape-io

Nineteen tools reach across accounts, containers, workspaces, tags, triggers, variables, folders, templates, and user permissions, and most of them can create, change, and delete, not merely look. One can publish a container version, which puts changes live on a real website straight away, so point it at a test container before trusting it with anything important. Stape runs it as a hosted service you sign into with Google, so there is no key to copy anywhere; you paste a short config block and approve the sign-in in your browser.

Data
Other

Use This MCP server To

List every tag in a container and what fires it Find tags that are no longer used anywhere Create a new tracking tag from a description I write Check which container version is currently live Review who has access to a Tag Manager account Publish a workspace once I have checked the changes

README

MCP Server for Google Tag Manager

Trust Score

This is a server that supports remote MCP connections, with Google OAuth built-in and provides an interface to the Google Tag Manager API.

Access the remote MCP server from Claude Desktop

Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access.

Replace the content with the following configuration. Once you restart Claude Desktop, a browser window will open showing your OAuth login page. Complete the authentication flow to grant Claude access to your MCP server. After you grant access, the tools will become available for you to use.

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

Troubleshooting

MCP Server Name Length Limit

Some MCP clients (like Cursor AI) have a 60-character limit for the combined MCP server name + tool name length. If you use a longer server name in your configuration (e.g., gtm-mcp-server-your-additional-long-name), some tools may be filtered out.

To avoid this issue:

  • Use shorter server names in your MCP configuration (e.g., gtm-mcp-server)

Clearing MCP Cache

mcp-remote stores all the credential information inside ~/.mcp-auth (or wherever your MCP_REMOTE_CONFIG_DIR points to). If you're having persistent issues, try running:

rm -rf ~/.mcp-auth

Then, restart your MCP client.

Running locally for development/testing

You can run the server on your own machine against your own Google Cloud OAuth credentials instead of the hosted gtm-mcp.stape.ai server. This is useful for testing changes before they're deployed.

google-tag-manager-mcp-server FAQ

Do I need a key or token?
No key. You sign in with the Google account that already has Tag Manager access and approve it in a browser window.
Can it change my live website tracking, or only report on it?
It can change things. Tags, triggers, and variables can be created, edited, and deleted, and a version can be published straight to the live site.
Can I use this to clean up an overgrown container?
Yes. It can list everything in a workspace so you can spot unused tags, remove them, and publish once you approve.
Which apps does it work in?
Claude Desktop, Cursor, and other tools that accept a small config block pointing at the hosted address.
How do I stop it breaking something?
Work in a test container or a separate workspace, and have it read back exactly what it plans to change before letting it publish.
Do I have to trust someone else's server?
By default the connection runs through Stape's hosted address, but the project is open source and the instructions cover running it on your own machine instead.