Google Tag Manager MCP Server
Provides an interface to the Google Tag Manager API with built-in Google OAuth authentication, enabling management of GTM containers, tags, triggers, and variables.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Google Tag Manager MCP Servershow me the tags in my main container"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for Google Tag Manager
This is a server that supports remote MCP connections, with Google OAuth built-in and provides an interface to the Google Tag Manager API.
Access the remote MCP server from Claude Desktop
Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access.
Replace the content with the following configuration. Once you restart Claude Desktop, a browser window will open showing your OAuth login page. Complete the authentication flow to grant Claude access to your MCP server. After you grant access, the tools will become available for you to use.
{
"mcpServers": {
"gtm-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gtm-mcp.stape.ai/mcp"
]
}
}
}Troubleshooting
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., gtm-mcp-server-your-additional-long-name), some tools may be filtered out.
To avoid this issue:
Use shorter server names in your MCP configuration (e.g.,
gtm-mcp-server)
Clearing MCP Cache
mcp-remote stores all the credential information inside ~/.mcp-auth (or wherever your MCP_REMOTE_CONFIG_DIR points to). If you're having persistent issues, try running:
rm -rf ~/.mcp-authThen, restart your MCP client.
Related MCP server: gtm-mcp
Running locally for development/testing
You can run the server on your own machine against your own Google Cloud OAuth
credentials instead of the hosted gtm-mcp.stape.ai server. This is useful for testing
changes before they're deployed.
1. Set up a Google Cloud OAuth client
In the Google Cloud Console, create or select a project, then enable the Tag Manager API.
Go to APIs & Services > OAuth consent screen and configure it (External is fine). While the app is in Testing publishing status, only accounts listed as test users can log in.
Go to Audience, under Test users add your own Google account.
Go to APIs & Services > Credentials > Create Credentials > OAuth client ID, type Web application.
Under Authorized redirect URIs, add
http://localhost:8788/callback. (You can leave Authorized JavaScript origins empty — this flow is server-side only, no browser JS calls Google directly.)Save, then copy the generated Client ID and Client secret.
2. Configure local environment variables
Copy the example file and fill in the values from the previous step:
cp .dev.vars.example .dev.varsGOOGLE_CLIENT_ID="<your client ID>"
GOOGLE_CLIENT_SECRET="<your client secret>"
COOKIE_ENCRYPTION_KEY="<any random string, at least 32 chars, e.g. output of: openssl rand -hex 32>"
WORKER_HOST="http://localhost:8788"
HOSTED_DOMAIN="".dev.vars is git-ignored — it's only used locally and never committed.
3. Start the server
npm install
npm run devThis starts the Worker on http://localhost:8788.
4. Point your MCP client at the local server
Same as the Claude Desktop config above, but pointing at localhost instead of the hosted URL:
{
"mcpServers": {
"gtm-mcp-server-local": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8788/mcp"]
}
}
}Restart Claude Desktop. A browser window will open for the Google OAuth flow; log in with the account you added as a test user in step 1.
Note: if you've previously connected to the hosted server (or switch back and forth between local and hosted), clear mcp-remote's cache first (see "Clearing MCP Cache" above) and fully restart your MCP client, otherwise it may reuse a stale/cached connection.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables comprehensive management of Google Tag Manager accounts, containers, workspaces, tags, triggers, and variables through OAuth2 authentication, allowing users to create, update, and publish GTM configurations via natural language.Last updated26
- Alicense-qualityDmaintenanceEnables natural language management of Google Tag Manager accounts, containers, tags, triggers, variables, and versions, including creation, update, and publishing.Last updatedCreative Commons Zero v1.0 Universal
- Alicense-qualityDmaintenanceEnables AI agents to manage Google Tag Manager accounts, containers, workspaces, tags, triggers, variables, and versions via the Tag Manager API v2.Last updated2Apache 2.0
- Alicense-qualityBmaintenanceEnables LLMs to manage Google Tag Manager containers through exported JSON files, with full CRUD operations on tags, triggers, variables, and folders, plus validation and analysis tools.Last updated212MIT
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Google NotebookLM via natural language: create notebooks, add sources (PDF, URL, YouTube) and ask gr
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/stape-io/google-tag-manager-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server