
一个用于 Google 标签管理器的 MCP 服务器。连接到你的大型语言模型,认证一次,然后开始通过自然语言管理 GTM。
概览
GTM MCP 服务器将 MCP 客户端连接到 Google 标签管理器 API。它可以检查容器,创建和更新工作区实体,创建版本,并在明确确认后发布选定版本。 该服务器支持基于浏览器的 Google OAuth 用于个人用户,并支持服务账户认证以实现自托管自动化。 约定的API奇偶校验范围已完成。项目实现了谷歌106方法GTM v2发现表中的101种方法。这五种accounts.user_permissions方法被有意排除,因为授予和撤销GTM访问需要单独的权限管理设计。 工具数量和API方法数量是不同的。有些工具提供本地指导,而有些辅助工具则覆盖多个Google API调用。 将托管的URL添加为远程HTTP MCP服务器。客户端应发现OAuth元数据,打开Google登录,并重新连接已发出的持有令牌。 Gemini CLI 也可以使用这些设置。
概述(AI 翻译)
[!重要] 托管实例https://mcp.gtmeditor.com将于2026年11月30日关闭。详情请参见#139。感谢所有使用该实例的人!
GTM MCP 服务器将 MCP 客户端连接到 Google 标签管理器 API。它可以 检查容器,创建和更新工作区实体,创建版本,以及 在明确确认后发布选定版本。
使用托管服务器:
该服务器支持基于浏览器的 Google OAuth 系统,供个人用户使用 自托管自动化的服务账户认证。
项目状态
| 物品 | 当前状态 |
|---|---|
版本见于server.json |
1.12.3 |
| 传输 | MCP 可流式 HTTP |
| 运行时工具 | 默认64个GTM工具;94个带GTM_TOOL_GROUPS=all的工具,加上2个工具工具 |
| MCP资源 | 8个资源定义 |
| MCP提示 | 6个提示 |
| 官方GTM API覆盖 | 106种方法中的101条 |
| 托管端点 | https://mcp.gtmeditor.com |
该项目实现了谷歌106方法GTM v2发现表中的101种方法。这五种accounts.user_permissions方法被有意排除,因为授予和撤销GTM访问属于安全相关,不应由大型语言模型管理。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
GTM MCP Server
[!IMPORTANT]
The hosted instance at https://mcp.gtmeditor.com will be shut down on November 30, 2026. See #139 for details. Thanks to everyone who used it!
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.
Use the hosted server at:
https://mcp.gtmeditor.com
The server supports browser-based Google OAuth for individual users and service-account authentication for self-hosted automation.
Project status
| Item | Current state |
|---|---|
Version in server.json |
1.13.0 |
| Transport | MCP Streamable HTTP, or stdio for local service-account use |
| Runtime tools | 64 GTM tools by default; 94 with GTM_TOOL_GROUPS=all, plus 2 utility tools |
| MCP resources | 8 resource definitions |
| MCP prompts | 6 prompts |
| Official GTM API coverage | 101 of 106 methods |
| Hosted endpoint | https://mcp.gtmeditor.com |
The project implements 101 methods from Google’s 106-method GTM v2 discovery surface. The five accounts.user_permissions methods are intentionally excluded because granting and revoking GTM access are security-related and it shouldn’t be manager by an LLM.
Connect an MCP client
Add the hosted URL as a remote HTTP MCP server. The client should discover the OAuth metadata, open Google sign-in, and reconnect with the issued bearer token.
Claude Code
claude mcp add --transport http gtm https://mcp.gtmeditor.com
Gemini CLI
gemini mcp add --transport http gtm https://mcp.gtmeditor.com
Gemini CLI can also use this settings.json entry:
{
"mcpServers": {
"gtm": {
"httpUrl": "https://mcp.gtmeditor.com"
}
}
}
Cursor
Add the following to .cursor/mcp.json:
{
"mcpServers": {
"gtm": {
"url": "https://mcp.gtmeditor.com"
}
}
}
ChatGPT, Codex, and Claude web
Add a custom or remote MCP connection in the client and use
https://mcp.gtmeditor.com as the server URL. Product menus change more often
than this server, so refer to the client’s current MCP connection instructions
if the label differs.
After connecting, try:
安装
docker run --rm \配置
{
"mcpServers": {
"gtm": {
"httpUrl": "https://mcp.gtmeditor.com"
}
}
}