Skip to main content
ClaudeWave

The Google Ads + Analytics + Tag Manager MCP for AI agents — full programmatic campaign lifecycle (create, bid, track, optimize). 57 tools. Better than the official Google Ads MCP.

MCP ServersRegistry oficial0 estrellas0 forksTypeScriptMITActualizado yesterday
Install in Claude Code / Claude Desktop
Method: NPX · --
Claude Code CLI
claude mcp add ainative-gtm-mcp -- npx -y --
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "ainative-gtm-mcp": {
      "command": "npx",
      "args": ["-y", "--"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

# @ainative/gtm-mcp

Google Tag Manager **and Google Ads** MCP server — audit, fix, and manage GTM containers and Google Ads campaigns, budgets, conversions, placements, geo targeting, and auto-apply recommendations from AI agents (Claude, Cursor, and any MCP client).

Part of the [AINative open-source tools](https://ainative.studio).

**57 tools** across 7 categories: accounts, tags, triggers, audit, versions/publishing, and a **complete Google Ads lifecycle** (39 tools) — build, publish, track, and adjust campaigns end-to-end: create campaigns/ad groups/RSAs/RDAs/HTML5 ads, Performance Max, bidding strategy & bid control, ad extensions (sitelinks/callouts/snippets/call), audiences, offline gclid conversion import, geo/language targeting, budgets, placements, and auto-apply recommendations — fully programmatic, no UI required.

**Keywords:** google tag manager mcp, google ads mcp, gtm mcp server, google ads api mcp, conversion tracking mcp, campaign budget management, negative placement / click-fraud exclusion, geo targeting, auto-apply recommendations, recommendation subscriptions, conversion goals, Smart Bidding, PPC automation, ad spend control, Claude MCP, model context protocol, AI agent advertising tools.

## Quick Start

### 1. Install

```bash
# Claude Code (recommended)
claude mcp add ainative-gtm-mcp npx -- -y @ainative/gtm-mcp \
  -e GTM_SERVICE_ACCOUNT_KEY_PATH=/path/to/service-account.json

# Or run directly
npx @ainative/gtm-mcp
```

### 2. Set up Google Cloud authentication

The server authenticates via a Google Cloud **service account** with Tag Manager API access. There is no browser OAuth flow — it's designed for headless/agent use.

#### Step 1 — Enable the Tag Manager API

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Select or create a project
3. Navigate to **APIs & Services → Library**
4. Search for **Tag Manager API** (`tagmanager.googleapis.com`) and click **Enable**

#### Step 2 — Create a service account

1. Go to **IAM & Admin → Service Accounts**
2. Click **Create Service Account**
3. Give it a name (e.g. `gtm-mcp-agent`)
4. Skip role assignment at GCP level — GTM has its own permission system
5. Click **Done**, then open the service account
6. Go to **Keys → Add Key → Create new key → JSON**
7. Download the JSON key file — keep it safe

#### Step 3 — Grant the service account access in GTM

This is the step most people miss. The GCP service account needs to be added as a user **inside Google Tag Manager** separately:

1. Go to [tagmanager.google.com](https://tagmanager.google.com)
2. Click **Admin** (top nav)
3. Under **Account**, click **User Management**
4. Click **+** → **Add users**
5. Enter the service account email (e.g. `gtm-mcp-agent@your-project.iam.gserviceaccount.com`)
6. Set permission to **Publish** (required for tag editing and publishing)
7. Save

> **Note:** If you only need read access (auditing), **Read** permission is sufficient.

#### Step 4 — Configure the env var

```bash
export GTM_SERVICE_ACCOUNT_KEY_PATH="/path/to/service-account.json"

# Or use inline JSON (useful for CI/CD)
export GTM_SERVICE_ACCOUNT_KEY_JSON='{"type":"service_account","project_id":"...","private_key":"..."}'

# Or use Application Default Credentials
gcloud auth application-default login
```

### 3. Connect to Claude Code

```bash
claude mcp add ainative-gtm-mcp npx -- -y @ainative/gtm-mcp \
  -e GTM_SERVICE_ACCOUNT_KEY_PATH=/path/to/service-account.json
```

Or add a `.mcp.json` to your project root:

```json
{
  "mcpServers": {
    "ainative-gtm-mcp": {
      "command": "npx",
      "args": ["-y", "@ainative/gtm-mcp"],
      "env": {
        "GTM_SERVICE_ACCOUNT_KEY_PATH": "/path/to/service-account.json"
      }
    }
  }
}
```

> **Security:** Add `.mcp.json` to `.gitignore` if it contains key paths. Use `.mcp.example.json` as a template for teammates.

### 4. Verify it works

Ask Claude:
```
List my GTM accounts
```

Expected: your GTM account name and ID. If you get an empty array `[]`, the service account hasn't been added to GTM yet (Step 3 above).

---

## Important: GTM vs Google Ads conversions

This MCP server manages **Google Tag Manager containers** — tags, triggers, variables, and publishing. 

If you see events like `ads_conversion_PURCHASE_1` in GA4, those may be coming from **Google Ads auto-imported conversions** (via GA4 ↔ Google Ads account linking), not GTM tags. In that case:

- If the event fires via a GTM tag → use `gtm_find_misfiring_conversion_tags` to fix it
- If the event is a GA4-imported Google Ads conversion → fix it in **Google Ads → Tools → Conversions**, not in GTM

To tell the difference: if your GTM container has no tags (`gtm_list_tags` returns `[]`), the conversion event is coming from outside GTM.

---

## Example: Fix a misfiring conversion tag

The most common GTM billing issue — a Google Ads conversion tag fires on every page view instead of only on purchase confirmation.

```
1. List your accounts:
   "List my GTM accounts"
   → accountId: 123456789

2. List containers:
   "List containers for account 123456789"
   → containerId: 987654321, publicId: GTM-XXXXXXX

3. Audit the container:
   "Audit container 987654321 in account 123456789"
   → health score, list of issues including misfiring tags

4. Find misfiring conversion tags:
   "Find misfiring conversion tags in container 987654321"
   → shows which tags fire on All Pages instead of specific events

5. Fix the tag:
   "Fix tag 42 to only fire on the purchase_confirmed event"
   → gtm_fix_conversion_tag_trigger creates a scoped Custom Event trigger
     and rewires the tag automatically

6. Review and publish:
   "Show pending workspace changes, then publish"
   → gtm_get_workspace_status + gtm_publish
```

---

## Tool Reference

### Account & Container (3 tools)

| Tool | Description |
|------|-------------|
| `gtm_list_accounts` | List all accessible GTM accounts |
| `gtm_list_containers` | List containers in an account |
| `gtm_get_container` | Get container details |

### Tags (4 tools)

| Tool | Description |
|------|-------------|
| `gtm_list_tags` | List all tags in a workspace |
| `gtm_get_tag` | Get full tag configuration |
| `gtm_update_tag` | Update a tag (trigger, params, name) |
| `gtm_delete_tag` | Delete a tag |

### Triggers (4 tools)

| Tool | Description |
|------|-------------|
| `gtm_list_triggers` | List all triggers |
| `gtm_get_trigger` | Get trigger configuration |
| `gtm_create_trigger` | Create a new trigger |
| `gtm_update_trigger` | Update an existing trigger |

### Audit & Fix (3 tools)

| Tool | Description |
|------|-------------|
| `gtm_audit_container` | Full container audit — health score 0–100, issues list |
| `gtm_find_misfiring_conversion_tags` | Find conversion tags firing on All Pages instead of specific events |
| `gtm_fix_conversion_tag_trigger` | Fix a misfiring tag — creates scoped Custom Event trigger, rewires tag |

### Versions & Publishing (4 tools)

| Tool | Description |
|------|-------------|
| `gtm_list_workspaces` | List workspaces |
| `gtm_get_workspace_status` | View pending changes before publishing |
| `gtm_create_version` | Create a named version from workspace changes |
| `gtm_publish` | Publish workspace to live |

### Google Ads (39 tools)

Full programmatic campaign lifecycle — an agent can build, launch, measure, and optimize a campaign end-to-end with no UI.

**Build (campaigns, ad groups, ads, assets)**

| Tool | Description |
|------|-------------|
| `gads_create_campaign` | Create a Search/Display campaign with a dedicated budget + correct network settings |
| `gads_create_pmax_campaign` | **One-call Performance Max builder** — campaign + budget + asset group (headlines, descriptions, images, logo) in a single call; Google's AI optimizes across Search/Display/YouTube/Gmail |
| `gads_create_ad_group` | Create an ad group inside a campaign |
| `gads_create_responsive_search_ad` | Create an RSA (3–15 headlines, 2–4 descriptions, length-validated) |
| `gads_create_responsive_display_ad` | Create a responsive display ad |
| `gads_create_html5_ad` | Create an HTML5 upload (animated) display ad from a media bundle |
| `gads_upload_image_asset` | Upload an image asset by URL |
| `gads_upload_media_bundle` | Upload an HTML5 media-bundle (zip) asset |

**Bidding & bids**

| Tool | Description |
|------|-------------|
| `gads_set_bidding_strategy` | Swap bidding strategy (Maximize Clicks / Maximize Conversions / Target CPA / Target ROAS / Manual CPC) — **reads back the change to confirm it landed** (empty-payload swaps silently no-op) |
| `gads_set_ad_group_bid` | Set an ad group's default max CPC bid |
| `gads_set_keyword_bid` | Set a specific keyword's max CPC bid |

**Ad control**

| Tool | Description |
|------|-------------|
| `gads_set_ad_status` | Pause / enable / remove an individual ad |
| `gads_request_ad_review` | Request re-review (appeal) of a disapproved/limited ad where API-appealable; honest result for UI-only policy topics |

**Ad extensions (assets)**

| Tool | Description |
|------|-------------|
| `gads_add_sitelink` | Create + attach a sitelink |
| `gads_add_callout` | Create + attach a callout (e.g. "7-Day Free Trial") |
| `gads_add_structured_snippet` | Create + attach a structured snippet |
| `gads_add_call_extension` | Create + attach a call (phone) extension |

**Audiences & conversions (attribution)**

| Tool | Description |
|------|-------------|
| `gads_add_audience_to_ad_group` | Attach a user-list audience (observation or targeting) |
| `gads_create_conversion_action` | Create an offline (UPLOAD_CLICKS) conversion action for gclid import |
| `gads_upload_click_conversion` | Upload an offline conversion keyed by gclid — ties a real signup back to the ad click that drove it |

**Conversions & reporting**

| Tool | Description |
|------|-------------|
| `gads_list_conversion_actions` | List all conversion actions — name, ID, counting type, status, category |
| `gads_update_conversio
advertisingai-agentsclaudegoogle-adsgoogle-ads-mcpgoogle-analyticsgtmmcpmcp-servermodel-context-protocolperformance-maxppc

Lo que la gente pregunta sobre ainative-gtm-mcp

¿Qué es AINative-Studio/ainative-gtm-mcp?

+

AINative-Studio/ainative-gtm-mcp es mcp servers para el ecosistema de Claude AI. The Google Ads + Analytics + Tag Manager MCP for AI agents — full programmatic campaign lifecycle (create, bid, track, optimize). 57 tools. Better than the official Google Ads MCP. Tiene 0 estrellas en GitHub y se actualizó por última vez yesterday.

¿Cómo se instala ainative-gtm-mcp?

+

Puedes instalar ainative-gtm-mcp clonando el repositorio (https://github.com/AINative-Studio/ainative-gtm-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar AINative-Studio/ainative-gtm-mcp?

+

AINative-Studio/ainative-gtm-mcp aún no ha sido auditado por nuestro agente de seguridad. Revisa el repositorio original en GitHub antes de usarlo en producción.

¿Quién mantiene AINative-Studio/ainative-gtm-mcp?

+

AINative-Studio/ainative-gtm-mcp es mantenido por AINative-Studio. La última actividad registrada en GitHub es de yesterday, con 0 issues abiertos.

¿Hay alternativas a ainative-gtm-mcp?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega ainative-gtm-mcp en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: AINative-Studio/ainative-gtm-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/ainative-studio-ainative-gtm-mcp)](https://claudewave.com/repo/ainative-studio-ainative-gtm-mcp)
<a href="https://claudewave.com/repo/ainative-studio-ainative-gtm-mcp"><img src="https://claudewave.com/api/badge/ainative-studio-ainative-gtm-mcp" alt="Featured on ClaudeWave: AINative-Studio/ainative-gtm-mcp" width="320" height="64" /></a>

Más MCP Servers

Alternativas a ainative-gtm-mcp