Model Context Protocol · Google Tag Manager API v2

B2Tech TagBridge

Your Google Tag Manager, driven in natural language.

B2Tech TagBridge is a Model Context Protocol (MCP) server that connects Claude — or any MCP client — to your Google Tag Manager accounts. With it, the AI assistant reads, audits, creates, versions and publishes containers, tags, triggers and variables directly through the Google Tag Manager API v2, without ever opening the GTM interface. It is for people who use Claude every day and want to operate tracking and tags by chatting — with embedded OAuth login and a secure multi-tenant architecture.

Capabilities

27 tools grouped by function — all implemented and live.

4 tools

Authentication

OAuth login with Google, plus status and refresh of your account token.

7 tools

Accounts & containers

List and read accounts and containers, create a container (web/server/amp/iOS/Android) and build the install snippet.

3 tools

Workspaces

List, inspect the status of, and create workspaces — GTM's editing "branch".

6 tools

Elements

Create, read, update and delete tags, triggers and variables inside a workspace.

2 tools

Built-in variables

Enable and disable the container's built-in variables.

5 tools

Versions & publish

List and read versions and environments, create a version (commit) and publish it to the site (deploy).

How it works

GTM works like git

Account → Container → Workspace (branch) → create_version (commit) → publish (deploy)

Every edit happens in a workspace. create_version snapshots it into an immutable version; publish_version puts that version live. Concurrency is optimistic: each entity carries a fingerprint, and a stale fingerprint returns a conflict asking you to re-read — nothing is overwritten silently.

Security model

Destructive actions (delete element, disable built-in variables, publish) require confirm=true — without it, the tool only returns a preview.

preview=true runs any write as a dry run, returning the exact payload without calling the API.

The tenant is never an argument: in production it is derived from the MCP access token minted by the embedded Authorization Server.

OAuth tokens encrypted at rest (AES-256-GCM) in Supabase, with default-deny RLS; transient cache in Upstash. Humans do not read your GTM data.

Up and running in minutes

Nothing to install locally — the server is hosted.

MCP endpoint

https://gtmmcp.b2tech.io/api/mcp

  1. 01

    On claude.ai: Settings → Connectors → add a custom connector with the MCP endpoint URL. The OAuth handshake (our AS → Google login) runs automatically.

  2. 02

    On Claude Code: run the command below and complete OAuth from the client.

  3. 03

    Ask Claude: "install GA4 and the Meta Pixel in container GTM-XXXXXX", "audit my tags" or "freeze a version and publish".

Claude Code

claude mcp add --transport http gtm https://gtmmcp.b2tech.io/api/mcp

Ready to get started?

Let's talk about how we can help with your next project.

Get in touch