Back to Home
stape-io icon

google-tag-manager-mcp-server

Verified Safe

by stape-io

Overview

This server acts as a middleware to connect MCP (Model Context Protocol) clients with the Google Tag Manager API, enabling programmatic management of GTM accounts, containers, and resources.

Installation

Run Command
wrangler dev

Environment Variables

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • COOKIE_ENCRYPTION_KEY
  • HOSTED_DOMAIN
  • WORKER_HOST
  • MCP_OBJECT

Security Notes

The server uses a robust OAuth provider (`@cloudflare/workers-oauth-provider`) for Google authentication, ensuring secure handling of credentials via environment variables. It explicitly states that it acts as a pass-through proxy, not storing or processing user data or Tag Manager content. HTML sanitization (`sanitizeHtml`) is applied to client information in the approval dialog to prevent XSS. The `/remove` endpoint allows users to revoke access and clear session data, enhancing privacy and security.

Similar Servers

Stats

Interest Score50
Security Score9
Cost ClassMedium
Avg Tokens1000
Stars87
Forks39
Last Update2026-01-13

Tags

MCPGoogle Tag ManagerGTM APIOAuthCloudflare Worker