---
title: 'Claude Code + Meta Ads MCP Workflow: Setup & Guardrails'
description: 'Connect Claude Code to Meta Ads via Plainrouter MCP in one command. Audit spend against first-party arrivals, preview dry_run_actions, and govern writes safely.'
canonical: 'https://plainrouter.com/library/claude-code-meta-ads-workflow'
format: Guide
last_updated: '2026-12-02'
---

Connecting [Claude Code to Meta Ads via Plainrouter MCP](</agents/claude/meta>) turns your terminal into a fast, auditable Meta Ads workbench: Claude can read campaign performance beside first-party arrivals, cross-check your tracking codebase, preview mutations with dry\_run\_actions, and queue governed proposals in Ask mode without holding raw Meta tokens.

## Step 1: Add Plainrouter MCP to Claude Code in one command

Register Plainrouter's hosted Streamable HTTP MCP server in Claude Code and start with a workspace credential scoped to Read access (or Write + Ask mode):

` claude mcp add --transport http plainrouter https://plainrouter.com/mcp `

Authenticate via OAuth or pass your scoped workspace key via headers from your local environment. Run /mcp inside Claude Code to confirm the Plainrouter server is connected and tools are visible.

Note: You can also connect Meta's official MCP server alongside Plainrouter, but changes sent directly through Meta's server bypass Plainrouter's approval queue, policy engine, and receipts.

## Step 2: Run the 3-minute signal-first terminal audit

Before letting Claude suggest pauses or creative refreshes, always verify that Meta Ads Manager numbers agree with your first-party conversion signals:

` Using Plainrouter MCP, pull the last 7 and 14 days of Meta campaign spend, Meta-reported purchases, and Plainrouter first-party arrivals. Check stored signal-health diagnostics and highlight any campaign where Meta purchases diverge from verified arrivals or CPA spiked after our recent deploys. `

Always inspect the reporting period and freshness timestamp returned by Plainrouter before making same-day spend calls, since retained performance snapshots are not a real-time tick-by-tick Meta poll.

## Step 3: Preview every proposed change with dry\_run\_actions

When Claude identifies wasted spend or fatigued ad sets, require a dry-run preview before queueing any write proposal:

` Rank active ad sets that spent at least 2x our target CPA over the last 7 days with zero verified arrivals. Call dry_run_actions to preview pausing the bottom 2 ad sets, show the exact before/after diff, and wait for my confirmation before submitting to the Plainrouter Inbox. `

- **Ask mode (recommended default): **Every write proposal lands in the Plainrouter Inbox as a structured diff card waiting for human approval.
- **Custom mode: **Your workspace switches decide which lower-risk actions can run automatically.
- **Full mode: **Runs every agent change that passes admission and workspace policy automatically, including budget increases, campaign or ad-set creation, ad-set duplication, and campaign or ad-set activation. Rule violations are always blocked and shown in the Inbox.

## Step 4: Combine Claude Code repo edits with Meta CAPI checks

Where Claude Code shines over browser chat is combining repository edits with live signal checks in one loop:

- **Audit checkout and CAPI PRs: **Ask Claude Code to inspect your Next.js Route Handler or Laravel controller for 3rd-argument fbq() eventID bugs, millisecond event\_time timestamps, or accidentally hashed \_fbp/\_fbc cookies.
- [Run CLI validation in terminal: ](<https://github.com/plainrouter/meta-capi-check>)Pair Claude Code with our zero-dependency CLI (plainrouter/meta-capi-check) to validate CAPI JSON payloads, \_fbp/\_fbc cookies, and Pixel/CAPI deduplication pairs right in your terminal or CI pipeline.
- **Stage paused creative variants: **Use Plainrouter Launch via MCP to prepare new ad variants paused by default, reusing verified source ad structures without risking accidental live spend.

## Frequently asked questions

### Can Claude Code increase my Meta Ads daily budgets automatically?

Only if your workspace is set to Full mode (or Custom mode with budget increases enabled) and the change passes admission and workspace policy. In Ask mode, every proposed change waits for your approval in the Plainrouter Inbox, and in Custom mode your switches decide which action types require a person.

### Should I start Claude Code with Read-only or Write access?

Start with Read-only access for your first few audit sessions so your team can verify metric alignment between Meta Ads Manager and Plainrouter first-party arrivals. Once comfortable, enable Write access in Ask mode with dry\_run\_actions previews.

### Does Claude Code need my Meta System User access token?

No. Plainrouter isolates your Meta OAuth authorization inside your workspace and issues scoped MCP credentials to Claude Code, so underlying Meta tokens never sit in local shell profiles or .env files.

### How does this workflow compare to Cursor + Meta Ads MCP?

Both Claude Code and Cursor connect to the exact same hosted Plainrouter MCP endpoint and approval engine. Choose Claude Code for terminal-first automation and CI checks, or see our [Cursor + Meta Ads MCP workflow guide](</library/cursor-meta-ads-workflow>) if your team prefers editor-native Composer sessions.

## Related guides and tools

- [Connect Claude Code to Meta Ads via MCP](</agents/claude/meta>): official Claude Code setup page, OAuth/key options, and governance overview.
- [15 Meta Ads MCP prompts](</library/meta-ads-mcp-prompts>): copy-paste prompts for wasted-spend audits, creative fatigue, CAPI checks, and Ask-mode proposals.
- [Run a Meta Ads campaign audit with AI](</library/meta-ads-campaign-audit-with-ai>): five-step signal-first audit workflow for Claude, ChatGPT, Codex, and Cursor.
- [Meta Ads budget optimization with AI agents](</library/meta-ads-mcp-budget-optimization>): safe scaling caps, dry\_run\_actions, and approval gates.
