# Samarth Gtm MCP

> Samarth Gtm MCP is an open-source MCP server. Google Tag Manager + read-only GA4 MCP server. Read-only by default, gated writes, audits. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/samarthanalytics-sj/samarth-analytics-mcp
- **MCP Registry name:** io.github.samarthanalytics-sj/samarth-gtm-mcp
- **Listing updated:** 2026-11-13

## About

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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## 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.

---
Source: https://ai-powered.com/mcp/samarth-gtm-mcp
