This is the setup that lets you manage your Facebook & Instagram ads directly through Claude Code — checking spend, adjusting budgets, pausing ad sets, pulling performance — without the Meta Ads MCP and without clicking through the Meta UI every time.
It works by generating a Meta Marketing API access token. Once you have that token, you paste it into your Claude Code session and it handles the rest. You own the connection, the context lives on your machine, and nothing runs through a middle-man connector.
A Facebook Business account that owns your ad account, with admin access. That's it. Click through one step at a time — click any screenshot to zoom in.
Go to business.facebook.com → Settings → Users → System users. Click Add in the top right.
Name it something you'll recognise — for example API Ads Loader. Set the role to Employee access.
It's a non-human user that exists only to issue API tokens. You're creating a dedicated "robot account" whose only job is to hold the credentials Claude will use.
Head to developers.facebook.com and click Create new app ID (or Create App).
Meta grants API access at the App level, not the business level. The app is the container for the API permissions — and the token you'll generate at the end is bound to that app plus the system user from Step 1.
Give the app a name — API Ads Loader is fine. Add your contact email. Click Next.
On the use-cases screen, choose "Create and manage ads with Marketing API". This is the one that unlocks ad-account access.
Pick your Business from the dropdown — the one that owns your ad account. Click Next.
You must attach the app to your Business at this step. If you skip it, the system user from Step 1 won't be able to install the app later, and the token won't have access to ad accounts.
Meta will show a "Requirements" page. For the Marketing API there are usually no requirements identified — just click Next.
Then on the Overview screen, click Create app.
Now switch back to business.facebook.com. In the left sidebar under Accounts, click Apps.
You should see the app you just created in the list.
Click into the app, then click the Assign Access button.
In the assignment dialog, select the System User you created in Step 1. Then toggle these 4 app permissions on:
Click Save changes.
Go back to Users → System users. Click your system user, then open the Installed apps tab. You should see the app listed there with Full control.
If you see your app under Installed apps, the wiring is correct. Move on.
Still in Business Settings. In the left sidebar under Accounts, click Ad accounts, then click into the ad account you want Claude to manage.
Click Assign access, then add the System User you created.
In the permissions panel, under Partial access, turn Manage campaigns (ads) on. Leave the others off — that's all the token needs.
Click Save changes.
Back to Users → System users. Click your system user. In the top right, click Generate token.
Pick the app you created (the one wired up in Stages 2 and 3).
Set the expiration to 60 days (Meta's recommended option).
Select these 4 permissions in the permission picker:
A 60-day token will stop working after 60 days. When it expires, just come back to this screen and generate a fresh one — same steps, takes a minute.
Click Generate token. One of two things will happen — and which one depends on how your business is set up:
The screen shows a long string starting with E… (usually EAC or EAA). That's your token. Copy it right away — Meta only shows it once.
Save it somewhere safe and paste it into your Claude Code session when it asks for the Meta access token. That's what unlocks Claude Code to manage your ads without going through the UI.
If your business has admin gating turned on, you'll see a yellow banner that reads:
"Someone else needs to approve request to generate an access token."
If this happens, Meta has already sent the request to another admin in your business. Wait for them to approve, then come back to this same screen — the token will appear. Save it and paste it into Claude Code.
Your access token is like a password for your ad account. Don't paste it into public chats, don't commit it to a repo, and don't share it. If it ever leaks, go back to System users and click Revoke tokens — then generate a new one.
Save the token (the long E… string) somewhere safe and paste it into your Claude Code session when it asks. From here on, you can manage your ads — budgets, cost caps, pausing, performance — straight through Claude.