Google Tag Manager MCP Server logo

Google Tag Manager MCP Server

by stape-io

Connects MCP clients to Google Tag Manager through hosted Google OAuth or a local stdio process.

Install Google Tag Manager MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "stape-io-google-tag-manager-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "google-tag-manager-mcp-server"
      ],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y google-tag-manager-mcp-server

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

stape-io/google-tag-manager-mcp-server exposes Google Tag Manager through MCP, with 20 GTM tools shared by its hosted and local implementations. The hosted service runs at https://gtm-mcp.stape.io/mcp and handles Google OAuth in the browser, while the local CLI runs over stdio and uses credentials supplied by you. Choose the hosted option for a remote HTTP connection with browser-based sign-in, or the CLI when credentials and data should remain on your machine.

Use cases

  • Manage Google Tag Manager through an MCP-compatible client
  • Connect an agent to GTM with browser-based Google OAuth
  • Run GTM operations locally with supplied credentials
  • Keep local-mode GTM data on your machine

Key features

  • 20 Google Tag Manager tools
  • Hosted HTTP MCP endpoint
  • Built-in Google OAuth for hosted connections
  • Local stdio CLI
  • Service account, refresh-token, and access-token authentication
  • Shared tools and schemas across hosted and local modes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

29/30 checks healthy over the last 99d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · google-tag-manager-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars250Stargazers on the source repository.
npm downloads1kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Google Tag Manager MCP Server works

What stape-io/google-tag-manager-mcp-server does

stape-io/google-tag-manager-mcp-server gives MCP-compatible clients an interface to the Google Tag Manager API. Its hosted deployment is available at https://gtm-mcp.stape.io/mcp, while the npm package google-tag-manager-mcp-server provides a local command-line server. Both implementations expose the same set of 20 Google Tag Manager tools.

The project separates the GTM tool definitions from authentication. A shared core package contains the tools and schemas, allowing the hosted worker and local CLI to use the same behavior with different credential flows.

How it works

The hosted option is an HTTP MCP endpoint. Clients that support remote MCP connections and OAuth can connect directly, then complete Google sign-in when prompted. Clients without that combination can use mcp-remote as a bridge to the hosted endpoint.

The local option starts the npm package as an MCP server over stdio. It authenticates with credentials supplied in the client configuration, such as a service account key, refresh token, or access token. In this mode, data is sent through the local process rather than through the hosted service.

Both deployments pass Google access through an authentication provider that supplies an access token to the shared GTM tools. This keeps the available tool set consistent between hosted and local use.

Setup and configuration

For the hosted server, configure the remote URL https://gtm-mcp.stape.io/mcp in an MCP client that supports HTTP and Google OAuth. Claude Desktop, Claude Code, VS Code, Copilot CLI, Cursor, and ChatGPT are listed as clients that can complete the OAuth flow directly. Antigravity and stdio-only clients can connect through mcp-remote.

For the local CLI, run the package with npx -y google-tag-manager-mcp-server and provide credentials through the client’s environment configuration. A service account setup uses the GOOGLE_SERVICE_ACCOUNT_KEY variable. The hosted configuration requires no local credential variable; users authenticate in the browser.

Tools and capabilities

The server provides 20 tools for interacting with Google Tag Manager through its API. The same tools are available regardless of whether authentication comes from the hosted OAuth flow or credentials used by the local CLI. Tool definitions and input schemas are maintained in the shared google-tag-manager-mcp-core package.

Limitations and notes

The hosted and local modes differ in where authentication and data handling occur. Hosted connections pass through gtm-mcp.stape.io and rely on Google OAuth. Local connections require you to manage credentials and keep the MCP process running on your machine.

Client configuration differs by transport. HTTP-capable clients can use the hosted endpoint directly, while clients limited to stdio need the mcp-remote bridge for hosted access. Restarting a client after changing its MCP configuration is required by the installation instructions.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Google Tag Manager MCP Server

stape-io/google-tag-manager-mcp-server is an MCP server that connects MCP clients to the Google Tag Manager API and exposes 20 GTM tools. It offers a hosted HTTP endpoint with Google OAuth or a local stdio CLI using credentials you provide, keeping local-mode data on your machine.

Use the hosted endpoint or run the local npm package. Hosted clients connect to https://gtm-mcp.stape.io/mcp, while local configurations run `npx -y google-tag-manager-mcp-server` and provide an authentication credential.

Yes, Cursor can connect directly to the hosted HTTP endpoint and complete Google OAuth. It can also run the local CLI with an `npx` command and credentials such as `GOOGLE_SERVICE_ACCOUNT_KEY`.

Connect an OAuth-capable MCP client to `https://gtm-mcp.stape.io/mcp`, then sign in with Google when prompted. The hosted deployment handles the OAuth flow; the local CLI instead uses credentials supplied in its environment.

Yes, run the `google-tag-manager-mcp-server` npm package as a stdio MCP server. Supply a service account key, refresh token, or access token; local mode keeps data from passing through the hosted service.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGoogle Tag Manager MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/stape-io-google-tag-manager-mcp-server?style=directory)](https://allmcps.com/mcp/stape-io-google-tag-manager-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/stape-io-google-tag-manager-mcp-server"><img src="https://allmcps.com/api/badge/stape-io-google-tag-manager-mcp-server?style=directory" alt="Google Tag Manager MCP Server on AllMCPs" /></a>