google-marketing-agent
Let Claude (or any AI app that supports MCP) work on your Google Ads, GA4, Search Console and Tag Manager, safely.
Ask in plain language. The agent plans campaigns and budgets, builds Search and Demand Gen campaigns, audits accounts, explains what changed and writes client-ready reports. Every change is previewed first, applied only after your yes, logged, and reversible.
You: Audit my Google Ads account for the last 30 days.
Agent: Score 68/100. Biggest leak: 31% of spend is from people outside your target countries
("presence or interest" targeting on 2 campaigns). Fix list below, highest impact first…
You: Fix the location targeting on both.
Agent: Preview (nothing changed yet): 2 campaigns → people IN the location only. Apply?
You: Yes.
Agent: Applied (change 3f9c2a1b). You can undo it any time.
What you can do
Plan and budget
Build campaigns
Set up and fix tracking
Plan what to track, build it in Tag Manager from typed recipes, publish after you see the diff, then check what visitors actually get. Every tag, trigger and variable is previewed first; the previous live version is the rollback.
You: Track form leads and WhatsApp clicks on example.com, split business and consumer.
Agent: Plan: generate_lead and contact_click, split by /business/ vs /consumer/, 4 Ads actions, 2 goals,
plus the dataLayer code for your developers. Build it?
You: Yes.
Agent: Preview 1 of 14: CREATE variables "DLV - form_name" (nothing changed). Create it? …
Agent: Workspace vs live version 12: 4 variables, 4 triggers, 6 tags added. Publish as "2026-10-15 lead tracking"?
You: Yes.
Agent: Version 13 is live (rollback: version 12). Live check ✓ every label and event found in gtm.js.
Next: the test matrix, one real lead per row.
Step-by-step guide: docs/tracking.md.
Analyse and optimise
Report
More examples: docs/usage.md.
How it keeps your account safe
- Read-only until you say otherwise, per account. Agencies can allow changes on one client and keep another read-only.
- Preview first. Google validates every change without applying it; nothing happens until you confirm.
- Undo. Every applied change is logged with its previous state;
ads_rollbackputs it back. - Guardrails. New campaigns and ads start paused. Budget jumps above 50% (configurable) need an explicit override. Location targeting is always "people in the location", never Google's default that also includes people merely interested in it.
- Your credentials stay on your computer, in a file only you can read. The agent never sees them.
Details: docs/safety.md.
Get started
You need Node.js 20+ and a Google account that can open your Google Ads account. Allow about 15 minutes the first time; the full walkthrough with checks is in docs/setup.md.
1. Create your Google Cloud login (once, about 10 minutes). A Cloud project with the Google Ads API enabled, Explorer access, and a Desktop app OAuth client. No developer token needed. → Setup, part 1
2. Sign in and pick your accounts.
npx google-marketing-agent init # opens Google sign-in, lists every account you can reach
npx google-marketing-agent doctor # every line should be ✓
3. Add it to your AI app.
{
"mcpServers": {
"google-marketing": { "command": "npx", "args": ["-y", "google-marketing-agent"] }
}
}
On Claude Code older than 2.1.275, run /plugin marketplace add omarmfouad25/google-marketing-agent first, then
/plugin install google-marketing-agent. More apps: setup, part 3.
4. Ask. Start with "Run the setup doctor", then "Audit my Google Ads account for the last 30 days."
What's inside
Skills install with the Claude Code plugin. Other agents that support Agent Skills can load the skills/
folder directly.
Documentation
FAQ in short
- Does it cost anything? The package is free (MIT). The Google APIs it uses are free; you only pay for your ads.
- Do I need a Google Ads developer token? No. Access now comes from your Google Cloud project.
- Can it change my campaigns without asking? No. Accounts are read-only by default, and every change needs your confirmation after a preview.
- Where does my data go? From Google straight to the AI app on your computer. Nothing is sent anywhere else.
More: docs/faq.md.
Contributing
Issues and pull requests are welcome. Never paste tokens, customer IDs or client data into an issue. See CONTRIBUTING.md and SECURITY.md.
Licence
MIT © Omar Fouad. Not affiliated with or endorsed by Google. Google Ads, Google Analytics, Search Console and Tag Manager are trademarks of Google LLC.