Main
Use a short server name (
gtm-mcp-server) to avoid client tool-name length limits mentioned in README.Treat OAuth tokens as secrets: if you share a workstation profile, clear local auth state as needed.
Start with read-only GTM operations to validate account/container selection before making changes.
Keep a changelog: when GTM changes are driven by agents, you want a human-readable trail alongside GTM version history.
README (excerpt)
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: You can run rm -rf ~/.mcp-auth to clear any locally stored state and tokens.
rm -rf ~/.mcp-authThen restarting your MCP client.
Source-backed notes
- README provides a Claude Desktop MCP config that runs
npx -y mcp-remote https://gtm-mcp.stape.ai/mcp. - README states OAuth is built-in and an OAuth browser flow runs when the MCP client starts the connector.
- README notes some clients have a combined server+tool name length limit and recommends shorter names.
FAQ
- Do I need to install anything locally?: README uses
npxwithmcp-remote, so Node.js + npx is the main requirement. - Why does a browser window open?: README explains OAuth login is part of the connection flow.
- Tools are missing in my client—why?: README mentions name length limits; use a shorter server name in config.