Wascer GTM MCP Server

Wascer GTM MCP Server

A 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.

Category
访问服务器

README

Wascer GTM MCP Server

MCP server that allows AI assistants (Claude, Cursor, etc.) to manage Google Tag Manager using natural language.

How to connect

With Service Account (recommended)

Claude Desktop

Settings → Developer → Edit Config:

{
  "mcpServers": {
    "wascer-gtm": {
      "command": "bash",
      "args": [
        "-c",
        "npx -y mcp-remote https://gtm-mcp.wascer.com/mcp --header \"X-GTM-Service-Account: $(base64 -w 0 $GTM_SERVICE_ACCOUNT_FILE)\""
      ],
      "env": {
        "GTM_SERVICE_ACCOUNT_FILE": "/path/to/service-account.json"
      }
    }
  }
}

Cursor

Settings → MCP → Add Server:

{
  "mcpServers": {
    "wascer-gtm": {
      "command": "bash",
      "args": [
        "-c",
        "npx -y mcp-remote https://gtm-mcp.wascer.com/mcp --header \"X-GTM-Service-Account: $(base64 -w 0 $GTM_SERVICE_ACCOUNT_FILE)\""
      ],
      "env": {
        "GTM_SERVICE_ACCOUNT_FILE": "/path/to/service-account.json"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json or user settings:

{
  "mcpServers": {
    "wascer-gtm": {
      "command": "bash",
      "args": [
        "-c",
        "npx -y mcp-remote https://gtm-mcp.wascer.com/mcp --header \"X-GTM-Service-Account: $(base64 -w 0 $GTM_SERVICE_ACCOUNT_FILE)\""
      ],
      "env": {
        "GTM_SERVICE_ACCOUNT_FILE": "/path/to/service-account.json"
      }
    }
  }
}

Claude Code

claude mcp add wascer-gtm \
  -e GTM_SERVICE_ACCOUNT_FILE="/path/to/service-account.json" \
  -- bash -c 'npx -y mcp-remote https://gtm-mcp.wascer.com/mcp --header "X-GTM-Service-Account: $(base64 -w 0 $GTM_SERVICE_ACCOUNT_FILE)"'

Just replace /path/to/service-account.json with the actual path to your Service Account JSON file. The base64 encoding is handled automatically.

Without Service Account

If you don't have a Service Account, the MCP will use your Google OAuth login instead. You'll have access to GTM accounts that your Google account has permission on.

Claude Desktop / Cursor / VS Code

{
  "mcpServers": {
    "wascer-gtm": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://gtm-mcp.wascer.com/mcp"]
    }
  }
}

Claude Code

claude mcp add wascer-gtm -- npx mcp-remote https://gtm-mcp.wascer.com/mcp

When connecting, the browser opens for Google login. After authenticating, the tools become available.

What you can do

Using natural language, you can ask the AI to:

  • List GTM accounts and containers
  • Create web and server-side containers
  • Create and edit tags, triggers and variables
  • Enable built-in variables (Page URL, Event, Click ID, etc.)
  • Create server-side clients (GA4 client, etc.)
  • Create and publish versions

Usage example

In my GTM account, create a web container called "my-site" with:
- GA4 ID variable with value G-XXXXXXXX
- All Pages trigger
- GA4 Configuration tag pointing to the server
- Publish it

The AI executes all operations automatically via the Google Tag Manager API.

Available tools

Tool Operations Description
gtm_account get, list, update Manage GTM accounts
gtm_container create, get, list, update, remove, snippet Manage containers (web & server)
gtm_workspace create, get, list, update, remove, createVersion, getStatus, sync Manage workspaces and create versions
gtm_tag create, get, list, update, remove, revert Manage tags
gtm_trigger create, get, list, update, remove, revert Manage triggers
gtm_variable create, get, list, update, remove, revert Manage variables
gtm_version get, live, publish, remove, setLatest, undelete, update Manage and publish versions
gtm_built_in_variable create, list, remove, revert Enable/disable built-in variables
gtm_client create, get, list, update, remove, revert Manage server-side clients

Authentication

Google OAuth (default)

When connecting, you log in with your Google account. The MCP accesses GTM accounts that your account has permission on. No additional configuration needed.

Service Account (optional)

For platform-level access (e.g. managing client accounts), point to your Service Account JSON file in the MCP configuration (as shown in the connection examples above). The file is read locally, base64 encoded automatically, and sent via HTTP header — it never appears in chat and is never sent to the LLM.

How to get a Service Account JSON

  1. Go to Google Cloud Console → IAM & Admin → Service Accounts
  2. Create a Service Account (or use an existing one)
  3. Create a JSON key and download it
  4. Save the JSON file somewhere on your machine (e.g. ~/keys/service-account.json)
  5. Use the file path in the GTM_SERVICE_ACCOUNT_FILE env var in your MCP config
  6. In Google Tag Manager, add the SA email as an admin on the accounts you want to manage

Troubleshooting

Reset authentication

rm -rf ~/.mcp-auth

Restart your MCP client to re-login.

"Access blocked" on Google login

Make sure your Google account has access to Tag Manager and the OAuth app has GTM scopes enabled.

Tools not showing up

Use a short server name (e.g. wascer-gtm). Some clients have a 60-character limit for name + tool.

License

Apache-2.0

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选