# stape-io/google-tag-manager-mcp-server [Health: Active]

**Category:** 🎯 Marketing  
**Repository:** https://github.com/stape-io/google-tag-manager-mcp-server  
**GitHub Stars:** 250  
**npm Downloads (last month):** 1970  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/stape-io-google-tag-manager-mcp-server

## Description
This server supports remote MCP connections, includes built-in Google OAuth, and provide an interface to the Google Tag Manager API.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "google-tag-manager-mcp-server": {
    "command": "npx",
    "args": ["-y","google-tag-manager-mcp-server"],
    "env": {
      "GOOGLE_SERVICE_ACCOUNT_KEY": ""
    }
  }
}
```

**Requires environment variables:** `GOOGLE_SERVICE_ACCOUNT_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What stape-io/google-tag-manager-mcp-server does

stape-io/google-tag-manager-mcp-server gives MCP-compatible clients an interface to the Google Tag Manager API. Its hosted deployment is available at `https://gtm-mcp.stape.io/mcp`, while the npm package `google-tag-manager-mcp-server` provides a local command-line server. Both implementations expose the same set of 20 Google Tag Manager tools.

The project separates the GTM tool definitions from authentication. A shared core package contains the tools and schemas, allowing the hosted worker and local CLI to use the same behavior with different credential flows.

## How it works

The hosted option is an HTTP MCP endpoint. Clients that support remote MCP connections and OAuth can connect directly, then complete Google sign-in when prompted. Clients without that combination can use `mcp-remote` as a bridge to the hosted endpoint.

The local option starts the npm package as an MCP server over stdio. It authenticates with credentials supplied in the client configuration, such as a service account key, refresh token, or access token. In this mode, data is sent through the local process rather than through the hosted service.

Both deployments pass Google access through an authentication provider that supplies an access token to the shared GTM tools. This keeps the available tool set consistent between hosted and local use.

## Setup and configuration

For the hosted server, configure the remote URL `https://gtm-mcp.stape.io/mcp` in an MCP client that supports HTTP and Google OAuth. Claude Desktop, Claude Code, VS Code, Copilot CLI, Cursor, and ChatGPT are listed as clients that can complete the OAuth flow directly. Antigravity and stdio-only clients can connect through `mcp-remote`.

For the local CLI, run the package with `npx -y google-tag-manager-mcp-server` and provide credentials through the client’s environment configuration. A service account setup uses the `GOOGLE_SERVICE_ACCOUNT_KEY` variable. The hosted configuration requires no local credential variable; users authenticate in the browser.

## Tools and capabilities

The server provides 20 tools for interacting with Google Tag Manager through its API. The same tools are available regardless of whether authentication comes from the hosted OAuth flow or credentials used by the local CLI. Tool definitions and input schemas are maintained in the shared `google-tag-manager-mcp-core` package.

## Limitations and notes

The hosted and local modes differ in where authentication and data handling occur. Hosted connections pass through `gtm-mcp.stape.io` and rely on Google OAuth. Local connections require you to manage credentials and keep the MCP process running on your machine.

Client configuration differs by transport. HTTP-capable clients can use the hosted endpoint directly, while clients limited to stdio need the `mcp-remote` bridge for hosted access. Restarting a client after changing its MCP configuration is required by the installation instructions.

_Full upstream README: https://allmcps.com/mcp/stape-io-google-tag-manager-mcp-server/readme_

