mcp-google-tagmanager 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,222 +1,328 @@
1
- # Google Tag Manager MCP
1
+ # <img src="./assets/a1-logo.svg" alt="A1" width="40"> Google Tag Manager MCP
2
+
3
+ **English** | [Русский](./README.ru.md)
2
4
 
3
5
  [![npm](https://img.shields.io/npm/v/mcp-google-tagmanager)](https://www.npmjs.com/package/mcp-google-tagmanager)
4
- [![CI](https://github.com/A1-x-Tech/mcp-google-tagmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/A1-x-Tech/mcp-google-tagmanager/actions/workflows/ci.yml)
5
6
  [![Glama](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-tagmanager/badges/score.svg)](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-tagmanager)
7
+ [![CI](https://github.com/A1-x-Tech/mcp-google-tagmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/A1-x-Tech/mcp-google-tagmanager/actions/workflows/ci.yml)
6
8
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
7
9
 
8
- MCP server for the **Google Tag Manager API v2**: manage containers, workspaces, tags,
9
- triggers, variables and publishing from Claude, Cursor, Codex and other AI clients in
10
- natural language.
10
+ **A1 Google Tag Manager MCP** lets an AI app inspect and manage Google Tag Manager containers in plain language. See what fires on a page, work with tags, triggers and variables in a draft workspace, then deliberately compile and publish a version when you are ready.
11
+
12
+ It connects to the Google Tag Manager API v2 through your Google account. The difference from asking an AI to guess a GTM setup is that it works with the actual container, workspace and version you choose.
13
+
14
+ - **25 tools.** 10 operations only read GTM data; 4 create drafts or change built-in variables; 5 can alter, delete, compile or publish live configuration.
15
+ - **Connects from the conversation.** Say "connect Google Tag Manager": the server walks you through the OAuth client, catches Google's redirect on `127.0.0.1` with PKCE and keeps the tokens itself — no config files, no restart.
16
+ - **Draft first.** Tags, triggers and variables are created in a workspace. Publishing is a separate, explicitly destructive operation.
17
+ - **Quota-aware.** GTM permits 0.25 requests per second per project; the server spaces requests by at least 4.2 seconds instead of overwhelming the API.
18
+ - **Your Google access.** The server uses your OAuth credentials and requests only the Tag Manager scopes needed for reading, editing, versioning and publishing.
19
+
20
+ Start with a read-only question:
21
+
22
+ > Which tags in my containers fire on the page-view trigger?
23
+
24
+ [Connect the server](#quick-start) · [Explore use cases](#what-you-can-ask-it-to-do) · [Open technical documentation](#technical-documentation)
25
+
26
+ ---
27
+
28
+ ## See it work in a minute
29
+
30
+ > **You:** List my GTM containers and show which tags fire on page view.
31
+ >
32
+ > **Assistant:** Lists the containers, their workspaces, relevant triggers and the tags attached to them. Nothing changes.
33
+ >
34
+ > **You:** In the Default Workspace of `GTM-ABC123`, prepare a GA4 configuration tag for measurement ID `G-XXXXXXX` on all pages.
35
+ >
36
+ > **Assistant:** Shows the workspace, proposed tag and trigger configuration, then asks for confirmation before creating the draft.
37
+ >
38
+ > **You:** Confirm the draft.
39
+ >
40
+ > **Assistant:** Creates the tag in the workspace. It does not publish the container; compiling and publishing a version remains a separate step.
41
+
42
+ ## Contents
11
43
 
12
- Ask the assistant to audit a container, wire up a new GA4 tag with its trigger, enable
13
- built-in variables, compile a version and push it live — the full GTM workflow without
14
- clicking through the web UI.
44
+ - [Quick start](#quick-start)
45
+ - [What you can ask it to do](#what-you-can-ask-it-to-do)
46
+ - [How GTM changes are connected](#how-gtm-changes-are-connected)
47
+ - [What can change](#what-can-change)
48
+ - [Getting access](#getting-access)
49
+ - [Configuration](#configuration)
50
+ - [Data and telemetry](#data-and-telemetry)
51
+ - [Limits and background work](#limits-and-background-work)
52
+ - [Technical documentation](#technical-documentation)
53
+ - [Support](#support)
15
54
 
16
55
  ## Quick start
17
56
 
18
- 1. [Get OAuth credentials](#getting-credentials) for a Google Cloud project with the Tag Manager API enabled.
19
- 2. Add the server — for example in Claude Code ([other clients](#installation)):
57
+ You need Node.js 20+ and a Google account. Credentials are not required at install time — the server connects from the conversation.
20
58
 
21
- ```bash
22
- claude mcp add google-tagmanager \
23
- -e GOOGLE_TAGMANAGER_CLIENT_ID=your_client_id \
24
- -e GOOGLE_TAGMANAGER_CLIENT_SECRET=your_client_secret \
25
- -e GOOGLE_TAGMANAGER_REFRESH_TOKEN=your_refresh_token \
26
- -- npx -y mcp-google-tagmanager@latest
27
- ```
59
+ 1. Add the server to your AI app.
60
+ 2. Say "connect Google Tag Manager": the assistant walks you through [creating the OAuth client and approving access](#getting-access) without editing config files.
61
+ 3. Start with the read-only question above.
62
+
63
+ <details open>
64
+ <summary><strong>Codex</strong></summary>
28
65
 
29
- 3. Ask the assistant: "List my GTM containers and show which tags fire on page view."
66
+ <br>
30
67
 
31
- ## Tools
68
+ **In the app:**
32
69
 
33
- | Tool | Description |
70
+ 1. Open **Settings → MCP servers**.
71
+ 2. Select **Add server**.
72
+ 3. Choose **STDIO**, then enter `npx -y mcp-google-tagmanager@latest` and the three environment variables below.
73
+
74
+ | Variable | Value |
34
75
  |---|---|
35
- | `list_accounts` | List all GTM accounts the user can access |
36
- | `get_account` | Get one account |
37
- | `list_containers` | List containers of an account (with `GTM-XXXXXX` public ids) |
38
- | `get_container` | Get one container |
39
- | `create_container` | Create a container (`web`, `server`, ...) |
40
- | `list_workspaces` | List workspaces of a container |
41
- | `get_workspace` | Get one workspace |
42
- | `create_workspace` | Create a workspace (draft) |
43
- | `list_tags` | List tags of a workspace |
44
- | `list_triggers` | List triggers of a workspace |
45
- | `list_variables` | List user-defined variables of a workspace |
46
- | `get_resource` | Get any resource by its API path (tag, trigger, variable, version, ...) |
47
- | `create_entity` | Create a tag, trigger or variable |
48
- | `update_entity` | Update a tag/trigger/variable (PUT full replace, fingerprint-guarded) |
49
- | `delete_entity` | Delete a tag/trigger/variable |
50
- | `manage_built_in_variables` | List / enable / disable built-in variables (full enum from the discovery doc) |
51
- | `create_version` | Compile a workspace into a container version (⚠️ deletes the workspace) |
52
- | `publish_version` | Publish a version, get one version, or fetch the live version |
53
- | `raw_request` | Escape hatch: call any Tag Manager API v2 path directly |
54
-
55
- ## Built-in rate limiting
56
-
57
- The Tag Manager API quota is unusually strict: **0.25 QPS per project** (25 requests per
58
- 100-second sliding window) and 10,000 requests per day. The server handles this for you:
59
-
60
- - every API request goes through a serialized queue with a minimum spacing of
61
- **4.2 s** between requests (tunable via `GOOGLE_TAGMANAGER_MIN_INTERVAL_MS`);
62
- - `429` and quota-`403` (`rateLimitExceeded` / `userRateLimitExceeded` / `quotaExceeded`)
63
- responses are retried with exponential backoff honoring `Retry-After`;
64
- - `5xx` and network errors are retried for reads only — a write that may have committed
65
- is never replayed.
66
-
67
- Big fan-out requests ("list everything in every container") will therefore be slow by
68
- design — that is the quota, not the server.
69
-
70
- ## Example prompts
71
-
72
- - "Which tags in container GTM-ABC123 fire on the page-view trigger?"
73
- - "Create a Custom HTML tag in the default workspace that logs to the console, firing on all pages."
74
- - "Enable the clickText and clickClasses built-in variables in my workspace."
75
- - "Compile my workspace into a version named 'March release' and publish it."
76
-
77
- ## Installation
76
+ | `GOOGLE_TAGMANAGER_CLIENT_ID` | Your Google OAuth client ID |
77
+ | `GOOGLE_TAGMANAGER_CLIENT_SECRET` | Your Google OAuth client secret |
78
+ | `GOOGLE_TAGMANAGER_REFRESH_TOKEN` | Your Google OAuth refresh token |
78
79
 
79
- <details open>
80
- <summary><b>Claude Code</b></summary>
80
+ 4. Select **Save**, then **Restart**.
81
+
82
+ **From the command line:**
81
83
 
82
84
  ```bash
83
- claude mcp add google-tagmanager \
84
- -e GOOGLE_TAGMANAGER_CLIENT_ID=your_client_id \
85
- -e GOOGLE_TAGMANAGER_CLIENT_SECRET=your_client_secret \
86
- -e GOOGLE_TAGMANAGER_REFRESH_TOKEN=your_refresh_token \
85
+ codex mcp add google-tagmanager \
87
86
  -- npx -y mcp-google-tagmanager@latest
88
87
  ```
89
88
 
89
+ ```bash
90
+ codex mcp list
91
+ ```
92
+
93
+ [Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
94
+
90
95
  </details>
91
96
 
92
97
  <details>
93
- <summary><b>Claude Desktop</b></summary>
98
+ <summary><strong>Claude Code</strong></summary>
99
+
100
+ <br>
94
101
 
95
- `claude_desktop_config.json` — macOS `~/Library/Application Support/Claude/`, Windows `%APPDATA%\Claude\`
102
+ ```bash
103
+ claude mcp add \
104
+ --transport stdio \
105
+ --scope user \
106
+ google-tagmanager \
107
+ -- npx -y mcp-google-tagmanager@latest
108
+ ```
109
+
110
+ ```bash
111
+ claude mcp list
112
+ ```
113
+
114
+ [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary><strong>Claude Desktop</strong></summary>
120
+
121
+ <br>
122
+
123
+ The current official path is **Settings → Extensions**. For a custom desktop extension, open **Advanced settings → Extension Developer → Install Extension…**, select a `.mcpb` file and follow the prompts.
124
+
125
+ This repository currently publishes an npm stdio package and does not contain a `.mcpb` bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:
96
126
 
97
127
  ```json
98
128
  {
99
129
  "mcpServers": {
100
130
  "google-tagmanager": {
101
131
  "command": "npx",
102
- "args": ["-y", "mcp-google-tagmanager@latest"],
103
- "env": {
104
- "GOOGLE_TAGMANAGER_CLIENT_ID": "your_client_id",
105
- "GOOGLE_TAGMANAGER_CLIENT_SECRET": "your_client_secret",
106
- "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "your_refresh_token"
107
- }
132
+ "args": ["-y", "mcp-google-tagmanager@latest"]
108
133
  }
109
134
  }
110
135
  }
111
136
  ```
112
137
 
138
+ In those builds, save it to `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows.
139
+
140
+ [Claude Desktop MCP documentation](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)
141
+
113
142
  </details>
114
143
 
115
144
  <details>
116
- <summary><b>Cursor</b></summary>
145
+ <summary><strong>Cursor</strong></summary>
146
+
147
+ <br>
117
148
 
118
- `~/.cursor/mcp.json` (or `.cursor/mcp.json` in the project)
149
+ Add a user-level server to `~/.cursor/mcp.json` on macOS/Linux or `%USERPROFILE%\.cursor\mcp.json` on Windows:
119
150
 
120
151
  ```json
121
152
  {
122
153
  "mcpServers": {
123
154
  "google-tagmanager": {
155
+ "type": "stdio",
124
156
  "command": "npx",
125
- "args": ["-y", "mcp-google-tagmanager@latest"],
126
- "env": {
127
- "GOOGLE_TAGMANAGER_CLIENT_ID": "your_client_id",
128
- "GOOGLE_TAGMANAGER_CLIENT_SECRET": "your_client_secret",
129
- "GOOGLE_TAGMANAGER_REFRESH_TOKEN": "your_refresh_token"
130
- }
157
+ "args": ["-y", "mcp-google-tagmanager@latest"]
131
158
  }
132
159
  }
133
160
  }
134
161
  ```
135
162
 
163
+ [Cursor MCP documentation](https://cursor.com/docs/mcp)
164
+
136
165
  </details>
137
166
 
138
- For a quick one-off session you can skip the trio and pass a short-lived token directly:
139
- `GOOGLE_TAGMANAGER_ACCESS_TOKEN=ya29....` (Google access tokens expire after about an
140
- hour and are not refreshed automatically).
141
-
142
- ## Getting credentials
143
-
144
- The Tag Manager API only supports OAuth 2.0 — there are no API keys for user data. One-time setup:
145
-
146
- 1. **Create/pick a Google Cloud project** at [console.cloud.google.com](https://console.cloud.google.com)
147
- and enable the **Tag Manager API** ([direct link](https://console.cloud.google.com/apis/library/tagmanager.googleapis.com)).
148
- Without a registered project the API grants **zero quota** — this step is mandatory.
149
- 2. **Configure the OAuth consent screen** (APIs & Services → OAuth consent screen).
150
- For personal use, External + your account as a test user is enough.
151
- 3. **Create an OAuth client** (APIs & Services → Credentials → Create credentials →
152
- OAuth client ID → *Desktop app* or *Web application*). Save the **client id** and **client secret**.
153
- 4. **Mint a refresh token.** The easiest path is the
154
- [OAuth 2.0 Playground](https://developers.google.com/oauthplayground):
155
- - gear icon → check *Use your own OAuth credentials* → paste the client id/secret
156
- (for a Web client also add `https://developers.google.com/oauthplayground` to its
157
- authorized redirect URIs);
158
- - in Step 1 authorize these scopes (space-separated):
159
-
160
- ```
161
- 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.publish
162
- ```
163
-
164
- - in Step 2 click *Exchange authorization code for tokens* and copy the **refresh token**.
165
- 5. Put the three values into the environment variables above. The server exchanges the
166
- refresh token for access tokens automatically and caches them until just before expiry.
167
-
168
- > ⚠️ The credentials are stored as plain text in your client's MCP config. Scope the OAuth
169
- > consent to the four Tag Manager scopes above and nothing else.
170
- >
171
- > Note the scope split: reading needs `readonly`, editing needs `edit.containers`,
172
- > `create_version` needs `edit.containerversions`, and publishing needs `publish`.
173
- > Authorize all four at once or re-consent mid-flow.
167
+ <details>
168
+ <summary><strong>VS Code</strong></summary>
169
+
170
+ <br>
171
+
172
+ Run **MCP: Open User Configuration** from the Command Palette and add:
173
+
174
+ ```json
175
+ {
176
+ "servers": {
177
+ "google-tagmanager": {
178
+ "type": "stdio",
179
+ "command": "npx",
180
+ "args": ["-y", "mcp-google-tagmanager@latest"]
181
+ }
182
+ }
183
+ }
184
+ ```
185
+
186
+ Check it with **MCP: List Servers**.
187
+
188
+ [VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
189
+
190
+ </details>
191
+
192
+ ## What you can ask it to do
193
+
194
+ ### Understand the current setup
195
+
196
+ - List the GTM accounts and containers I can access.
197
+ - Which tags fire on page view in this workspace?
198
+ - Show the trigger and variable configuration for this tag.
199
+ - Which built-in variables are enabled?
200
+
201
+ ### Prepare tracking changes in a draft
202
+
203
+ - Create a workspace for the checkout tracking change.
204
+ - Prepare a GA4 tag and a trigger for a specific event.
205
+ - Enable the click variables needed for this trigger.
206
+ - Update this tag after showing me the complete replacement configuration.
207
+
208
+ ### Release a version deliberately
209
+
210
+ - Compile this workspace into a version named `April release`.
211
+ - Show the compiler errors, if any.
212
+ - Publish version `42` after I confirm the version and its changes.
213
+
214
+ ## How GTM changes are connected
215
+
216
+ GTM has a clear release path:
217
+
218
+ 1. An **account** contains one or more **containers**.
219
+ 2. A container has **workspaces** for draft changes.
220
+ 3. Tags, triggers and variables belong to a workspace.
221
+ 4. Compiling a workspace creates a **container version** and removes the source workspace. GTM provides a replacement workspace.
222
+ 5. Publishing makes a selected container version live.
223
+
224
+ This server can inspect each step. It does not treat a draft as a release: version creation and publishing are separate operations.
225
+
226
+ ## What can change
227
+
228
+ | Operation | What happens | Confirmation boundary |
229
+ |---|---|---|
230
+ | List accounts, containers, workspaces, tags, triggers, variables and versions | Reads GTM configuration | No change |
231
+ | Create a container or workspace | Adds a new GTM object | Changes GTM |
232
+ | Create a tag, trigger or variable | Adds a draft object to a workspace | Changes a draft workspace |
233
+ | Enable or disable built-in variables | Changes the workspace configuration | Changes a draft workspace |
234
+ | Update a tag, trigger or variable | Replaces the complete resource, protected by its fingerprint | Potentially destructive |
235
+ | Delete a tag, trigger or variable | Removes the selected object | Destructive |
236
+ | Compile a workspace | Creates a version and deletes the source workspace | Destructive |
237
+ | Publish a version | Makes a selected version live | Destructive |
238
+ | Raw API request | Can call API methods without a dedicated tool | Potentially destructive |
239
+
240
+ The AI client decides how it asks for confirmation. The server marks read-only, write and destructive operations so the client can distinguish inspection from a real change.
241
+
242
+ ## Getting access
243
+
244
+ Google Tag Manager requires OAuth 2.0; an API key is not enough. There are two ways in, and the first one needs no configuration files.
245
+
246
+ ### Connect from the chat (recommended)
247
+
248
+ Say "connect Google Tag Manager" and the assistant runs the flow with you:
249
+
250
+ 1. `setup_instructions` prints the checklist: create or select a Google Cloud project, enable **Tag Manager API**, configure the consent screen and create a **Desktop app** OAuth client.
251
+ 2. Download that client's JSON ("Download JSON") and give the assistant its **path** — `set_client` stores it owner-only. The secret never goes through the conversation.
252
+ 3. `start_login` returns a Google consent link. Open it **on this machine** and approve; the code comes back to a one-shot listener on `127.0.0.1` (PKCE), never through the chat.
253
+ 4. `finish_login` exchanges the code and saves the tokens to `~/.config/mcp-google-tagmanager/credentials.json` (mode 0600) and verifies them with a real Tag Manager API call — so an API that is still switched off is caught right there.
254
+
255
+ The tokens are re-read on every call, so the connection works immediately — no restart of the AI app. `auth_status` shows what is connected, `logout` revokes and deletes it.
256
+
257
+ ### Environment variables (CI, unattended installs)
258
+
259
+ 1. Create or select a Google Cloud project and enable the [Tag Manager API](https://console.cloud.google.com/apis/library/tagmanager.googleapis.com). A project without that API enabled receives no quota.
260
+ 2. Configure the OAuth consent screen and create an OAuth client. A **Desktop app** client is suitable for local use.
261
+ 3. Authorize your Google account and obtain a refresh token. The [OAuth 2.0 Playground](https://developers.google.com/oauthplayground) can do this if you enable **Use your own OAuth credentials**.
262
+ 4. Request these scopes together:
263
+
264
+ ```text
265
+ https://www.googleapis.com/auth/tagmanager.readonly
266
+ https://www.googleapis.com/auth/tagmanager.edit.containers
267
+ https://www.googleapis.com/auth/tagmanager.edit.containerversions
268
+ https://www.googleapis.com/auth/tagmanager.publish
269
+ ```
270
+
271
+ The scopes are separate: reading, editing, compiling versions and publishing each need their corresponding permission. Treat the client secret and refresh token as passwords.
174
272
 
175
273
  ## Configuration
176
274
 
177
- | Variable | Required | Default | Description |
178
- |---|---|---|---|
179
- | `GOOGLE_TAGMANAGER_CLIENT_ID` | yes* | — | OAuth client id |
180
- | `GOOGLE_TAGMANAGER_CLIENT_SECRET` | yes* | — | OAuth client secret |
181
- | `GOOGLE_TAGMANAGER_REFRESH_TOKEN` | yes* | — | OAuth refresh token |
182
- | `GOOGLE_TAGMANAGER_ACCESS_TOKEN` | no | — | Ready-made access token; replaces the trio for quick sessions |
183
- | `GOOGLE_TAGMANAGER_API_BASE` | no | `https://tagmanager.googleapis.com` | API root override |
184
- | `GOOGLE_TAGMANAGER_TIMEOUT_MS` | no | `60000` | Per-request timeout |
185
- | `GOOGLE_TAGMANAGER_MAX_RETRIES` | no | `3` | Retries on transient errors |
186
- | `GOOGLE_TAGMANAGER_MIN_INTERVAL_MS` | no | `4200` | Minimum spacing between API requests (0.25 QPS quota) |
187
-
188
- \* the trio is required unless `GOOGLE_TAGMANAGER_ACCESS_TOKEN` is set.
189
-
190
- ## Good to know
191
-
192
- - **`create_version` deletes the source workspace.** The response's `newWorkspacePath`
193
- points to the automatically created replacement — the server surfaces it and the tool
194
- description warns the model, but keep it in mind when scripting.
195
- - **`compilerError: true` can arrive with HTTP 200** on `create_version` and publish.
196
- The server converts it into a tool error so it is never mistaken for success.
197
- - **Updates are full replacements** (PUT, not PATCH): `update_entity` expects the complete
198
- resource. Fetch with `get_resource`, edit, send back, and pass the `fingerprint` for
199
- optimistic-concurrency safety.
200
- - **All ids are strings**, and every resource carries its own `path` field — echo it back
201
- rather than assembling paths by hand.
202
-
203
- ## Requirements
204
-
205
- - Node.js >= 20
206
- - A Google account with access to at least one GTM container
207
-
208
- ## Documentation
209
-
210
- - [docs/TOOLS.md](docs/TOOLS.md) — tool reference
211
- - [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) — architecture and dev commands
212
- - [docs/PUBLISHING.md](docs/PUBLISHING.md) — release checklist
275
+ Every variable is optional — with none of them the server connects [from the chat](#connect-from-the-chat-recommended).
276
+
277
+ | Variable | Required | Description |
278
+ |---|---|---|
279
+ | `GOOGLE_TAGMANAGER_CLIENT_ID` | No* | OAuth client ID. |
280
+ | `GOOGLE_TAGMANAGER_CLIENT_SECRET` | No* | OAuth client secret. |
281
+ | `GOOGLE_TAGMANAGER_REFRESH_TOKEN` | No* | OAuth refresh token. |
282
+ | `GOOGLE_TAGMANAGER_ACCESS_TOKEN` | No* | Short-lived alternative to the OAuth trio. |
283
+ | `GOOGLE_TAGMANAGER_OAUTH_PORT` | No | Fixed loopback port for the in-chat login; useful over SSH port forwarding. |
284
+ | `GOOGLE_TAGMANAGER_API_BASE` | No | Tag Manager API base URL override. |
285
+ | `GOOGLE_TAGMANAGER_TIMEOUT_MS` | No | Per-request timeout; default `60000` ms. |
286
+ | `GOOGLE_TAGMANAGER_MAX_RETRIES` | No | Maximum retries on temporary failures; default `3`. |
287
+ | `GOOGLE_TAGMANAGER_MIN_INTERVAL_MS` | No | Minimum request spacing; default `4200` ms. |
288
+
289
+ \* Provide either the OAuth trio or an access token. Access tokens expire in about an hour and are not refreshed automatically.
290
+
291
+ ## Data and telemetry
292
+
293
+ The server runs locally and sends GTM API requests and OAuth refresh requests to Google. Its anonymous telemetry contains a random installation ID, package version, AI client and Node.js/operating-system versions, and tool names. It does not send OAuth tokens, GTM data, tool arguments or prompts.
294
+
295
+ Disable telemetry for A1 MCP servers with:
296
+
297
+ ```bash
298
+ ASKADS_TELEMETRY=0
299
+ ```
300
+
301
+ ## Limits and background work
302
+
303
+ - **GTM is rate-limited.** The API allows 0.25 requests per second per project, so the server serializes calls at least 4.2 seconds apart. Broad audits can therefore take time.
304
+ - **Temporary limits are retried carefully.** `429` and Google quota `403` responses use exponential backoff and `Retry-After`. Reads retry after network and `5xx` failures; writes are not replayed after an uncertain failure.
305
+ - **There is no background monitoring.** The server runs only when your AI app calls it. If the app supports scheduled tasks, it can periodically inspect a container or its live version.
306
+ - **A workspace disappears when compiled.** Before calling `create_version`, save anything you need from the workspace and inspect the returned replacement workspace path.
307
+
308
+ ## Technical documentation
309
+
310
+ - [MCP capability catalog](./docs/capabilities/index.md) — task-oriented pages for every tool.
311
+ - [All tools and inputs](./docs/TOOLS.md)
312
+ - [Development documentation](./docs/DEVELOPMENT.md)
313
+ - [Publishing documentation](./docs/PUBLISHING.md)
213
314
  - [Google Tag Manager API v2 reference](https://developers.google.com/tag-platform/tag-manager/api/reference/rest)
214
315
 
215
316
  ## Support
216
317
 
217
- Questions and issues → [GitHub Issues](https://github.com/A1-x-Tech/mcp-google-tagmanager/issues)
218
- or Telegram [@gistrec](https://t.me/gistrec).
318
+ Found a bug or need a scenario? [Create an issue](https://github.com/A1-x-Tech/mcp-google-tagmanager/issues) or write in [Telegram](https://t.me/a1_mcp).
319
+
320
+ <br>
219
321
 
220
- ## License
322
+ <p align="center">
323
+ <img src="https://github.com/ztemerbekov/a1-yandex-kit-skills/raw/main/assets/images/mona-hifive-yandex-kit-warm.gif" alt="Две Моны дают пять" width="256">
324
+ </p>
221
325
 
222
- [MIT](./LICENSE)
326
+ <p align="center">
327
+ You made it to the end!
328
+ </p>