# Gtm Ga4

> Gtm Ga4 is an open-source MCP server. GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports. It runs locally on your machine and is started by your AI client.

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

## About

GTM + GA4 MCP: tag management, consent auditing, workspace versioning, reports.

## Install

### Claude Code (Terminal)

```sh
claude mcp add gtm-ga4 --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' --env GTM_ACCOUNT_ID='<GTM_ACCOUNT_ID>' --env GTM_CONTAINER_ID='<GTM_CONTAINER_ID>' -- npx -y mcp-gtm-ga4
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "gtm-ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
        "GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
        "GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gtm-ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
        "GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
        "GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "gtm-ga4": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
        "GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
        "GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gtm-ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
        "GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
        "GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gtm-ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>",
        "GTM_ACCOUNT_ID": "<GTM_ACCOUNT_ID>",
        "GTM_CONTAINER_ID": "<GTM_CONTAINER_ID>"
      }
    }
  }
}
```

## FAQ

### Is Gtm Ga4 free?

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

### How do I add Gtm Ga4 to Claude Code?

Run this command in your terminal: claude mcp add gtm-ga4 --env GOOGLE_APPLICATION_CREDENTIALS='<GOOGLE_APPLICATION_CREDENTIALS>' --env GTM_ACCOUNT_ID='<GTM_ACCOUNT_ID>' --env GTM_CONTAINER_ID='<GTM_CONTAINER_ID>' -- npx -y mcp-gtm-ga4

## 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/gtm-ga4
