GTM MCP Server

[!IMPORTANT]
The hosted instance at mcp.gtmeditor.com was shut down during the night of
20–21 November 2026. There is no longer a public endpoint: to keep using the
server, self-host it. Remove https://mcp.gtmeditor.com
from every MCP client configuration. The domain is not being renewed, so a
future owner could serve something else at that address. See
#139 for
background. Thanks to everyone who used it!
[!NOTE]
This project is in maintenance mode. It is feature-complete and will not
get new features. Only security fixes will be merged. If you want an actively
maintained GTM MCP server, or a hosted endpoint with no setup, use
stape-io/google-tag-manager-mcp-server.
See Alternatives.
GTM MCP Server connects MCP clients to the Google Tag Manager API. It can
inspect containers, create and update workspace entities, create versions, and
publish a selected version after explicit confirmation.
The repository also ships gtm-cli, a command-line tool
that gives people and agents direct GTM access with no server to host.
It authenticates either with browser-based Google OAuth (each user acts with
their own Google identity and GTM permissions) or with a Google service account
(one shared identity, for automation or a single local user).
Contents
Project status
| Item | Current state |
|---|
Version in server.json | 1.15.0 |
| Transport | MCP Streamable HTTP, or stdio for local service-account use |
| Runtime tools | 64 GTM tools by default; 94 with GTM_TOOL_GROUPS=all; plus 2 utility tools in both cases |
| MCP resources | 8 resource definitions (2 resources, 6 URI templates) |
| MCP prompts | 6 prompts |
| Official GTM API coverage | 101 of 106 methods |
| Hosted endpoint | None. mcp.gtmeditor.com was shut down on 20–21 November 2026 |
| Maintenance | Feature-complete. Security fixes only |
The project implements 101 methods from Google's 106-method GTM v2 discovery
surface. The five accounts.user_permissions methods are intentionally
excluded: granting and revoking GTM access is security-sensitive and should not
be managed by an LLM.
Command-line interface
gtm-cli calls the Tag Manager API from your own machine, for shells, scripts and
agents such as Claude Code, Codex and Cursor. There is no server, MCP client
configuration or API key. It covers account, container and workspace discovery,
tag, trigger and variable create, read, update and delete, workspace status, and
version creation and publication. The MCP server covers the rest of the API.
Install
With Go 1.26 or later:
go install github.com/paolobietolini/gtm-mcp-server/cmd/gtm-cli@latest
Releases also attach prebuilt archives named
gtm-cli_<version>_<os>_<arch> to the
release page. From a
clone:
go build -o bin/gtm-cli ./cmd/gtm-cli
Authenticate
Enable the Tag Manager API in a Google
Cloud project. gtm-cli finds credentials as stdio mode does:
GOOGLE_SERVICE_ACCOUNT_KEY_JSON, then Application Default Credentials (the file
in GOOGLE_APPLICATION_CREDENTIALS, then the gcloud login file, then the service
account attached on Google Cloud).
The plain gcloud login is not enough. gcloud auth application-default login
does not request Tag Manager scopes by default. Adding them to --scopes uses
gcloud's own OAuth client, which Google can reject with "This app is blocked"
(troubleshooting).
Use one of these instead.