An MCP server for Google Tag Manager. Connect it to your LLM, authenticate once, and start managing GTM through natural language.
# Add to your Claude Code skills
git clone https://github.com/paolobietolini/gtm-mcp-serverGuides for using mcp servers skills like gtm-mcp-server.
Last scanned: 6/5/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-05T08:08:52.699Z",
"npmAuditRan": true,
"pipAuditRan": true
}See how gtm-mcp-server compares with popular alternatives.
gtm-mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by paolobietolini. An MCP server for Google Tag Manager. Connect it to your LLM, authenticate once, and start managing GTM through natural language. It has 194 GitHub stars.
Yes. gtm-mcp-server passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/paolobietolini/gtm-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
gtm-mcp-server is primarily written in Go. It is open-source under paolobietolini on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh gtm-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
[!IMPORTANT] The hosted instance at
mcp.gtmeditor.comwas 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. Removehttps://mcp.gtmeditor.comfrom 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).
| 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.
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.
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
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.
Option 1: your own OAuth client, to act as yourself. In the Google Cloud project, configure the OAuth consent screen, create an OAuth client of type Desktop app and download its JSON file. While an external consent screen is in Testing, add yourself as a test user; Google expires those logins after 7 days.
SCOPES=https://www.googleapis.com/auth/cloud-platform
SCOPES+=,https://www.googleapis.com/auth/userinfo.email
for s in delete.containers edit.containers edit.containerversions manage.accounts publish; do
SCOPES+=,https://www.googleapis.com/auth/tagmanager.$s
done
gcloud auth application-default login \
--client-id-file=client_secret.json --scopes="$SCOPES"
Request fewer tagmanager scopes to limit what the CLI can do, for example only
tagmanager.readonly for audits.
Option 2: a service account, for automation. Create it and add it to GTM as in step 2b, then either point to its key file:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json
or impersonate it without a key. This needs the IAM Service Account Credentials API and the Service Account Token Creator role on that account:
gcloud auth application-default login \
--impersonate-service-account=gtm-mcp@PROJECT_ID.iam.gserviceaccount.com
Check the result:
gtm-cli auth status
It prints the credential source and type, the account email when Google reports one, the quota project, and granted and missing scopes. It exits with code 3 if the credentials have no Tag Manager scope.
If a request fails for lack of a quota project, run
gcloud auth application-default set-quota-project PROJECT_ID.
gtm-cli accounts list --output table
gtm-cli containers list --account 123
gtm-cli workspaces list --account 123 --container 456
export GTM_ACCOUNT_ID=123 GTM_CONTAINER_ID=456 GTM_WORKSPACE_ID=7
gtm-cli tags list
gtm-cli tags create --file tag.json --dry-run
gtm-cli tags create --file tag.json
gtm-cli tags delete --tag-id 12 --confirm
gtm-cli workspaces status
gtm-cli versions create --name "Add sign_up event" --notes "GA4 sign_up on form submit"
gtm-cli versions publish --version-id 9 --confirm
gtm-cli versions get --live
gtm-cli help lists every command and gtm-cli <noun> <verb> --help its flags. A command
gtm-cli <nouns> <verb> matches the MCP tool verb_noun.
Missing --account, --container and --workspace flags are read from the
environment variables above, then from $XDG_CONFIG_HOME/gtm-cli/config.json
(normally ~/.config/gtm-cli/config.json), or from the file named by GTM_CONFIG:
{"accountId": "123", "containerId": "456", "workspaceId": "7"}
No configuration is read from the working directory, including .env.
--file takes a JSON object (- reads stdin):
{
"name": "HTML - Banner",
"type": "html",
"firingTriggerId": ["12"],
"parameter": [{"type": "template", "key": "html", "value": "<script></script>"}]
}
Parameter and condition shapes are in
tool-input-formats.md; the
gtm-cli skill lists the keys for each entity.
Unknown keys are rejected. On update, tags keep every omitted key; triggers and
variables require name and type and keep other omitted keys.
gtm-cli workspaces status lists each entity the workspace adds, updates or
deletes, and each merge conflict:
{"status": {"hasChanges": true, "hasConflicts": false, "changeCount": 1, "conflictCount": 0,
"changes": [{"type": "tag", "id": "4", "name": "GA4 - purchase", "changeStatus": "updated"}],
"conflicts": []}}
--entities adds each entity in full, in the shape of the collections that
gtm-cli versions get --latest returns, so the two can be compared field by
field. examples/workspace-diff.sh pairs them and
runs diff -u on each changed entity:
--- tag/4 "GA4 - purchase" in the latest version
+++ tag/4 "GA4 - purchase" in the workspace (updated)
@@ -14,7 +14,7 @@
{
"key": "measurementIdOverride",
"type": "template",
- "value": "G-OLD"
+ "value": "G-NEW"
}
The comparison is with the latest version, which the workspace is based on, not with the live version. Update an out-of-date workspace first.
API commands print JSON with the same shape as the matching MCP tool's output;
--output table is for reading. Errors are JSON on stderr:
{"error": {"code": "not_found", "message": "resource not found: ..."}}
| Exit | error.code |
|---|---|
| 0 | success |
| 1 | api_error, cancelled, error |
| 2 | usage, invalid_input, invalid_request |
| 3 | auth |
| 4 | permission_denied |
| 5 | not_found |
| 6 | conflict, precondition_failed |
| 7 | rate_limited |
| 8 | confirmation_required |
A command gives up after two minut