Skip to content
VS Code

samarth gtm mcp for VS Code

io.github.samarthanalytics-sj/samarth-gtm-mcp

Google Tag Manager + read-only GA4 MCP server. Read-only by default, gated writes, audits.

client:VS Code transport:stdio runtime:npm

Install samarth gtm mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "google-oauth-client-id",
      "description": "GOOGLE_OAUTH_CLIENT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-oauth-client-secret",
      "description": "GOOGLE_OAUTH_CLIENT_SECRET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gtm-mcp-enable-writes",
      "description": "GTM_MCP_ENABLE_WRITES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gtm-mcp-enable-publish",
      "description": "GTM_MCP_ENABLE_PUBLISH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gtm-mcp-enable-deletes",
      "description": "GTM_MCP_ENABLE_DELETES",
      "password": true
    }
  ],
  "servers": {
    "samarth-gtm-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "${input:google-oauth-client-id}",
        "GOOGLE_OAUTH_CLIENT_SECRET": "${input:google-oauth-client-secret}",
        "GTM_MCP_ENABLE_WRITES": "${input:gtm-mcp-enable-writes}",
        "GTM_MCP_ENABLE_PUBLISH": "${input:gtm-mcp-enable-publish}",
        "GTM_MCP_ENABLE_DELETES": "${input:gtm-mcp-enable-deletes}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

samarth gtm mcp in other clients