Run Meta Ads from Claude Code
Valkiria reads the Meta ad account you connected over Meta OAuth and gives the assistant Facebook and Instagram campaign results, lead forms with their leads, the audit findings and the care recommendations. Claude Code adds Valkiria with one command. Because it works in your terminal and repository, it can save what it reads to files, compare it with last week and keep reports next to your code.
01
Connect Claude Code in 3 steps
- Run the command below in your terminal.
- Sign in to Valkiria in the browser window that opens and approve the request.
- Start a new session and type: "Get started with Valkiria".
- The command registers a remote HTTP server; nothing is installed locally and no API key is stored in your repository.
claude mcp add --transport http valkiria https://valkiria.pro/mcp02
What works for Meta Ads today
Connection: Meta OAuth with the Marketing API scopes. Tokens are stored encrypted and can be revoked from Valkiria or Business Manager.
The assistant can read
- Campaigns with status and budgets across Facebook and Instagram.
- Dated spend, clicks and conversions per currency for an explicit date range.
- Lead forms and the leads they collected.
- Open findings of the standing campaign audit and the care recommendations with a preview.
- Live from Meta: ad sets and ads, delivery status, ad performance, placement breakdown, creative fatigue and wasted spend, plus audiences, pixels and Pages.
The assistant can propose or request
- Propose a campaign or ad set budget, an ad set schedule, targeting or placements, new ad copy, a new ad set or ad, a duplicate of a campaign, or promoting a Page post.
- Approve or reject a care recommendation after previewing what it changes.
- Request a pause or a resume of a campaign.
- Create a campaign draft inside Valkiria. A campaign that later reaches Meta is created PAUSED.
- Pull new leads from Meta into Valkiria on request.
- Create and update automation rules.
- Create a monitor that checks the account on a schedule and notifies you or queues a proposal, and schedule a report by email. Neither changes an ad account by itself.
03
Prompts to try: Meta Ads in Claude Code
Copy one, replace the parts in brackets and send it. The assistant picks the tools itself.
Which Meta campaigns had the biggest jump in cost per result over the last 14 days compared with the 14 days before?
List my Meta lead forms and how many leads each one collected this month.
Show the 20 newest leads from my Meta lead forms with the form each came from.
List the open audit findings for my Meta account and tell me which ones cost money right now.
Export this month's Meta leads to leads/meta-this-month.csv and list the forms that produced none.
Read the ad copy in copy/meta.md, write three variants per ad and save them next to the originals.
04
How changes stay safe
- Sign-in uses OAuth 2.1 with PKCE on valkiria.pro, so the assistant never sees your password.
- Two scopes, chosen by you at sign-in: read, and propose. With read alone the assistant cannot request any change.
- A change requested from an assistant is a proposal. It waits in Approvals in Valkiria until the account owner approves it, unless the write policy you set for that account allows that kind of change by itself.
- New campaigns are created paused. Starting new spend and deleting always wait for a person.
- The assistant can list what is waiting for approval and reject a proposal. It cannot approve one: approval stays with the owner in Valkiria.
- The change history shows who or what made each change and the value before and after, with Undo where the change can be reversed.
- You can disconnect an assistant at any time on the Connect AI page; a developer API key can be deleted the same way.
05
Limits
Meta Ads
- Lead data is personal data: the assistant sees leads only with a key or grant that includes the leads scope.
- Deleting from the assistant removes a Valkiria draft only, never a campaign in Meta.
Claude Code
- Files the assistant writes are its own work in your repository: Valkiria returns data, it does not create files for you.
- The assistant sees only your own Valkiria workspace, and only the ad accounts connected there.
- Numbers are as fresh as the last sync or import; the assistant can tell you when that was.
- Money stays in each account's own currency. Different currencies are not converted or added up.
- Reading data is not counted against the monthly allowance; changes and AI generations are. Allowances per plan are on the pricing page.
06
FAQ
Ask Claude Code about your Meta Ads account
Create a free account, connect an ad account and add the connector. The first pass only reads.