PlugWiki
Samarth Analytics MCP logo

Samarth Analytics MCP Server: Setup for Claude, Cursor and Other Apps

CommunityRemoteLocal

Lets Claude, Cursor and other assistants read and, if you allow it, edit Google Tag Manager containers and GA4 properties.

This community server connects your assistant to Google Tag Manager and Google Analytics 4 with your own Google sign-in. It is read-only by default: creating, publishing and deleting are each off until you switch them on, and every write needs a confirm flag. You can use the author's hosted version, which is locked to read-only, or run it on your machine with your own Google OAuth client. Try any write on a test container first, because changes use your Google account.

Good for

  • Analytics engineers who audit GTM containers and GA4 setups
  • Marketers who want GA4 numbers and tag checks in plain chat
  • Agencies managing many containers who need a read-only way in

Works in

14 should work

Tap an app to see how to set it up and any known problems.

Install Samarth Analytics MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Samarth Analytics MCP server to Claude Code. Run this command:
    
    claude mcp add samarth-gtm -- npx mcp-remote@next https://mcp.samarthanalytics.com/mcp
    
    Ask me for GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

Read-only mode: Read-only is the default. Do not set GTM_MCP_ENABLE_WRITES, GTM_MCP_ENABLE_PUBLISH or GTM_MCP_ENABLE_DELETES. The hosted version is always read-only.

Hosted is the quick route: you sign in with Google and it is locked to read-only. The README gives the mcp-remote config for it; other apps use the same command in their own config format. The local method needs your own Google OAuth client (create a Desktop app client in Google Cloud and enable the Tag Manager and Analytics APIs), then a one-time Google sign-in with the package's sign-in script before first use.

Built from the package data we hold. Not yet tested by us. Source.

Tools

  • Lists the Google Tag Manager accounts you can reach

    Returns every GTM account your Google sign-in can access, which is the usual first step before looking inside a container.

    Try: “Which GTM accounts do I have?”

    Network · accounts_list

  • Lists the containers in a GTM account

    Returns all containers under one account, following every page of results automatically.

    Try: “List the containers in my main GTM account.”

    Network · containers_list

  • Gets the install snippet for a container

    Returns the code a website pastes in to load the container.

    Try: “Give me the GTM snippet for the shop container.”

    Network · containers_snippet

  • Lists workspaces in a container

    Shows the draft workspaces in a container, where tag changes are staged before a version is made.

    Try: “Show the workspaces in the shop container.”

    Network · workspaces_list

  • Shows pending changes and merge conflicts in a workspace

    Returns the changed items and any merge conflicts so you can review a draft before it becomes a version.

    Try: “What has changed in my default workspace?”

    Network · workspace_get_status

  • Lists every tag in a workspace

    Returns all tags with their type, trigger links and settings.

    Try: “List all tags in the shop workspace.”

    Network · tags_list

  • Lists every trigger in a workspace

    Returns the triggers that decide when tags fire.

    Try: “Which triggers fire on form submissions?”

    Network · triggers_list

  • Lists user-defined variables

    Returns the variables you created in a workspace, not the built-in ones.

    Try: “Show the variables in this workspace.”

    Network · variables_list

  • Lists published and saved container versions

    Returns version headers so you can see what went live and when.

    Try: “What is the latest published version of this container?”

    Network · versions_list

  • Checks a workspace for common GTM and GA4 setup problems

    Inspects the workspace and reports typical implementation issues found in the tags and triggers.

    Try: “Audit my workspace for broken or duplicate tags.”

    Network · audit_container

  • Exports a workspace as structured JSON

    Returns a full dump of the workspace so it can be reviewed or kept as a backup.

    Try: “Export the shop workspace as JSON.”

    Network · export_container

  • Lists your GA4 accounts and their properties

    The starting point for GA4: returns each account with a summary of its properties.

    Try: “Which GA4 properties do I have access to?”

    Network · ga4_account_summaries_list

Read from the source code

Permissions

medium risk · 5 things to watch

Medium risk

By default it only reads your tag and analytics data. If you turn on writes, publishing or deletes, the assistant can change or take down tags on your live site, so test on a dummy container first.

What it can do

Watch out for

  • Writes and publishing exist behind env flags

    With the write, publish and delete flags on, the assistant can change tags and make a version live on your site. Keep them off, and test on a dummy container first. github.com

  • It can change who has access to your containers

    The user permission tools can grant or revoke access when writes or deletes are enabled. Leave those flags off unless you need them. github.com

  • Hosted version sends your data through a third party

    The hosted instance at mcp.samarthanalytics.com is a shared, best-effort community service. Use the local install if your data must not leave your machine. github.com

  • Your Google tokens are stored locally

    The local install keeps OAuth tokens in a file or environment variables. Keep them out of git and revoke access in your Google account if needed. github.com

  • The repo is not an official Google project

    The README says to use it at your own risk and start on a dummy container. github.com

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyRead-only is the default. Writes, publishing and deletes each need their own env flag (GTM_MCP_ENABLE_WRITES, GTM_MCP_ENABLE_PUBLISH, GTM_MCP_ENABLE_DELETES). The hosted version is locked to read-only.
Talks toGoogle Tag Manager and Analytics APIs. mcp.samarthanalytics.com, only if you use the hosted version
Sign-in and keysGoogle OAuth tokens in a local token file or environment variables; the hosted version signs you in with your Google account.
Scopes
  • analytics.readonly

  • tagmanager.readonly

Questions

Is Samarth Analytics MCP official?

No. It is a community project by samarthanalytics-sj, not made by Google. Google makes Tag Manager and Analytics.

What is the Samarth Analytics MCP server URL?

The author's hosted instance is https://mcp.samarthanalytics.com/mcp. You sign in with your own Google account, it only sees your containers and properties, and it is locked to read-only.

Is it read-only?

Yes by default. Creating, updating, publishing and deleting each need their own setting, and every write also needs confirm=true. A dry-run mode simulates writes without calling Google.

Do I need a Google Cloud project?

Only for the local install. You create a free Desktop app OAuth client and enter its ID and secret. The hosted version needs only your Google sign-in.

Can it publish or delete things?

Only if you switch those on. Publishing and deleting are off by default, and the README calls publishing the highest-risk action.

Does it cover GA4?

Yes. It reads GA4 Admin settings such as properties, data streams and key events, and runs GA4 Data API reports. The GA4 Admin write tools are off by default behind their own flag.

How many tools does it have?

More than 100, covering the full GTM API plus GA4. The list on this page is partial.

How do I add it to Claude Desktop?

Use the Claude Desktop tab in the install box above. The hosted method uses a small bridge because Claude Desktop config runs local programs only.

Information

updated Nov 2, 2026

Publisher
Community
Package
samarth-gtm-mcp
Registry
npm
Transport
stdio, Streamable HTTP
Auth
OAuth
Version
1.494.0
License
MIT
Last commit
Oct 31, 2026
Open issues
0
Listed in
Official MCP registry

GitHubnpmOfficial MCP RegistryIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 1
  1. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.