Back to Home
ambit1977 icon

GTM-MCP

Verified Safe

by ambit1977

Overview

Automate and manage Google Tag Manager (GTM) accounts, containers, workspaces, tags, triggers, variables, and versions through an MCP server.

Installation

Run Command
npm start

Environment Variables

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GOOGLE_REDIRECT_URI
  • GTM_TOKEN_PATH

Security Notes

The server uses standard OAuth2 for Google API authentication, storing tokens securely in a local file (`~/.gtm-mcp-token.json`). Sensitive credentials (Client ID/Secret) are correctly sourced from environment variables. The use of `execAsync('open "${authUrl}"')` is for opening a browser on macOS during initial authentication, where `authUrl` is generated internally by `googleapis`, posing no apparent injection risk. Input sanitization is implicitly handled by the `googleapis` library for API requests, and explicitly for `filter` and `autoEventFilter` parameters by attempting `JSON.parse` if they are strings.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens400
Stars0
Forks0
Last Update2025-12-04

Tags

Google Tag ManagerGTMMCPTag ManagementAPI AutomationMarketing Analytics