unboundai-gtm-mcp-server
Provides tools for managing Google Tag Manager containers, tags, triggers, and variables through the Google Tag Manager API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@unboundai-gtm-mcp-server list my GTM containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for Google Tag Manager
This is an MCP server that provides an interface to the Google Tag Manager API using Google Application Default Credentials (ADC).
Setup instructions
Setup involves the following steps:
Install Node.js (v20 or later recommended)
Enable Google Tag Manager API in your Google Cloud project
Configure Google Application Default Credentials (ADC)
Configure your MCP client (Claude Desktop, Gemini CLI, etc.)
Enable Google Tag Manager API
Follow the instructions to enable the Google Tag Manager API in your Google Cloud project:
Configure Google Application Default Credentials
Configure your Application Default Credentials (ADC). Make sure the credentials are for a user with access to your Google Tag Manager accounts.
Credentials must include the Google Tag Manager edit scope:
https://www.googleapis.com/auth/tagmanager.edit.containersCheck out Manage OAuth Clients for how to create an OAuth client.
Here are some sample gcloud commands you might find useful:
Set up ADC using user credentials and an OAuth desktop or web client after downloading the client JSON to
YOUR_CLIENT_JSON_FILE.gcloud auth application-default login \ --scopes https://www.googleapis.com/auth/tagmanager.edit.containers,https://www.googleapis.com/auth/cloud-platform \ --client-id-file=YOUR_CLIENT_JSON_FILESet up ADC using service account impersonation.
gcloud auth application-default login \ --impersonate-service-account=SERVICE_ACCOUNT_EMAIL \ --scopes=https://www.googleapis.com/auth/tagmanager.edit.containers,https://www.googleapis.com/auth/cloud-platform
When the gcloud auth application-default command completes, copy the PATH_TO_CREDENTIALS_JSON file location printed to the console in the following message. You'll need this for the next step!
Credentials saved to file: [PATH_TO_CREDENTIALS_JSON]Configure Claude Desktop
Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access.
Add the following configuration. Replace
PATH_TO_CREDENTIALS_JSONwith the path you copied in the previous step:
{
"mcpServers": {
"unboundai-gtm-mcp-server": {
"command": "npx",
"args": ["-y","@unboundai/gtm-mcp-server"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON"
}
}
}
}Restart Claude Desktop. The tools will become available for you to use.
Related MCP server: GTM MCP Server
Troubleshooting
MCP Server Name Length Limit
Some MCP clients (like Cursor AI) have a 60-character limit for the combined MCP server name + tool name length. If you use a longer server name in your configuration (e.g., unboundai-gtm-mcp-server-your-additional-long-name), some tools may be filtered out.
To avoid this issue:
Use shorter server names in your MCP configuration (e.g.,
unboundai-gtm-mcp-server)
Debugging Server Issues
If the MCP server crashes or encounters issues, you can enable comprehensive debug logging to diagnose the problem:
Enable Debug Mode: Set the
DEBUGenvironment variable totrueor1:{ "mcpServers": { "unboundai-gtm-mcp-server": { "command": "npx", "args": ["-y", "@unboundai/gtm-mcp-server"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON", "DEBUG": "true" } } } }Control Log Level: Alternatively, set the
LOG_LEVELenvironment variable to control logging verbosity:DEBUG: Shows all debug messages (most verbose)INFO: Shows informational messages and above (default)WARN: Shows only warnings and errorsERROR: Shows only error messages
Example:
{ "mcpServers": { "unboundai-gtm-mcp-server": { "command": "npx", "args": ["-y", "@unboundai/gtm-mcp-server"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_CREDENTIALS_JSON", "LOG_LEVEL": "DEBUG" } } } }Check MCP Client Logs: The debug output is written to stderr and will appear in your MCP client's logs. In Claude Desktop:
macOS:
~/Library/Logs/Claude/mcp*.logWindows:
%APPDATA%\Claude\logs\mcp*.log
Debug logging provides detailed information about:
Server initialization and startup
Environment configuration
Authentication with Google APIs
Tool registration
API calls and responses
Error details with stack traces
Note: Debug logging may produce verbose output. It's recommended to enable it only when troubleshooting issues.
Available Tools
18 toolsgtm_accountA
Performs all account-related operations: get, list, update. Use the 'action' parameter to select the operation.
Inputs: action (required), accountId (required), config.
gtm_built_in_variableC
Performs all built-in variable operations: create, list, remove, revert. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_clientB
Performs all client operations: create, get, list, update, remove, revert. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_containerB
Performs all container-related operations: create, get, update, remove, list, combine, lookup, moveTagId, snippet. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), page, containerId, +6 more.
gtm_destinationC
Performs all destination operations: get, list, link, unlink. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), containerId (required), page, +3 more.
gtm_environmentC
Performs all environment operations: create, get, list, update, remove, reauthorize. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), containerId (required), page, +4 more.
gtm_folderB
Performs all folder operations: create, get, list, update, remove, revert, entities, moveEntitiesToFolder. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +8 more.
gtm_gtag_configA
Performs all Google tag config operations: create, get, list, update, remove. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_tagC
Performs all GTM tag operations: create, get, list, update, remove, revert. The 'list' action returns up to 20 items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_templateB
Performs all GTM custom template operations: create, get, list, update, remove, revert. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_transformationC
Performs all GTM transformation operations: create, get, list, update, remove, revert. The 'list' action returns up to itemsPerPage items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_triggerA
Performs all GTM trigger operations: create, get, list, update, remove, revert. The 'list' action returns up to 20 items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_user_permissionB
Performs all user permission operations: create, get, list, update, remove. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), page, itemsPerPage, +2 more.
gtm_variableB
Performs all GTM variable operations: create, get, list, update, remove, revert. The 'list' action returns up to 20 items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
gtm_versionA
Performs all container version operations: get, live, publish, remove, setLatest, undelete, update. For 'get' and 'live' actions, use 'resourceType' to paginate specific resource arrays (up to 20 items per page) to avoid response truncation.
Inputs: action (required), accountId (required), containerId (required), page, +6 more.
gtm_version_headerB
Performs all container version header operations: list, latest. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), containerId (required), page, +2 more.
gtm_workspaceB
Performs various workspace operations including create, get, list, update, remove, createVersion, getStatus, sync, quickPreview, and resolveConflict actions. The 'list' action returns up to 50 items per page.
Inputs: action (required), accountId (required), containerId (required), page, +6 more.
gtm_zoneB
Performs various zone operations including create, get, list, update, remove, and revert actions. The 'list' action returns up to 20 items per page.
Inputs: action (required), accountId (required), containerId (required), workspaceId (required), +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool is named after a distinct GTM resource, and there is no overlap in the resource types they operate on. Examples include gtm_container, gtm_tag, and gtm_account, which clearly separate concerns.
All tools follow a consistent pattern of 'gtm_' followed by the resource name (e.g., gtm_workspace, gtm_trigger). No mixing of naming conventions or verb styles.
With 18 tools covering the main GTM entities (containers, tags, triggers, workspaces, etc.), the count is well-scoped for a comprehensive management server. Each tool earns its place.
The toolset covers all major GTM resource types, including containers, accounts, workspaces, tags, triggers, variables, environments, folders, and more. Only niche or rarely used entities are absent, making the surface complete for typical GTM management.
Maintenance
Related MCP Connectors
Hosted Google Tag Manager MCP server, with each action switched on or off per account.
Google Ads MCP server — manage campaigns, keywords, and metrics.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Hosted Google Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that provides a conversational interface to Google Tag Manager API, allowing users to manage tags, triggers, variables, and containers through natural language.-
- AlicenseNot gradedqualityCmaintenanceMCP server for Google Tag Manager API v2, enabling programmatic management of accounts, containers, workspaces, tags, triggers, variables, and version workflows.40 npm15MIT
- FlicenseNot gradedqualityBmaintenanceA remote MCP server for Google Tag Manager that enables AI assistants to manage GTM accounts, containers, tags, triggers, variables, and more via OAuth or service account authentication.1-
- AlicenseAqualityFmaintenanceAn MCP server for the Google Tag Manager API v2 that enables AI assistants to query GTM accounts, containers, tags, triggers, variables, and unpublished changes.241Apache 2.0