Skip to main content
Glama
Google Tag Manager MCP

Google Tag Manager MCP

by foro-sh

Google Tag Manager MCP

An MCP server for Google Tag Manager, built to deploy on foro.sh as the Google Tag Manager blueprint. The tools are Stape's (google-tag-manager-mcp-core, Apache-2.0), served unchanged behind foro's gate. Stape is not affiliated with foro; see NOTICE.

Read-only by default

Stape registers one tool per resource, with an action that mixes reads and writes (gtm_tag creates, lists and deletes tags). foro allows or blocks whole tools and asks Google only for the scopes the allowed tools need, so this server splits each one:

  • gtm_tag keeps the read actions (get, list) and needs only tagmanager.readonly.

  • gtm_tag_edit takes create, update, remove, revert and needs tagmanager.edit.containers.

  • Actions that need another scope get their own tool: gtm_version_publish (tagmanager.publish), gtm_container_delete (tagmanager.delete.containers), and so on.

tools.ts is the whole table. Each scope is the narrowest Google's discovery document accepts for the method behind the action. A Stape tool or action not in the table is not served, and the tests fail until it is classified, so an upstream release can't slip a write in as a read.

foro-tools.json is what foro reads to tell reads from writes and to pick the scopes. It is generated: run npm run manifest after changing tools.ts.

Related MCP server: Google Tag Manager MCP Server

Sign-in

The server holds no OAuth of its own. foro signs each member in to Google with foro's own Google client and keeps the refresh token; per call, the server asks foro's upstream broker for the caller's access token under the google grant (broker.ts). It only runs inside a foro deploy, which sets FORO_UPSTREAM_BROKER_URL and FORO_UPSTREAM_BROKER_TOKEN.

Development

npm install
npm test

Updating Stape: bump google-tag-manager-mcp-core in package.json, run npm test, classify any new tool or action in tools.ts, then npm run manifest.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Production-grade MCP server for the Google Tag Manager API v2 with read-only GA4 (Admin + Data API) tooling. 107 tools covering the full GTM surface, including server-side containers. Ships read-only: writes, publishes, and deletes are each gated behind separate opt-in flags, every mutation requires per-call confirmation, and a dry-run mode simulates changes. Includes container audits
      203
      663 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to manage Google Tag Manager accounts, containers, workspaces, tags, triggers, variables, and versions via the Tag Manager API v2.
      2
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables reading, drafting, and publishing Google Tag Manager configurations (accounts, containers, tags, triggers, variables, versions) via the Tag Manager API v2, with isolated workspaces for safe edits and explicit publish for production changes.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables LLMs to read and manage Google Tag Manager accounts, containers, workspaces, tags, triggers, variables, versions, and permissions through all 106 API v2 methods, plus task-oriented tools, with ID-based addressing and optional read-only mode.
      112
      MIT