GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.
{
"mcpServers": {
"io-github-mharnett-gtm-ga4": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Commit history unknown.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
An open-source AI agent that brings the power of Gemini directly into your terminal.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
The full-stack TypeScript framework to build, test, and deploy production-ready MCP servers and AI-native apps.
The leading, most token-efficient MCP server for GitHub source code exploration via tree-sitter AST parsing
MCP Security Weekly
Get CVE alerts and security updates for io.github.mharnett/gtm-ga4 and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP server for Google Tag Manager and GA4 -- tag management, consent auditing, workspace versioning, and analytics reporting via Claude.
npm install mcp-gtm-ga4
Or clone and build:
git clone https://github.com/drak-marketing/mcp-gtm-ga4.git
cd mcp-gtm-ga4
npm install
npm run build
All configuration is via environment variables. No config.json file is needed.
| Variable | Required | Description |
|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | Yes | Path to a GCP service account JSON key file |
| GTM_ACCOUNT_ID | Yes | GTM account ID |
| GTM_CONTAINER_ID | Yes | GTM container ID |
| GA4_PROPERTY_ID | Yes | GA4 property ID |
| GTM_SANDBOX_WORKSPACE_ID | No | Override workspace ID (auto-detects Default Workspace if omitted) |
| MCP_SERVER_NAME | No | Server name (defaults to neon-one-gtm) |
See config.example.json for a reference template.
{
"mcpServers": {
"gtm-ga4": {
"command": "node",
"args": ["/path/to/mcp-gtm-ga4/dist/index.js"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account.json",
"GTM_ACCOUNT_ID": "1234567890",
"GTM_CONTAINER_ID": "9876543",
"GA4_PROPERTY_ID": "331956119"
}
}
}
}
GTM_ACCOUNT_ID=1234567890 \
GTM_CONTAINER_ID=9876543 \
GA4_PROPERTY_ID=331956119 \
GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json \
npx mcp-gtm-ga4
All write operations (gtm_update_tag, gtm_create_tag, gtm_preview, gtm_create_version) verify they target the resolved workspace before executing. If a request attempts to write to a different workspace, the server returns a SafetyError and blocks the operation.
This prevents accidental production changes when the MCP server is configured against a sandbox workspace.
| Tool | Description |
|---|---|
| gtm_list_tags | List all tags in the workspace with consent status and firing triggers |
| gtm_get_tag | Get full tag configuration by tag ID |
| gtm_update_tag | Update an existing tag (merge patch via JSON) |
| gtm_create_tag | Create a new tag from a JSON definition |
| Tool | Description |
|---|---|
| gtm_list_triggers | List all triggers (ID, name, type) |
| gtm_list_variables | List all variables (ID, name, type) |
| Tool | Description |
|---|---|
| gtm_audit_consent | Audit all tags for consent configuration compliance |
| Tool | Description |
|---|---|
| gtm_preview | Generate a quick preview of the current workspace |
| gtm_create_version | Create a new container version from the workspace |
| Tool | Description |
|---|---|
| ga4_run_report | Run a GA4 report with dimensions, metrics, date range, and filters |
| ga4_realtime_report | Run a GA4 realtime report (last 30 minutes) |
| Tool | Description |
|---|---|
| ga4_list_custom_dimensions | List all custom dimensions for the property |
| ga4_create_custom_dimension | Create a new custom dimension |
googleapis (Tag Manager v2)@google-analytics/data (BetaAnalyticsDataClient)@google-analytics/admin (AnalyticsAdminServiceClient)cockatiel (retry, circuit breaker, timeout policies)pino with `pino-pre