프로토타입 · 미리 보기: 공식 레지스트리의 모든 서버를 담고 있으며 30분마다 동기화해요. 리뷰와 계정 기능은 다음 단계에서 열려요.
PopNx MCPAI를 쓰는 사람을 위한 MCP 서버 · 쉬운 말로 설명해요

Samarth Gtm MCP

제작자: samarthanalytics-sj버전 1.19.0i★ –i내 컴퓨터에서 실행
레지스트리 이름io.github.samarthanalytics-sj/samarth-gtm-mcp

설치

개요

제작자가 쓴 설명(영어 원문)

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

PopNx MCP의 세 기둥

이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.

할 수 있는 일

이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.

  • 연결 방식: 내 컴퓨터에서 실행
  • 전송 방식: stdio
  • 카테고리: 기타
  • 입력해야 할 값: GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET

설치

쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.

설치하기 전에

  • 기본 점검: 1개 중 1개 통과
  • 내 컴퓨터에서 내 사용자 계정의 권한(파일, 네트워크, 앱)으로 실행돼요.
  • 직접 입력할 값: GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET, GTM_MCP_ENABLE_WRITES, GTM_MCP_ENABLE_PUBLISH, GTM_MCP_ENABLE_DELETES

비밀로 표시된 값은 내 계정의 열쇠예요. 절대 다른 사람과 공유하거나 채팅에 붙여 넣지 마세요.

필요한 것

  • npmNode.js 설치(npx 명령어용)

어떤 앱을 쓰세요?

위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.

Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요

{
  "mcpServers": {
    "samarth-gtm": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-value",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-value",
        "GTM_MCP_ENABLE_WRITES": "your-value",
        "GTM_MCP_ENABLE_PUBLISH": "your-value",
        "GTM_MCP_ENABLE_DELETES": "your-value"
      }
    }
  }
}

터미널에서 이 명령어를 실행하세요

claude mcp add samarth-gtm --env GOOGLE_OAUTH_CLIENT_ID=your-value --env GOOGLE_OAUTH_CLIENT_SECRET=your-value --env GTM_MCP_ENABLE_WRITES=your-value --env GTM_MCP_ENABLE_PUBLISH=your-value --env GTM_MCP_ENABLE_DELETES=your-value -- npx -y samarth-gtm-mcp

실행하기 전에 빈 값을 채워 주세요.

Cursor에서 열기

또는 설정을 직접 복사하기

프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요

{
  "mcpServers": {
    "samarth-gtm": {
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-value",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-value",
        "GTM_MCP_ENABLE_WRITES": "your-value",
        "GTM_MCP_ENABLE_PUBLISH": "your-value",
        "GTM_MCP_ENABLE_DELETES": "your-value"
      }
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

VS Code에서 열기

또는 설정을 직접 복사하기

프로젝트의 .vscode/mcp.json에 붙여 넣으세요

{
  "servers": {
    "samarth-gtm": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "samarth-gtm-mcp"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-value",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-value",
        "GTM_MCP_ENABLE_WRITES": "your-value",
        "GTM_MCP_ENABLE_PUBLISH": "your-value",
        "GTM_MCP_ENABLE_DELETES": "your-value"
      }
    }
  }
}

브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.

이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.

선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.

직접 입력할 값

  • GOOGLE_OAUTH_CLIENT_ID 필수 env
    Your Google OAuth 2.0 client ID (Desktop app type)
  • GOOGLE_OAUTH_CLIENT_SECRET 비밀 필수 env
    Your Google OAuth 2.0 client secret
  • GTM_MCP_ENABLE_WRITES env
    Set to 'true' to allow create/update operations (default: read-only)
  • GTM_MCP_ENABLE_PUBLISH env
    Set to 'true' to allow publish operations (default: disabled)
  • GTM_MCP_ENABLE_DELETES env
    Set to 'true' to allow delete operations (default: disabled)

이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.

할 수 있는 일

내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.

기본 점검i

누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 8일 점검

  • ✓ 통과

    제작자와 저장소 일치

    레지스트리 이름이 GitHub 계정 samarthanalytics-sj 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요

  • … 아직 점검 안 함

    계속 관리되고 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • … 아직 점검 안 함

    라이선스 있음

    아직 GitHub에서 이 저장소를 읽어 오지 않았어요

  • – 해당 없음

    엔드포인트 응답

    내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요

  • – 해당 없음

    OAuth로 로그인

    내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요

  • … 아직 점검 안 함

    도구 설명에 숨겨진 지시 없음

    내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요

기타 카테고리의 다른 서버와 비교i

  • 이 카테고리의 다른 서버 18600개 중 0%보다 스타가 많아요
  • 이 카테고리의 다른 서버 18600개 중 10%보다 최근에 레지스트리에 공개됐어요
  • 기본 점검 결과가 이 카테고리의 다른 서버 18600개 중 100%와 같거나 더 좋아요

레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.

자주 묻는 질문

Samarth Gtm MCP, 안전한가요?

해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.

어떤 키나 코드가 필요한가요?

입력해야 할 값: GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET

내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?

내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).

아직 관리되고 있나요?

GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(1.19.0)은 5개월 전 레지스트리에 올라왔어요.

어떤 앱에서 쓸 수 있나요?

Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Node.js도 있어야 해요.

대신 쓸 수 있는 건 뭐가 있나요?

같은 카테고리에는: Spec Driven Development, Remote Desktop Commander, alalanet — check before you pay

대안

같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.

카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i

Spec Driven Development

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

제작자: formulahendry초기↓ 66/주★ 44014개월 전 업데이트

내 컴퓨터에서 실행

Remote Desktop Commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

제작자: desktop-commander성장 중★ 2113일 전 업데이트

클라우드에서 실행✓ desktopcommander.app

alalanet — check before you pay

Check packages, MCP servers and x402 endpoints before agents install or pay. Signed.

제작자: alalanet초기오늘 업데이트

클라우드에서 실행✓ alalanet.com

제작자의 README

README 열기

제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.

Samarth Analytics MCP

An open-source Model Context Protocol (MCP) server that lets AI assistants such as Claude Desktop, Claude Code and Cursor work with Google Tag Manager and GA4. It covers the full GTM API v2 surface (100+ tools, including server-side containers), the GA4 Admin and Data APIs, a built-in implementation audit, and a second server that crawls a website to check its tags and Consent Mode v2 setup. Built by Samarth Analytics for our own client work and released under the MIT license for the analytics community.

Read-only by default. Creating, updating, publishing and deleting are each behind a separate environment flag, every write also requires confirm=true, and a dry-run mode simulates writes without touching the API. See Guardrails.

Use it at your own risk, and start on a dummy container. The server acts with your Google credentials, so every change it makes is yours. Try it first on a sandbox GTM container and a test GA4 property, keep the write flags off until you have watched how it behaves, and review the container's version history after any write session. We run it in production, but your setup is not ours.

Three ways to use it

What you getWhere to start

| Hosted, no install | Our community instance at https://mcp.samarthanalytics.com/mcp. Sign in with your own Google account; it only sees your containers and properties, and it is locked to read-only. Shared, best-effort, no uptime promise. | Add it to your MCP client with mcp-remote: {"mcpServers":{"samarth-gtm":{"command":"npx","args":["mcp-remote@next","https://mcp.samarthanalytics.com/mcp"]}}} | | Local | The server on your machine over stdio, with your own Google OAuth client, and the write flags under your control. | Quick Start and Google Cloud OAuth Setup | | Self-hosted | The MCP server, the web-audit server and the capture worker as one docker-compose stack behind your own token. | docs/SELF_HOSTING_DOCKER.md and Cloud Deployment |

The repo also ships Samarth Desktop, a local Electron app with a chat UI that embeds this server (Quick Start), and a browser-based customer portal in apps/portal/ that runs live, read-only QC audits.

Contributions are welcome. Bug reports with a reproducible container setup are the most useful thing you can send. Read CONTRIBUTING.md first; CI runs on every pull request.


Table of Contents

  1. Features
  2. Quick Start
  3. Google Cloud OAuth Setup
  4. Service Account Limitations
  5. Environment Variables Reference
  6. Guardrails
  7. Available Tools
  8. Cloud Deployment
  9. Security Notes
  10. Development
  11. Releases
  12. Troubleshooting

Features

  • Full GTM API v2 surface — accounts, containers, workspaces, tags, triggers, variables, folders, built-in variables, versions, sync, publish, preview
  • Server-side & advanced GTM coverage — environments, user permissions, destinations, clients, transformations, zones, custom templates, gtag config, plus container snippet/lookup/combine/move-tag-id and workspace change-diff status
  • GA4 coverage — GA4 Admin tools (ga4_*) plus GA4 Data API reporting (ga4_run_report, ga4_run_realtime_report) for intent-vs-reality reconciliation. Reads and reporting need only analytics.readonly; the GA4 Admin write tools are off by default behind GA4_MCP_ENABLE_WRITES / GA4_MCP_ENABLE_DELETES and additionally need analytics.edit
  • Automatic pagination — every paginated list tool transparently follows nextPageToken to return all results, with optional maxPages/pageToken bounds
  • Retry with exponential backoff + jitter — transient Google API failures (HTTP 408/429/5xx, network errors) on read requests are retried automatically; mutations are never auto-retried (tunable via GTM_MCP_RETRY_*)
  • Two transport modes: stdio (local, for Claude Desktop/Cursor) and Streamable HTTP (cloud/team)
  • Guardrails by default: read-only unless explicitly enabled; publish and delete gated separately
  • Dry-run mode: simulate all writes without touching the API
  • `confirm=true` required on all write/delete/publish operations
  • Audit tool: inspects workspace for common GA4/GTM implementation issues
  • Export tool: full workspace dump as structured JSON
  • Zod schema validation on all inputs
  • Detailed Google API error messages surfaced to the MCP client

Quick Start

The way to run Samarth is the desktop app - a local Electron app with a chat UI that embeds the MCP server in-process. Multi-account Google sign-in, per-account LLM keys (OpenAI / Anthropic / Gemini), secrets in the OS keychain. Nothing to configure by hand: the Google OAuth client and your LLM key are entered in the app on first run.

You need: Node.js 18 or newer, Git, and a free Google "Desktop app" OAuth client - two values you create once in your Google Cloud project (exact click-by-click steps).

git clone https://github.com/samarthanalytics-sj/samarth-analytics-mcp.git

cd samarth-analytics-mcp/apps/desktop npm install # downloads the Electron binary (~100 MB first time) npm run dev

The window opens; paste your OAuth client ID + secret and an LLM API key when asked, sign in to Google, and start chatting with your GTM / GA4 setup.

Prefer a config file over typing in the app? Put the OAuth client in a .env file instead - the app reads it on launch (values typed in the app and real shell variables always take precedence):

GOOGLE_DESKTOP_CLIENT_ID=your-client-id.apps.googleusercontent.com

GOOGLE_DESKTOP_CLIENT_SECRET=your-client-secret

Save it as apps/desktop/.env or at the repo root (already gitignored - never commit it). A repo-root .env using the server's GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRET names works too, so one file can serve both the app and the MCP server. A packaged install reads .env from its data directory instead (%APPDATA% on Windows).

Your everyday launch afterwards is just:

cd samarth-analytics-mcp/apps/desktop && npm run dev

Full guide - Windows/macOS specifics, first-run setup, building a real .exe/.dmg installer, and the Error: Electron uninstall fix: apps/desktop/INSTALL.md.


Google Cloud OAuth Setup

Step 1: Enable the GTM API
  1. Go to Google Cloud Console
  2. Select or create a project
  3. Navigate to APIs & Services → Library
  4. Search for "Tag Manager API" and click Enable
  5. Search for "Google Analytics Admin API" and click Enable (required for the read-only ga4_* Admin tools)
  6. Search for "Google Analytics Data API" and click Enable (required for ga4_run_report / ga4_run_realtime_report)
Step 2: Create OAuth 2.0 Credentials
  1. Go to APIs & Services → Credentials
  2. Click Create Credentials → OAuth 2.0 Client ID
  3. Choose application type:
  • Desktop app — simplest for local stdio use (no redirect URI needed)
  • Web application — for the HTTP server (add your redirect URI)
  1. Download the JSON or copy the Client ID and Client Secret
  2. Add to .env:
   GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com

GOOGLE_CLIENT_SECRET=your-client-secret GOOGLE_REDIRECT_URI=http://localhost:3001/oauth/callback

Step 3: Configure OAuth Consent Screen
  1. Go to APIs & Services → OAuth consent screen
  2. Choose External (or Internal if you have Google Workspace)
  3. Fill in App name, support email
  4. Add scopes:
  • https://www.googleapis.com/auth/tagmanager.readonly
  • https://www.googleapis.com/auth/tagmanager.edit.containers
  • https://www.googleapis.com/auth/tagmanager.edit.containerversions
  • https://www.googleapis.com/auth/tagmanager.manage.accounts
  • https://www.googleapis.com/auth/tagmanager.manage.users
  • https://www.googleapis.com/auth/tagmanager.publish
  • https://www.googleapis.com/auth/analytics.readonly (read-only GA4 Admin and Data API tools)
  • https://www.googleapis.com/auth/analytics.edit (GA4 Admin write tools — gated by GA4_MCP_ENABLE_WRITES)
  • https://www.googleapis.com/auth/analytics.manage.users (GA4 access-binding write tools)
  1. Add your Google account as a test user (while the app is in "testing" mode)

Note: For personal/agency use, keeping the app in "Testing" mode is fine. You will need to re-authorize every 7 days unless you publish the app or get it verified.

Step 4: Run OAuth Setup
npm run auth:google

Or, if you prefer the older paste-the-code helper:

npm run oauth:setup

Service Account Limitations

Short version: Service accounts do NOT work with GTM by default. Use OAuth 2.0.

The Google Tag Manager API is a user-data API — it manages resources owned by individual Google accounts. Service accounts are not Google users and are not automatically granted access to GTM containers.

Option A: Add the service account as a GTM user (simplest)

If you still want to use a service account:

  1. Get the service account email (e.g., my-sa@project.iam.gserviceaccount.com)
  2. In GTM, go to Admin → User Management at the account or container level
  3. Add the service account email with the appropriate role (Read, Edit, Approve, Publish)
  4. Set GOOGLE_SERVICE_ACCOUNT_KEY_FILE=/path/to/key.json in .env

Caveats: This only works if the GTM container is associated with a Google account, not a Google Workspace that restricts external sharing.

Option B: Domain-Wide Delegation (Google Workspace only)

For Google Workspace organizations:

  1. Create a service account with a JSON key
  2. Enable Domain-Wide Delegation on the service account in Google Cloud Console
  3. In Google Workspace Admin Console → Security → API Controls → Domain-wide Delegation:
  • Add the service account client ID
  • Add scopes: https://www.googleapis.com/auth/tagmanager.edit.containers (and others as needed)
  1. In .env, set:
   GOOGLE_SERVICE_ACCOUNT_KEY_FILE=/path/to/key.json
  1. The server will impersonate the user automatically if you set a subject in buildGoogleAuth()

Caveats: Requires a paid Google Workspace account. Only available for your own domain.


Environment Variables Reference

VariableDefaultDescription
GOOGLE_OAUTH_CLIENT_ID—OAuth client ID (preferred). Falls back to GOOGLE_CLIENT_ID.
GOOGLE_OAUTH_CLIENT_SECRET—OAuth client secret (preferred). Falls back to GOOGLE_CLIENT_SECRET.
GOOGLE_OAUTH_REDIRECT_URIhttp://localhost:3001/oauth/callbackOAuth redirect URI. Falls back to GOOGLE_REDIRECT_URI.
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET / GOOGLE_REDIRECT_URI—Legacy names, still supported.

| SAMARTH_GOOGLE_OAUTH_CLIENT_ID | — | Hosted-only. Samarth-owned public OAuth client. Takes precedence over the self-hosted va

앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요

PopNx에게 묻기