
Ainative Gtm Mcp
io.github.AINative-StudioPublished by GitHub account AINative-Studiov0.4.2Updated Oct 24, 2026
Full Google Ads, Analytics & Tag Manager lifecycle MCP for AI agents — 57 tools.
Overview
A local MCP server that lets an assistant audit and edit Google Tag Manager containers and manage Google Ads campaigns, budgets, conversions and targeting.
- What you can do
- List GTM accounts, containers, tags and triggers, and read their configuration; update or delete tags and create or update triggers; audit a container for a health score and issues, find misfiring conversion tags and rewire their triggers; review workspace changes, create versions and publish to live; build and adjust Google Ads campaigns, ad groups, ads, assets, bidding, budgets, keywords, audiences, extensions, geo and language targeting, negative placements and auto-apply recommendations; create and upload offline gclid conversions and audit conversion goals and account performance.
- When to use it
- Useful when an assistant should work directly on live Google Tag Manager containers or Google Ads accounts without the web UI, for example auditing conversion tags that fire on every page, publishing tag fixes, or building and tuning campaigns and budgets programmatically.
- Requirements
- Runs locally via npx (Node.js). Needs a Google Cloud service account JSON key with the Tag Manager API enabled, referenced by GTM_SERVICE_ACCOUNT_KEY_PATH, and the service account added as a GTM user with Read or Publish permission. Google Ads tools need OAuth credentials, GOOGLE_ADS_DEVELOPER_TOKEN and GOOGLE_ADS_CUSTOMER_ID.
Installation
In SourceWeft
- Open Ainative Gtm Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@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.
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
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
- Go to Google Cloud Console
- Select or create a project
- Navigate to APIs & Services → Library
- Search for Tag Manager API (
tagmanager.googleapis.com) and click Enable
Step 2 — Create a service account
- Go to IAM & Admin → Service Accounts
- Click Create Service Account
- Give it a name (e.g.
gtm-mcp-agent) - Skip role assignment at GCP level — GTM has its own permission system
- Click Done, then open the service account
- Go to Keys → Add Key → Create new key → JSON
- 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:
- Go to tagmanager.google.com
- Click Admin (top nav)
- Under Account, click User Management
- Click + → Add users
- Enter the service account email (e.g.
[email protected]) - Set permission to Publish (required for tag editing and publishing)
- Save
Note: If you only need read access (auditing), Read permission is sufficient.
Step 4 — Configure the env var
3. Connect to Claude Code
Or add a .mcp.json to your project root:
Security: Add
.mcp.jsonto.gitignoreif it contains key paths. Use.mcp.example.jsonas a template for teammates.
4. Verify it works
Ask Claude:
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_tagsto 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.
Tool Reference
Account & Container (3 tools)
Tags (4 tools)
Triggers (4 tools)
Audit & Fix (3 tools)
Versions & Publishing (4 tools)
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)
Bidding & bids
Ad control
Ad extensions (assets)
Audiences & conversions (attribution)
Conversions & reporting
Campaigns & budgets
Targeting & fraud protection
Auto-apply recommendations
Google Ads Authentication
The Google Ads tools use OAuth2 credentials. Provide them via environment variables or your ADC file:
Developer token: Get yours at Google Ads API Center. A test token works for sandbox accounts; a standard token is required for production.
Note on GA4-imported conversions: If you see events like
ads_conversion_PURCHASE_1in GA4 butgads_list_conversion_actionsreturns an empty list, those conversions are GA4-imported into Google Ads (configured under Google Ads → Tools → Conversions). They are not standalone conversion actions and must be managed through the Google Ads UI.
Troubleshooting
Development
License
MIT — AINative Studio
Source: README.md at commit b858f34
Tools
0Version history
1- v0.4.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts