Google Tagmanager MCP server
{
"mcpServers": {
"a1-x-tech-google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager@latest"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_ID": "<google_tagmanager_client_id>",
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google_tagmanager_client_secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google_tagmanager_refresh_token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google_tagmanager_access_token>"
}
}
}
}{
"mcpServers": {
"a1-x-tech-google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager@latest"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_ID": "<google_tagmanager_client_id>",
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google_tagmanager_client_secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google_tagmanager_refresh_token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google_tagmanager_access_token>"
}
}
}
}{
"mcpServers": {
"a1-x-tech-google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager@latest"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_ID": "<google_tagmanager_client_id>",
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google_tagmanager_client_secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google_tagmanager_refresh_token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google_tagmanager_access_token>"
}
}
}
}{
"servers": {
"a1-x-tech-google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager@latest"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_ID": "${input:google_tagmanager_client_id}",
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "${input:google_tagmanager_client_secret}",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "${input:google_tagmanager_refresh_token}",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "${input:google_tagmanager_access_token}"
}
}
},
"inputs": [
{
"id": "google_tagmanager_client_id",
"type": "promptString",
"description": "Google tagmanager client id",
"password": true
},
{
"id": "google_tagmanager_client_secret",
"type": "promptString",
"description": "Google tagmanager client secret",
"password": true
},
{
"id": "google_tagmanager_refresh_token",
"type": "promptString",
"description": "Google tagmanager refresh token",
"password": true
},
{
"id": "google_tagmanager_access_token",
"type": "promptString",
"description": "Google tagmanager access token",
"password": true
}
]
}{
"mcpServers": {
"a1-x-tech-google-tagmanager": {
"command": "npx",
"args": [
"-y",
"mcp-google-tagmanager@latest"
],
"env": {
"GOOGLE_TAGMANAGER_CLIENT_ID": "<google_tagmanager_client_id>",
"GOOGLE_TAGMANAGER_CLIENT_SECRET": "<google_tagmanager_client_secret>",
"GOOGLE_TAGMANAGER_REFRESH_TOKEN": "<google_tagmanager_refresh_token>",
"GOOGLE_TAGMANAGER_ACCESS_TOKEN": "<google_tagmanager_access_token>"
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall npx -y mcp-google-tagmanagerversion 1.1.0
What it does
MCP server for Google Tag Manager API v2 that lets you inspect and manage GTM containers, workspaces, tags, triggers, and variables through plain language. Designed for developers and marketers who need to read GTM configuration, draft changes in workspaces, and publish versions deliberately.
- Query which tags fire on specific triggers across your GTM containers without making changes.
- Create new GA4 configuration tags or other tags in a draft workspace, then compile and publish a version when ready.
- Inspect and modify built-in variables, triggers, and container settings through conversation with an AI assistant.
Tools this server exposes
| Tool | Does |
|---|---|
| listAccounts | List all Google Tag Manager accounts accessible to you. |
| getAccount | Get details about a specific account. |
| listContainers | List all containers in a specific account. |
| getContainer | Get details about a specific container. |
| listWorkspaces | List all workspaces in a specific container. |
| getWorkspace | Get details about a specific workspace. |
| listTags | List all tags in a specific workspace. |
| getTag | Get details about a specific tag. |
| createTag | Create a new tag in a workspace. |
| updateTag | Update an existing tag in a workspace. |
| deleteTag | Delete a tag from a workspace. |
| listTriggers | List all triggers in a specific workspace. |
| getTrigger | Get details about a specific trigger. |
| createTrigger | Create a new trigger in a workspace. |
| updateTrigger | Update an existing trigger in a workspace. |
| listVariables | List all variables in a specific workspace. |
| getVariable | Get details about a specific variable. |
| updateBuiltInVariable | Enable or disable a built-in variable in a workspace. |
| listVersions | List all versions of a container. |
| createVersion | Compile a workspace into a new container version. |
| publishVersion | Publish a container version to production. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.