# GTM MCP Server

> Manage Google Tag Manager through MCP.

- **URL**: https://followmcp.com/en/servers/gtm-mcp-server
- **Category**: Other
- **Origin**: Community
- **Stars**: 195
- **FMRS Score**: 67/100 (Grade C)
- **Source**: https://github.com/paolobietolini/gtm-mcp-server
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Go 1.26+, Docker 2+, Prebuilt binary
- **Auth**: API key / credential required

## Overview
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. It supports Streamable HTTP and local stdio with a service account. The project is in maintenance mode with security fixes only; its public hosted endpoint is shut down, so users must self-host.

## Best for
- Individuals and teams able to self-host and manage GTM through MCP.
- Team OAuth deployments where each user should act with their own Google identity and GTM permissions.
- Automation or local stdio use where a shared service account can be managed securely.
- Users who want selectable MCP tool groups or explicit confirmation for deletes and publication.

## Not for
- Users who need a turnkey public hosted endpoint; the former public endpoint is shut down.
- Users who expect ongoing feature development; the project is in maintenance mode with security fixes only.
- Use cases requiring an LLM to manage GTM account permissions; account user_permissions methods are intentionally excluded.
- Users unwilling to manage service-account credentials, an OAuth client, or self-hosted infrastructure.

## Required permissions
- The Google identity must have the required GTM permissions on target accounts or containers: container Read for audits, Edit for workspace changes, Approve to create versions, and Publish to publish.
- Creating or deleting containers requires the corresponding GTM account administrator access.
- HTTP OAuth mode requires a configured Google OAuth client and requests five fixed Tag Manager scopes; actual actions remain limited by each user's GTM permissions.
- A service account must be granted access in GTM User Management. HTTP service-account mode also requires clients to hold its API key; stdio always requires service-account credentials.

## Risks
- Publishing and deletion can affect GTM. Publication, deletion, and some other operations require explicit confirmation, while account and container operations act directly on those resources.
- Anyone holding the service-account API key or key file can use the service account's GTM permissions.
- The token store contains OAuth tokens and Google refresh tokens; restrict access and protect backups.
- OAuth state is held by a single process, so multiple instances can cause token failures; without persistent token storage, restarts sign users out.
- Without OAuth or an API key, the server starts in open mode and should not be exposed to untrusted networks.

## Tools (96)
- `ping`: Check MCP connectivity.
- `auth_status`: Check whether the current request is authenticated.
- `list_accounts`: List GTM accounts accessible to the current identity.
- `update_account`: Rename a GTM account.
- `list_containers`: List containers and their public IDs and settings.
- `lookup_container`: Find a container by destination ID or GTM public tag ID.
- `get_container_snippet`: Get a web install snippet or server-container configuration.
- `create_container`: Create a web, app, AMP, or server container.
- `update_container`: Rename a container while preserving other settings.
- `delete_container`: Permanently delete a container; confirmation is required.
- `combine_containers`: Merge a source container into a target; requires an opt-in tool group and confirmation.
- `move_tag_id`: Move a tag ID to a new container; requires an opt-in tool group, confirmation, and terms acceptance.
- `list_workspaces`: List workspaces in a container.
- `create_workspace`: Create a workspace.
- `get_workspace`: Get workspace metadata and its current fingerprint.
- `update_workspace`: Update selected workspace fields.
- `delete_workspace`: Delete a workspace; confirmation is required.
- `quick_preview_workspace`: Compile an ephemeral preview without saving or publishing.
- `get_workspace_status`: List added, updated, or deleted entities and merge conflicts.
- `bulk_update_workspace`: Apply multiple entity changes; requires an opt-in tool group and confirmation.
- `resolve_workspace_conflict`: Replace a conflict with a resolved entity; requires an opt-in tool group and confirmation.
- `sync_workspace`: Synchronize with the latest container version; requires an opt-in tool group and confirmation.
- `list_tags`: List workspace tags.
- `get_tag`: Get complete tag details.
- `create_tag`: Create a tag.
- `update_tag`: Update a tag with fingerprint-based concurrency control.
- `delete_tag`: Delete a tag; confirmation is required.
- `list_triggers`: List workspace triggers.
- `get_trigger`: Get complete trigger details.
- `create_trigger`: Create a trigger.
- `update_trigger`: Update a trigger with fingerprint-based concurrency control.
- `delete_trigger`: Delete a trigger; confirmation is required.
- `list_variables`: List workspace variables.
- `get_variable`: Get complete variable details.
- `create_variable`: Create a variable.
- `update_variable`: Update a variable with fingerprint-based concurrency control.
- `delete_variable`: Delete a variable; confirmation is required.
- `list_folders`: List workspace folders.
- `get_folder_entities`: List tags, triggers, and variables assigned to a folder.
- `get_folder`: Get folder metadata; requires an opt-in tool group.
- `create_folder`: Create a folder; requires an opt-in tool group.
- `update_folder`: Update a folder with fingerprint protection; requires an opt-in tool group.
- `delete_folder`: Delete a folder; requires an opt-in tool group and confirmation.
- `move_entities_to_folder`: Move tags, triggers, and variables; requires an opt-in tool group and confirmation.
- `revert_folder`: Discard workspace folder changes; requires an opt-in tool group and confirmation.
- `list_built_in_variables`: List enabled built-in variables.
- `enable_built_in_variables`: Enable built-in variable types.
- `disable_built_in_variables`: Disable built-in variable types; confirmation is required.
- `list_zones`: List all zones across every result page.
- `get_zone`: Get zone boundary, child-container, and type-restriction configuration.
- `create_zone`: Create a workspace zone.
- `update_zone`: Update selected fields with fingerprint-based concurrency control.
- `delete_zone`: Delete a zone; confirmation is required.
- `list_environments`: List all container environments; requires an opt-in tool group.
- `get_environment`: Get environment configuration and authorization metadata; requires an opt-in tool group.
- `create_environment`: Create a user environment; requires an opt-in tool group.
- `update_environment`: Update an environment with fingerprint-based concurrency control; requires an opt-in tool group.
- `reauthorize_environment`: Rotate the authorization code; requires an opt-in tool group and confirmation.
- `delete_environment`: Delete a user environment; requires an opt-in tool group and confirmation.
- `list_destinations`: List Google tag destinations linked to a container; requires an opt-in tool group.
- `get_destination`: Get a destination by link ID; requires an opt-in tool group.
- `link_destination`: Move a destination to a container; requires an opt-in tool group and confirmation.
- `list_google_tag_configs`: List Google tag configurations in a workspace; requires an opt-in tool group.
- `get_google_tag_config`: Get a Google tag configuration; requires an opt-in tool group.
- `create_google_tag_config`: Create a Google tag configuration; requires an opt-in tool group.
- `update_google_tag_config`: Update a Google tag configuration with fingerprint protection; requires an opt-in tool group.
- `delete_google_tag_config`: Delete a Google tag configuration; requires an opt-in tool group and confirmation.
- `list_templates`: List custom templates.
- `get_template`: Get template metadata and code.
- `create_template`: Create a custom template from .tpl code.
- `update_template`: Update template code.
- `delete_template`: Delete an unused template; confirmation is required.
- `import_gallery_template`: Import a Community Template Gallery template.
- `get_tag_templates`: Return GA4 and Custom HTML input examples.
- `get_trigger_templates`: Return trigger input examples.
- `list_clients`: List server-container clients.
- `get_client`: Get a server-container client.
- `create_client`: Create a server-container client.
- `update_client`: Update a server-container client.
- `delete_client`: Delete a server-container client; confirmation is required.
- `list_transformations`: List transformations.
- `get_transformation`: Get a transformation.
- `create_transformation`: Create a transformation.
- `update_transformation`: Update a transformation.
- `delete_transformation`: Delete a transformation; confirmation is required.
- `list_versions`: List headers for all saved versions.
- `get_latest_version_header`: Get the latest saved header, which may differ from the live version.
- `get_version`: Get a saved version and its complete entity collections.
- `get_live_version`: Get the currently published version and its entities.
- `create_version`: Create a version from a conflict-free workspace.
- `publish_version`: Publish a selected version; confirmation is required.
- `update_version`: Update a saved version's name or description; requires an opt-in tool group.
- `delete_version`: Soft-delete a version; requires an opt-in tool group and confirmation.
- `undelete_version`: Restore a soft-deleted version; requires an opt-in tool group and confirmation.
- `set_latest_version`: Make a version Latest without publishing; requires an opt-in tool group and confirmation.
- `revert_workspace_entity`: Discard supported workspace entity changes; requires an opt-in tool group and confirmation.
