How do I use Claude Code to manage my Google Ads and Meta ads?
Install Claude Code, then add the two official MCP servers: Meta's ads MCP server, which can read and change Meta campaigns, and Google's Google Ads MCP server, which only reads. Claude Code can then pull reports, review search terms and check pacing when you ask in plain English. To change Google Ads campaigns, have it write API scripts that you review and run. Add "ask" rules to Claude Code's permission settings so every ad tool call waits for your OK, and stay read-only until its numbers match your own reports.
As of October 2026.
Before you start
- A Claude plan that includes Claude Code. Anthropic lists Pro, Max, Team, Enterprise or a Console account; the free plan doesn't include it.
- Meta access. Access to the ad account. To set rules for what AI agents may do in it, you need full control of the business portfolio.
- Google Ads access. A Google Cloud project with Explorer, Basic or Standard Google Ads API access, and OAuth credentials. Google sunset developer tokens on September 9, 2026, so you don't need one.
- Tools. Python and pipx for Google's server, and Node.js if you want Google's agent skills.
Step 1: Install Claude Code
On macOS, Linux or WSL, open a terminal and run Anthropic's installer:
curl -fsSL https://claude.ai/install.sh | bash
On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. Then start claude in a folder for your ad work and log in when the browser opens. Anthropic's desktop app runs Claude Code without a terminal.
Step 2: Add Meta's ads MCP server
Meta's help center links Claude Code users to Anthropic's command for a remote HTTP server, claude mcp add --transport http <name> <url>, and gives Meta's URL. With the server name Meta's developer docs use, that's this command (our assembly; Meta doesn't print this exact line):
claude mcp add --transport http meta-ads https://mcp.facebook.com/ads
Type /mcp inside Claude Code and sign in with Facebook in the browser. If you use your own Meta developer app, use the command from Meta's developer docs instead: claude mcp add --transport http --client-id <META_APP_ID> meta-ads https://mcp.facebook.com/ads. Meta says new ads "are paused by default until you set them live." The Meta ads MCP server guide covers tokens and permissions.
Step 3: Add Google's Google Ads MCP server
Google gives no Claude Code command, only a JSON block for MCP clients. Anthropic's docs say to pass claude mcp add-json the object inside mcpServers, with --scope user for all your projects. Together (our assembly, not a command either company prints):
claude mcp add-json google-ads-mcp '{"command":"pipx","args":["run","--spec","git+https://github.com/googleads/google-ads-mcp.git","google-ads-mcp"],"env":{"GOOGLE_PROJECT_ID":"YOUR_PROJECT_ID","GOOGLE_APPLICATION_CREDENTIALS":"/path/to/credentials.json"}}' --scope user
Add GOOGLE_ADS_LOGIN_CUSTOMER_ID to env if you work through a manager account. Its three tools list your accounts, run Google Ads Query Language (GAQL) searches and describe fields, and Google says it "is strictly read-only." The Google Ads MCP server guide covers credentials and Cloud Run.
Step 4: Make Claude Code ask before it touches an ad account
Anthropic says permission rules are enforced by Claude Code, not by the model, so instructions in a prompt don't change what it allows. Deny rules block a tool, ask rules prompt you, and allow rules skip the prompt; deny beats ask, and ask beats allow. Anthropic says no mode auto-approves a tool that matches an ask rule, including auto mode and bypassPermissions.
Put rules like these in ~/.claude/settings.json (all your projects) or .claude/settings.json (one project):
{
"permissions": {
"allow": ["mcp__google-ads-mcp__*"],
"ask": ["mcp__meta-ads__*"],
"deny": [
"mcp__meta-ads__ads_activate_entity",
"mcp__meta-ads__ads_delete_custom_audience"
]
}
}
This runs the read-only Google server without prompts, asks before every Meta call (reads too, at first), and blocks two Meta tools outright. Anthropic's docs show hyphens kept in MCP tool names (mcp__brave-search__.*), so write meta-ads and google-ads-mcp as you added them. Meta says ads_activate_entity "starts spending budget," so with it blocked you turn ads on in Ads Manager yourself. Type /permissions to see the active rules.
Add a second layer in Meta Business Suite: go to Settings, select Ads MCP server under Integrations, pick the ad account and block actions such as Edit or set budget. Meta's server enforces those rules. Connecting Claude or ChatGPT to your ad accounts has more on them.
Step 5: Add skills for your ad work
A skill is a folder with a SKILL.md file of instructions. Claude loads it when your request matches its description, or when you type /skill-name. Personal skills go in ~/.claude/skills/<skill-name>/, and project skills in .claude/skills/<skill-name>/.
Google publishes official Google Ads API agent skills for Claude Code:
npx skills add google/skills/skills/ads --agent=claude-code
They include google-ads-api-account-diagnostics (conversion loss, low lead volume, lost impression share) and google-ads-api-mcp-setup; update them with npx skills update --all. Meta's ads MCP and Ads CLI docs list no skills, but vendors publish some, such as GoMarble's Meta and Google Ads audit skills on GitHub.
Or write one for a check you repeat, saved as ~/.claude/skills/weekly-pacing/SKILL.md:
---
description: Weekly pacing check for Google Ads and Meta. Use when asked about pacing, spend against budget, or overspend.
---
Read only. Never create, update, pause or activate anything.
1. For each active Meta campaign, get spend for the last 7 days and its budget.
2. For each enabled Google Ads campaign, run a GAQL query for cost and budget amount over the last 7 days.
3. Show one table per platform and flag campaigns well ahead of or behind budget.
4. End with a short list of what a person should check.
Keep write tools out of a skill's allowed-tools field, which Anthropic says pre-approves the listed tools for the turn that runs the skill.
Step 6: Start with read-only tasks
Run these for a few weeks, and check the answers against Ads Manager and Google Ads, before you allow changes:
- Reports. Meta's sample prompt: "Summarize the top-spending campaigns in
<AD_ACCOUNT_ID>over the last 30 days." Google's: "How is my campaign performance this week?" - Search term reviews. Ask for terms from
search_term_viewwith spend and no conversions in the last 30 days, as candidate negatives. Google says that view leaves out Performance Max, which usescampaign_search_term_view. - Pacing checks. Run
/weekly-pacingevery Monday. - Diagnostics. Ask why conversions dropped, and let Google's diagnostics skill pick the queries.
Step 7: Allow changes one approval at a time
- Meta. The ask rule makes Claude Code show each create or update call and wait. New campaigns, ad sets and ads start paused, but edits to existing ones go through a separate tool,
ads_update_entity, so read those prompts closely. - Google Ads. The Google Ads API Developer Assistant, a Claude Code plugin that Google's page calls an open-source project and not an official Google product, writes client library code, including mutate scripts. Google says those are saved to
saved/code/"but never executed directly by the assistant," so you review and run them. Install it by cloninggoogleads/google-ads-api-developer-assistant, putting agoogle-ads.yamlcredentials file in your home directory and running./install.sh claude, then/reload-plugins.
Step 8: Check the ban risk before you scale up
Meta's help center says "it's unlikely that an account would be banned simply for using" its ads MCP server; bans "are typically the result of violating Meta's advertising standards," such as repeatedly creating new accounts after others were banned. Google's developer policies don't restrict "your own use of the Google Ads API in a programmatic or automated way," but they ban third-party hosted MCP servers that only re-expose Google Ads. The bigger risk is what runs through the connection: ads that break policy, or an agent that keeps making variations of disapproved ads, which Google's Circumventing systems policy lists as a violation. More in whether an AI agent can get your ad account banned.
Common problems
| Problem | Why it happens | Fix |
|---|---|---|
/mcp says meta-ads needs authentication | You haven't signed in, or the stored token was rejected | Open /mcp and choose Re-authenticate, or run claude mcp login meta-ads in your shell |
| Some Meta tools or the Ads MCP server settings are missing | Meta is still rolling access out | Ask Claude which tools it has; Meta says no Ads MCP server entry means you don't have the feature yet |
| A Meta action is denied even though you approved it | A Business Suite agent rule blocks it | Change the rule in Business Suite if the block isn't what you want |
| The Google Ads server won't start | pipx or Python isn't installed, or your Cloud project's details are wrong | Install pipx, check the env values, then run claude mcp get google-ads-mcp to see its status |
| Claude Code never asks before Meta calls | No ask rule matches, or the rule's server name differs from the one you added | Check /permissions; the rule must start with mcp__ plus the exact server name |
Where Tofu fits
Tofu Ads Agent (our product) is a different route from wiring Claude Code to your accounts yourself. It's an AI agent that plans, builds, launches and optimizes paid programs on LinkedIn, Google Search, Google Display and Meta. Campaigns it builds are staged in your own ad account switched off, and a person turns them on. Its weekly bid, budget and creative recommendations stay proposals until you approve them. What it doesn't do: it never launches a campaign on its own, it doesn't run Reddit ads, and on Google it covers Search and Display. It costs a flat $2,500 a month, with a recommended media budget of at least $3,000 a month.
Sources
- Advanced setup | Claude Code Docs, checked October 26, 2026
- Connect Claude Code to tools via MCP | Claude Code Docs, checked October 26, 2026
- Configure permissions | Claude Code Docs, checked October 26, 2026
- Choose a permission mode | Claude Code Docs, checked October 26, 2026
- Hooks reference | Claude Code Docs, checked October 26, 2026
- Settings files and precedence | Claude Code Docs, checked October 26, 2026
- Extend Claude with skills | Claude Code Docs, checked October 26, 2026
- Manage ads from an AI agent with Meta ads AI connectors | Meta Business Help Center, checked October 26, 2026
- Ads MCP Server: Get started | Meta for Developers, checked October 26, 2026
- Ads MCP Server: Ad creation and management | Meta for Developers, checked October 26, 2026
- Google Ads MCP server: Developer integration guide | Google Ads API, checked October 26, 2026
- Google Ads API agent skills | Google Ads API, checked October 26, 2026
- Install and use the Google Ads API Developer Assistant | Google Ads API, checked October 26, 2026
- search_term_view | Google Ads API, checked October 26, 2026
- Google Ads Developer Policies | Advertising Policies Help, checked October 26, 2026
- Circumventing systems | Advertising Policies Help, checked October 26, 2026
- GoMarble Paid Media Claude Skills | GitHub, checked October 26, 2026
- Tofu Ads Agent (llms.txt), checked October 26, 2026