Google Tag Manager MCP is a Model Context Protocol (MCP) server implemented in Python that wraps the Google Tag Manager API v2. Its core purpose is to let Claude or other MCP-compatible AI clients interact directly with GTM accounts and perform management operations on resources such as tags, triggers, variables, workspaces, versions, and environments through natural language.
In terms of main capabilities, the server provides 18 tools organized by resource, each of which selects a specific operation (such as list, create, publish) via the action parameter, and uses the parent, path, config, params, and confirm fields for resource addressing and configuration. For destructive operations (such as publish, remove, revert, undelete, combine, move_tag_id, move_entities_to_folder, sync, create_version, resolve_conflict, reauthorize, link), confirm=True must be passed explicitly; otherwise the tool returns a structured prompt requiring the call to be repeated, thereby avoiding unintended changes caused by ambiguous instructions.
There are two usage modes. Mode A is local STDIO, suitable for single-user local use: run setup_local_auth.py to complete a one-time Google OAuth flow, the token is saved in ~/.config/gtm-mcp/token.json, and Claude Desktop starts server.py as a subprocess, with no need for Firestore, Cloud Run, or a public URL. Mode B is a remote HTTP server, suitable for Claude Teams, claude.ai, and multi-user scenarios: the server itself is an OAuth 2.1 authorization server, Claude completes authentication through dynamic client registration and Google OAuth delegation, the server issues opaque bearer tokens, and Google credentials never leave the server; each /mcp request carries a bearer, which the server maps to the Google credentials stored for the corresponding user before calling the GTM API. Remote deployment requires a Google Cloud project, enabling the Tag Manager API, creating OAuth 2.0 credentials, configuring the OAuth consent screen and the required scopes; Mode B also requires enabling Firestore to store tokens and deploying to Cloud Run.
Applicable scenarios include: marketing teams managing GTM resources in bulk through natural language, querying or modifying tag configurations in Claude conversations, and unified access to GTM in team collaboration environments. In terms of limitations, the GTM API v2 has a low default quota (about 0.25 QPS, 15 requests per minute, and 10,000 requests per day), which is not automatically increased with billing and must be adjusted manually in the Cloud Console; the client has built-in rate limiting and exponential backoff to adapt to the default quota. In addition, remote mode depends on Google Cloud and Firestore configuration, while local mode is limited to a single user.