by stape-io
MCP server for Google Tag Manager
# Add to your Claude Code skills
git clone https://github.com/stape-io/google-tag-manager-mcp-serverGuides for using mcp servers skills like google-tag-manager-mcp-server.
google-tag-manager-mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by stape-io. MCP server for Google Tag Manager. It has 250 GitHub stars.
google-tag-manager-mcp-server's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/stape-io/google-tag-manager-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
google-tag-manager-mcp-server is primarily written in TypeScript. It is open-source under stape-io on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh google-tag-manager-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
An interface to the Google Tag Manager API over MCP, in two flavours: a hosted server with Google OAuth built in, and a local CLI that runs on your own credentials.
npm workspace with one app and two published packages:
| Path | Package | What it is |
|---|---|---|
apps/worker |
(private) | The hosted Cloudflare Worker at gtm-mcp.stape.io: Google OAuth, the approval flow, the public pages, session removal. |
packages/cli |
google-tag-manager-mcp-server |
The npm package: a local MCP server over stdio, authenticating with credentials you supply. |
packages/core |
google-tag-manager-mcp-core |
Every GTM tool and schema, independent of how credentials are obtained. |
Tools reach Google through a GtmAuthProvider (getAccessToken(): Promise<string>) rather than through any particular session, which is what lets the same tool set back both servers — and a private one with your own auth. See the core package README.
This server comes in two flavours: Hosted server and Local CLI. Both give you the same 20 GTM tools; the difference is who handles Google auth.
| Hosted server | Local CLI | |
|---|---|---|
| Auth | Google OAuth in your browser, handled for you | You supply a service account key, refresh token, or access token |
| Data | Passes through gtm-mcp.stape.io |
Only ever leaves your machine |
| Setup | None | Set one environment variable |
If you're a contributor testing an unreleased change rather than just using the tools, skip everything below and see Test your changes locally instead.
Pick your client below. The hosted server is a remote, HTTP-based MCP endpoint at https://gtm-mcp.stape.io/mcp. Clients that complete the Google OAuth flow themselves (Claude Desktop, Claude Code, VS Code, Copilot CLI, Cursor, ChatGPT) connect straight to that URL and sign you in with Google the first time they connect; the rest (Antigravity, stdio-only clients) reach it through mcp-remote, a small bridge to remote HTTP MCP servers. Restart the client after changing its config.
Hosted server, custom connector (recommended).
gtm-mcp-server) and the URL to https://gtm-mcp.stape.io/mcp. If the dialog asks how to authenticate, choose Sign in now; if it asks for an OAuth client, choose Register automatically (the server doesn't support Use Claude's published identity).The connector also works on claude.ai.
Hosted server, mcp-remote. To configure it through claude_desktop_config.json (Settings → Developer → Edit Config) instead:
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gtm-mcp.stape.io/mcp"
]
}
}
}
Local CLI — no OAuth flow, no data through anyone else's server, you supply a service account key or a refresh token. Open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": ["-y", "google-tag-manager-mcp-server"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "{\"type\":\"service_account\", ... }"
}
}
}
}
See the CLI README for every credential option.
Claude Code speaks HTTP directly, including the OAuth handshake, so the hosted server needs no bridge.
Hosted server:
claude mcp add --transport http gtm-mcp-server https://gtm-mcp.stape.io/mcp
Then run /mcp inside Claude Code (or claude mcp login gtm-mcp-server from the shell) and sign in with Google. claude mcp list shows whether it connected.
Local CLI:
claude mcp add gtm-mcp-server -e GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account", ... }' -- npx -y google-tag-manager-mcp-server
Both add the server to the current project only. Add --scope user to use it in every project. --scope project writes it to the project's .mcp.json, which suits the hosted server (no secrets in it, each teammate signs in with their own Google account) but not the Local CLI, whose entry holds your credentials.
VS Code's MCP client supports HTTP servers and their OAuth flow natively, no mcp-remote needed. Add this to .vscode/mcp.json (this workspace) or to the file MCP: Open User Configuration opens (every workspace):
Hosted server:
{
"servers": {
"gtm-mcp-server": {
"type": "http",
"url": "https://gtm-mcp.stape.io/mcp"
}
}
}
VS Code asks you to sign in with Google when the server first starts.
Local CLI:
{
"servers": {
"gtm-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "google-tag-manager-mcp-server"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "{\"type\":\"service_account\", ... }"
}
}
}
}
GitHub Copilot Chat in VS Code uses VS Code's own MCP client, so it reads the same MCP configuration — see VS Code above. No separate configuration is needed.
Hosted server — Copilot CLI completes OAuth natively for remote HTTP servers:
copilot mcp add --transport http gtm-mcp-server https://gtm-mcp.stape.io/mcp
Sign in with Google when Copilot CLI prompts you.
Local CLI:
copilot mcp add --env GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account", ... }' gtm-mcp-server -- npx -y google-tag-manager-mcp-server
Both write the server entry into ~/.copilot/mcp-config.json. Run copilot mcp get gtm-mcp-server to check it. Inside an interactive session, /mcp add does the same through a form. See GitHub's docs for more.
Cursor speaks HTTP directly, including the OAuth flow, no mcp-remote needed. Add this to .cursor/mcp.json (this project) or ~/.cursor/mcp.json (every project):
Hosted server:
{
"mcpServers": {
"gtm-mcp-server": {
"url": "https://gtm-mcp.stape.io/mcp"
}
}
}
Then sign in with Google from the server's entry under Customize in Cursor's sidebar.
Local CLI:
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": ["-y", "google-tag-manager-mcp-server"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "{\"type\":\"service_account\", ... }"
}
}
}
}
Antigravity's OAuth support for remote HTTP servers doesn't get a token to the server yet (antigravity-cli#25), so use mcp-remote for the hosted server here. Add this to ~/.gemini/config/mcp_config.json, which the Antigravity editor and CLI share. In the editor, open it from the agent panel via … → MCP Servers → Manage MCP Servers → View raw config:
Hosted server:
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gtm-mcp.stape.io/mcp"
]
}
}
}
Local CLI:
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": ["-y", "google-tag-manager-mcp-server"],
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "{\"type\":\"service_account\", ... }"
}
}
}
}
Or, from the Antigravity CLI, run one of these (agy mcp add replaces an entry with the same name):
Hosted server:
agy mcp add g