samarth-gtm-mcp
v1.19.0Google Tag Manager + read-only GA4 MCP server.
Values you need
| Variable | What it is | |
|---|---|---|
GOOGLE_OAUTH_CLIENT_ID | required | Your Google OAuth 2.0 client ID (Desktop app type) |
GOOGLE_OAUTH_CLIENT_SECRET | required secret | Your Google OAuth 2.0 client secret |
GTM_MCP_ENABLE_WRITES | optional | Set to 'true' to allow create/update operations (default: read-only) |
GTM_MCP_ENABLE_PUBLISH | optional | Set to 'true' to allow publish operations (default: disabled) |
GTM_MCP_ENABLE_DELETES | optional | Set to 'true' to allow delete operations (default: disabled) |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add samarth-gtm-mcp -e 'GOOGLE_OAUTH_CLIENT_ID=<GOOGLE_OAUTH_CLIENT_ID>' -e 'GOOGLE_OAUTH_CLIENT_SECRET=<GOOGLE_OAUTH_CLIENT_SECRET>' -- npx -y samarth-gtm-mcp@1.19.0Add to
claude_desktop_config.json{
"mcpServers": {
"samarth-gtm-mcp": {
"args": [
"-y",
"samarth-gtm-mcp@1.19.0"
],
"command": "npx",
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
"GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"samarth-gtm-mcp": {
"args": [
"-y",
"samarth-gtm-mcp@1.19.0"
],
"command": "npx",
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
"GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "GOOGLE_OAUTH_CLIENT_ID",
"id": "google-oauth-client-id",
"password": true,
"type": "promptString"
},
{
"description": "GOOGLE_OAUTH_CLIENT_SECRET",
"id": "google-oauth-client-secret",
"password": true,
"type": "promptString"
}
],
"servers": {
"samarth-gtm-mcp": {
"args": [
"-y",
"samarth-gtm-mcp@1.19.0"
],
"command": "npx",
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "${input:google-oauth-client-id}",
"GOOGLE_OAUTH_CLIENT_SECRET": "${input:google-oauth-client-secret}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.samarth-gtm-mcp]
command = "npx"
args = ["-y", "samarth-gtm-mcp@1.19.0"]
env = { "GOOGLE_OAUTH_CLIENT_ID" = "<GOOGLE_OAUTH_CLIENT_ID>", "GOOGLE_OAUTH_CLIENT_SECRET" = "<GOOGLE_OAUTH_CLIENT_SECRET>" }For AI agents
- Ask the user for: GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: accounts_list, accounts_get, containers_list, containers_get, containers_create, containers_snippet, containers_lookup, containers_combine, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json