See the demo

Google Tag Manager MCP server: what an AI agent can change in your container

Google doesn't ship an official Tag Manager MCP server. Third-party servers call the Tag Manager API v2, which can create versions and publish containers.

· 8 min read · Gabriel Sorato

Google doesn’t publish an official Google Tag Manager MCP server. As of November 29, 2026, Tag Manager wasn’t listed in Google’s MCP server repository or in Google Cloud’s list of managed MCP servers. The servers that exist are third-party projects built on the Tag Manager API v2, which creates workspaces, edits tags, cuts versions and publishes containers. An agent can do whatever the Google account that authorized it can do.

Google Tag Manager MCP server is the generic name for third-party Model Context Protocol servers that expose the Tag Manager API v2 as tools for an AI agent. What any of them can do is bounded twice: by the OAuth scopes the server requests, and by the account’s container permission (Read, Edit, Approve or Publish).

Is there an official Google Tag Manager MCP server?

No. Google’s two lists, read November 29, 2026, include servers for BigQuery, Cloud SQL, Google Workspace (in developer preview) and Google Analytics, and none for Tag Manager (google/mcp; products with a managed MCP server). The Google Analytics server reads reports and never touches GTM; what it returns is covered in Google Analytics MCP.

The third-party servers, one from a commercial vendor (Stape) and one open-source project, described by their own documentation:

ServerWhat its docs sayScopes requested
stape-io/google-tag-manager-mcp-server20 tools; a hosted version at https://gtm-mcp.stape.io/mcp with Google sign-in, or a local CLI using a service account or token; Apache-2.0 licenseAll seven Tag Manager scopes, listed in packages/core/src/constants/scopes.ts
paolobietolini/gtm-mcp-serverInspects containers, edits workspaces, creates versions and publishes “after explicit confirmation”; BSD-3-Clause licenseFive scopes, “hard-coded in the server and cannot be reduced by configuration”

Sources: both repositories’ READMEs and code, read November 29, 2026. In Stape’s server, the gtm_version tool accepts publish, remove and undelete actions, and gtm_user_permission creates and removes users. The second project’s README says its hosted instance at mcp.gtmeditor.com was shut down on November 20–21, 2026 and that the domain won’t be renewed, so “a future owner could serve something else at that address.” Any MCP client still configured with that URL is pointing an agent at a domain that could change hands.

What can the Tag Manager API v2 let an agent do?

The operations that change a container in the web interface also exist in the API: create a workspace, edit a tag, cut a version and publish. The REST reference, read November 29, 2026, models a container as resources: accounts.containers.workspaces holds in-progress changes, with tags, triggers and variables nested inside; accounts.containers.versions holds snapshots; accounts.user_permissions controls who can reach what.

Three methods decide what goes live:

  • workspaces.create_version builds a version from the workspace’s entities and, per the docs, deletes the workspace and makes the new version the container’s base.
  • versions.publish sends POST .../{path}:publish and accepts a fingerprint that must match the stored version’s (method docs).
  • workspaces.quick_preview creates “a fake container version” for preview, without publishing.

OAuth scopes split those powers, per the authorization page:

ScopeOfficial descriptionWhat it unlocks for an agent
tagmanager.readonly”View your Google Tag Manager containers.”Read tags, triggers, variables and versions
tagmanager.edit.containers”Manage your Google Tag Manager containers.”Create and edit inside a workspace
tagmanager.delete.containers”Delete your Google Tag Manager containers.”Delete a container
tagmanager.edit.containerversions”Manage your Google Tag Manager container versions.”Create versions (create_version)
tagmanager.publish”Publish your Google Tag Manager containers.”Publish (versions.publish)
tagmanager.manage.users”Manage user permissions of your Google Tag Manager data.”Grant and revoke people’s access
tagmanager.manage.accounts”Manage your Google Tag Manager accounts.”Change the account

Rate limits are tight: 10,000 requests per project per day and 0.25 queries per second, enforced on a 100-second sliding window, with a 403 once you go over (limits and quotas). An agent crawling a large container can hit that ceiling; taking a workspace live takes two calls, create_version and then publish.

What does it look like when an agent breaks your container?

GA4 revenue drops to zero on a Friday night while the store keeps selling.

A synthetic example with round numbers. A US apparel brand connects a GTM MCP server to Claude through its analyst’s Google account, which has Publish on the container. The analyst asks: “clean up our ecommerce event names.” The agent switches the GA4 purchase tag’s trigger to a custom event called purchase_complete, which reads better, creates a new version and publishes it. The site keeps pushing purchase into the data layer. By Monday:

SourceFriday to SundaySame days, prior week
Paid orders in the ecommerce platform1,2001,150
purchase events in GA401,050
Purchase conversions imported into Google Ads0980

Nothing throws an error. The tag exists, the trigger exists, and the new version is live with a polite description. Whoever opens GA4 sees a sales slump; whoever opens the store admin sees a normal weekend; and Smart Bidding spends two days optimizing toward a conversion that stopped arriving.

Why does one GTM change rewrite measurement for the whole site?

Because the container is a single configuration loaded on every page, and publishing swaps that configuration for every visitor at once.

Google’s help center says publishing makes changes “active for the environment specified” and that every publish records a version. In the live environment, that’s every visitor. A tag that gets a new trigger has it for every order from that moment on.

Breaking measurement only takes an agent that doesn’t know what the site pushes into dataLayer, and that information isn’t in GTM. The container knows there’s an ecommerce.value variable; it doesn’t know whether checkout fills it before or after a payment redirect. An agent reading the container through the API sees the configuration and can’t see the site.

So the damage cascades. GA4 counts what the tag sent; Google Ads imports the conversion from GA4 or from its own tag; the BigQuery export holds what GA4 received; and any model or agent answering “what did GA4 say we sold” now answers from broken data. A well-written metric definition in a semantic layer stays correct and still returns zero, because the input stopped at the source. What belongs in that definition is in what goes into a semantic layer.

The MCP protocol doesn’t stop any of this on its own. The spec says “there SHOULD always be a human in the loop with the ability to deny tool invocations” and that clients “MUST consider tool annotations to be untrusted unless they come from trusted servers.” The brake belongs to the client and to the person approving the call. The server just relays.

How do you check who can publish your container?

Five checks, all run by whoever administers GTM.

CheckWhere to lookWhat signals risk
Who has PublishGTM Admin > User Management, container levelThe account used to connect the MCP server has Publish or Approve
Which apps can reach the Google accountmyaccount.google.com/linkedapps, “Access to your Google Account,” per Google Account HelpAn MCP app with “Publish your Google Tag Manager containers” in its access list
Where the MCP client pointsClaude, ChatGPT or Cursor configA hosted server URL nobody can vouch for, or a retired domain
What was published, and by whomGTM VersionsA version nobody on the team remembers publishing
How many workspaces are openGTM workspace pickerAn agent-created workspace using one of the standard account’s three slots

The cap of three concurrent workspaces on a standard account (one default, two custom), unlimited on Tag Manager 360, is in the workspaces help page. Permission levels are in user permissions: Edit “has rights to create workspaces and make edits but not create versions or publish”; Approve can create versions but can’t publish; Publish can do all of it.

Then compare GA4 purchase events with platform orders, day by day, for the last 30 days. A step change on the day of a publish points to the version at fault.

How do you give an agent access without handing it the publish button?

1. A dedicated account for the agent, with Edit. Don’t connect the MCP server with your personal account if it has Publish. The paolobietolini/gtm-mcp-server README says “what a user can actually do is still limited by that user’s GTM permissions” and suggests giving a service account “the lowest permission that covers your use”: Read for audits, Edit to change workspaces (README). Google’s API docs don’t describe how scopes and container permissions combine on a page of their own, so test it with the account the agent will use before relying on it: ask the agent to publish and confirm the call fails.

2. The workspace as a gate. With Edit, the agent creates a named workspace (“agent: event naming cleanup”) and stops there. A person reviews the workspace changes, runs preview, and only then creates the version and publishes. If someone else publishes in the meantime, GTM shows “This workspace is out of date” and asks you to resolve conflicts first (workspaces).

3. Read-only for audits. For “which tags fire on the thank-you page” or “which variables nobody uses,” tagmanager.readonly is enough. On a read-only task, a token carrying write scopes gives the agent more than the job needs. How to inventory what each agent can reach is in the agent and MCP permission inventory.

4. Human approval on every write. Set the client to confirm each tool call that writes, as the MCP spec recommends. A publish action should never run without someone reading the diff.

5. A way back before you need it. For an accidental publish, the help center says to revert the workspace to an earlier version and publish it. Know your last good version before an agent gets write access.

6. A source that doesn’t depend on the tag. A GA4 event only proves what the tag sent. The paid order in Shopify or the ERP is the yardstick that shows when the tag stopped. This is where Precisian fits: GA4, Google Ads, Meta and the ecommerce platform land in a data lake isolated per customer, on Precisian’s infrastructure, with a semantic layer on top and access through Precisian’s MCP server, API or the customer’s BI. With orders and events in the same lake, “which day did GA4 stop counting purchases” becomes a question with an answer. Precisian has no MCP connector for GTM and doesn’t edit containers through an agent. If you’re weighing a server-side container, the trade-offs are in is server-side tagging worth it.

When can’t it be fixed?

When the data is already gone. Rolling back fixes the configuration from that point forward. The weekend purchases the tag never sent to GA4 don’t come back, because GA4 never received them.

When the person connecting the MCP server needs Publish. On a small team, the one analyst is often the one account with access, and a second Google account just for the agent may not be practical. Then the only brake is the client’s manual confirmation, which depends on someone reading every call.

When the server fixes its scopes. If a server hard-codes the write scopes, as one README states, the OAuth consent screen won’t let you pick fewer. Your only control left is the container permission.

When the problem is in the site, not the container. If checkout never pushes the order value into the data layer, no agent with GTM access can fix it. The fix lives in the storefront code, and a GTM MCP server is the wrong tool for it.

When the question is only about the container. If all you want is an agent that lists which tags fire where and which variables nobody uses, a Read account and the tagmanager.readonly scope will do. A data lake with a semantic layer adds nothing to that audit, and Precisian is the wrong choice for it.

What does this article not cover?

It isn’t a setup guide for any server and doesn’t recommend one. It doesn’t compare standard Tag Manager with 360 beyond the workspace cap. It doesn’t cover server-side containers in depth, though the API has resources for them (clients, transformations). Tool names, scopes and Google’s lists were checked on November 29, 2026 and change often.


If an AI agent already has access to your GTM, start by opening User Management and checking which permission its account holds on the container. Watch a governed MCP answer over an isolated lake, with no contract commitment.