Google Tag Manager + read-only GA4 MCP server. Read-only by default, gated writes, audits.
MCPpedia last refreshed this data
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"samarth-gtm": {
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"GOOGLE_REFRESH_TOKEN": "your-refresh-token",
"GTM_MCP_ENABLE_WRITES": "false",
"GTM_MCP_ENABLE_DELETES": "false",
"GTM_MCP_ENABLE_PUBLISH": "false"
},
"args": [
"/absolute/path/to/samarth-gtm-mcp/dist/index.js"
],
"command": "node"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A production-ready Model Context Protocol (MCP) server for the Google Tag Manager API v2, built for Samarth Analytics.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'samarth-gtm-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked samarth-gtm-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 60-95% fewer tokens, same answers. Library, proxy, MCP server.
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
One local source for the MCP servers, tools, and memory your AI coding agents share, synced into each tool's native config with a review gate and a receipt for every change. No daemon, no lock-in.
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
MCP Security Weekly
Get CVE alerts and security updates for io.github.samarthanalytics-sj/samarth-gtm-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A production-ready Model Context Protocol (MCP) server for the Google Tag Manager API v2, built for Samarth Analytics.
Gives Claude Desktop, Cursor, Claude Code, and any MCP-compatible client full, guarded access to GTM — read workspace contents, create/update tags/triggers/variables, audit implementations, publish versions, and more.
New: browser portal with live QC audit. A white-label, browser-based customer experience lives in
apps/portal/. Customers sign in with Google OAuth, pick a GTM account/container/workspace, and run a live, read-only QC audit. Publishes still require Samarth approval. See the portal README for OAuth setup; run withnpm run portal:dev.
ga4_*) plus GA4 Data API reporting (ga4_run_report, ga4_run_realtime_report) for intent-vs-reality reconciliation, all under a single analytics.readonly scopenextPageToken to return all results, with optional maxPages/pageToken boundsGTM_MCP_RETRY_*)confirm=true required on all write/delete/publish operationsOnce the package is on npm, the fastest path is:
# One-time OAuth onboarding (opens your browser; writes a local token file)
GOOGLE_OAUTH_CLIENT_ID=... GOOGLE_OAUTH_CLIENT_SECRET=... npx -y -p samarth-gtm-mcp samarth-gtm-auth
# Run the server (stdio)
npx -y samarth-gtm-mcp
In MCP client configs, use "command": "npx", "args": ["-y", "samarth-gtm-mcp"].
git clone https://github.com/samarthanalytics-sj/samarth-analytics-mcp.git
cd samarth
... [View full README on GitHub](https://github.com/samarthanalytics-sj/samarth-analytics-mcp#readme)