Gtm Ga4 MCP Server

MCP server for Google Tag Manager and GA4 -- tag management, consent auditing, workspace versioning, and analytics reporting via Claude. Its 13 documented tools cover gtm, ga4, tag, report. It runs locally over stdio via the published package.

People connecting data & analytics tools to Claude, Cursor, VS Code, or another MCP client. The project is written in TypeScript.

VERIFIED ACTIVE

LAST COMMIT 2026-07-24 · ★ 2 · #45 OF 75 MAINTAINED DATA & ANALYTICS · VERIFIED 2026-08-25

MIT · TypeScript servers · how we verify → /methodology

01 · Install Gtm Ga4

before you install - you'll need

Set GOOGLE_APPLICATION_CREDENTIALS, GTM_ACCOUNT_ID, GTM_CONTAINER_ID, GA4_PROPERTY_ID, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET before connecting.

Claude Code

claude mcp add mharnett-mcp-gtm-ga4 -- npx -y mcp-gtm-ga4

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "mharnett-mcp-gtm-ga4": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-gtm-ga4"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license MIT - declared in the repository

npm package mcp-gtm-ga4 - unscoped; check the name against the project README before installing

registry namespace io.github.mharnett is GitHub-verified and matches the repo owner

03 · What Gtm Ga4 can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

With this server connected, an agent can list all tags in the workspace with consent status and firing triggers, get full tag configuration by tag ID, update an existing tag (merge patch via JSON), and create a new tag from a JSON definition.

The 13 tools it gives your agent

Extracted from the project's README - what gtm-ga4 lets an agent do.

gtm_list_tags
- List all tags in the workspace with consent status and firing triggers
gtm_get_tag
- Get full tag configuration by tag ID
gtm_update_tag
- Update an existing tag (merge patch via JSON)
gtm_create_tag
- Create a new tag from a JSON definition
gtm_list_triggers
- List all triggers (ID, name, type)
gtm_list_variables
- List all variables (ID, name, type)
gtm_audit_consent
- Audit all tags for consent configuration compliance
gtm_preview
- Generate a quick preview of the current workspace
gtm_create_version
- Create a new container version from the workspace
gtm_ga4_run_report
- Run a GA4 report with dimensions, metrics, date range, and filters
gtm_ga4_realtime_report
- Run a GA4 realtime report (last 30 minutes)
gtm_ga4_list_custom_dimensions
- List all custom dimensions for the property
show all 13 tools
gtm_ga4_create_custom_dimension
- Create a new custom dimension

Latest releases

v1.2.0 · 2026-07-09

1.2.0 (2026-07-09) · publishable PKCE + dual service-account/OAuth decouple · regenerate lockfile to resolve mcp-updatenotifier from the registry · depend on mcp-updatenotifier from the registry (^1.0.0)

v1.1.0 · 2026-07-09

1.1.0 (2026-07-09) · add variable CRUD (get / create / update / delete) · publishable PKCE + dual service-account/OAuth decouple · add tagmanager.publish OAuth scope · regenerate lockfile to resolve mcp-updatenotifier…

v1.0.0 · 2026-04-04

Initial release of mcp-gtm-ga4 - MCP server for Google Tag Manager + GA4. · GTM tag, trigger, and variable management · Consent compliance auditing with recommendations · Workspace preview and version creation · GA4…

04 · Who maintains Gtm Ga4

gtm-ga4 is maintained by mharnett. We track 7 MCP servers from mharnett - 7 actively maintained, 9 combined GitHub stars, oldest repo from Mar 2026. Full record: all servers from mharnett.

  1. bing-ads MCP server for Microsoft Advertising (Bing Ads) - campaigns, keywords, and reports ★ 4

05 · Facts

category
data & analytics - ranked #45 of 75 actively-maintained data & analytics servers as of 2026-08-25.
release cadence
2 releases in the last 90 days (latest 2026-07-09)
registry
io.github.mharnett/gtm-ga4 (active, first published 2026-04-08)
packages
npm:mcp-gtm-ga4

06 · Gtm Ga4 FAQ

Is Gtm Ga4 still maintained?

Yes - as of 2026-08-25, its last commit was 2026-07-24 and it shipped 2 releases in the last 90 days. We re-verify nightly.

What can Gtm Ga4 do?

With this server connected, an agent can list all tags in the workspace with consent status and firing triggers, get full tag configuration by tag ID, update an existing tag (merge patch via JSON), and create a new tag from a JSON definition.

How do I install Gtm Ga4?

Run `npx -y mcp-gtm-ga4`. The README documents 6 environment variables (GOOGLE_APPLICATION_CREDENTIALS, GTM_ACCOUNT_ID, GTM_CONTAINER_ID…) to set first. Set GOOGLE_APPLICATION_CREDENTIALS, GTM_ACCOUNT_ID, GTM_CONTAINER_ID, GA4_PROPERTY_ID, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET before connecting. You can also paste the ready-made client config above.

Does Gtm Ga4 run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Gtm Ga4

More data & analytics MCP servers · Gsc · Umami · Muxinc MCP Server · Singapore MCP by Olano · OpenPulsechain Analytics

More TypeScript MCP servers · Console MCP Server · Bantou · Safeinstall · Migrationpilot · Azure DevOps (ADO) · see all