Skip to content
MCP server

Samarth Gtm MCP

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

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
1.19.0
Listing updated
5 days ago

About Samarth Gtm MCP

Samarth Gtm MCP is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

claude mcp add samarth-gtm-mcp --env GOOGLE_OAUTH_CLIENT_ID='<GOOGLE_OAUTH_CLIENT_ID>' --env GOOGLE_OAUTH_CLIENT_SECRET='<GOOGLE_OAUTH_CLIENT_SECRET>' -- npx -y samarth-gtm-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "samarth-gtm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "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": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
        "GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "samarth-gtm-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
        "GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "samarth-gtm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
        "GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "samarth-gtm-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "<GOOGLE_OAUTH_CLIENT_ID>",
        "GOOGLE_OAUTH_CLIENT_SECRET": "<GOOGLE_OAUTH_CLIENT_SECRET>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • GOOGLE_OAUTH_CLIENT_IDYour Google OAuth 2.0 client ID (Desktop app type)Required
  • GOOGLE_OAUTH_CLIENT_SECRETYour Google OAuth 2.0 client secretRequired
  • GTM_MCP_ENABLE_WRITESSet to 'true' to allow create/update operations (default: read-only)
  • GTM_MCP_ENABLE_PUBLISHSet to 'true' to allow publish operations (default: disabled)
  • GTM_MCP_ENABLE_DELETESSet to 'true' to allow delete operations (default: disabled)

Pricing

Open source

Samarth Gtm MCP FAQ

Is Samarth Gtm MCP free?

Yes. Samarth Gtm MCP is open source, so you can use and self-host it for free.

How do I add Samarth Gtm MCP to Claude Code?

Run this command in your terminal: claude mcp add samarth-gtm-mcp --env GOOGLE_OAUTH_CLIENT_ID='<GOOGLE_OAUTH_CLIENT_ID>' --env GOOGLE_OAUTH_CLIENT_SECRET='<GOOGLE_OAUTH_CLIENT_SECRET>' -- npx -y samarth-gtm-mcp

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers