Are you the author? Sign in to claim
MCP server for Google Tag Manager ( UnboundAI)
This is an MCP server that provides an interface to the Google Tag Manager API using Google Application Default Credentials (ADC).
Setup involves the following steps:
Follow the instructions to enable the Google Tag Manager API in your Google Cloud project:
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.containers
Check 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_FILE
Set 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]
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_JSON with 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"
}
}
}
}
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:
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 DEBUG environment variable to true or 1:
{
"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_LEVEL environment 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 messagesExample:
{
"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:
~/Library/Logs/Claude/mcp*.log%APPDATA%\Claude\logs\mcp*.logDebug logging provides detailed information about:
Note: Debug logging may produce verbose output. It's recommended to enable it only when troubleshooting issues.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows