Google Tag Manager MCP Server

MCP server for Google Tag Manager

Remote serverstreamable-httpGo

What is the Google Tag Manager MCP server?

Google tag manager mcp server connects Google Tag Manager to AI assistants that speak the Model Context Protocol. MCP server for Google Tag Manager.

What Google Tag Manager does

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

Tools it exposes

Once connected, the assistant can call this tool directly:

  • Troubleshooting — 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

Installing the google tag manager mcp server

The server is distributed via npm as npm, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 4 environment variables: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, COOKIE_ENCRYPTION_KEY, WORKER_HOST. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Google Tag Manager sits in that group, and the shape of its toolset — Troubleshooting — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This is a hosted server — you point your client at an endpoint rather than running a local process, so there is nothing to keep updated on your machine.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by stape-io, written in Go.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the google tag manager mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
TroubleshootingSome 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), som

How to install the Google Tag Manager MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GOOGLE_CLIENT_IDConfiguration value read at startup.Optional
GOOGLE_CLIENT_SECRETCredential the server authenticates with.Yes
COOKIE_ENCRYPTION_KEYCredential the server authenticates with.Yes
WORKER_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Google Tag Manager to Troubleshooting.

Frequently asked questions

It connects Google Tag Manager to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Troubleshooting) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Google Tag Manager directly.