An AI agent reaches Meta Ads today through a system user access token you generate yourself in Meta Business Settings, not a one-click sign-in, because Meta's own ads MCP server only registers allowlisted client apps. Scope the token to ads_read and ads_management on a single ad account, set it to never expire only if you are prepared to revoke it the moment the tool changes, and check what the AI tool actually does with the token (store it, forward it, or both) before pasting it anywhere.
Meta still does not have a one-click "sign in with Facebook" button that lets a third-party AI agent reach your Meta Ads account the way Google Ads or LinkedIn Ads do. Meta runs its own official ads MCP server at mcp.facebook.com/ads with OAuth support, but that server's dynamic client registration is allowlisted, so most AI tools and connectors cannot register themselves. What actually works today, for okaytorun and for most of the AI tools built around Meta Ads, is a Meta system user access token you generate yourself and paste in.
That difference matters more than it sounds, because a token you generate and paste is a credential you are personally responsible for scoping, storing correctly, and revoking, where a sign-in flow would have handled most of that for you. This post covers how to generate one correctly, what to check before you hand it to any AI tool, and how okaytorun specifically handles the token once you give it one.
Why a token instead of a sign-in button
A system user is an account you create inside Meta Business Settings that exists only to run API access, not a real person's Facebook login. You assign it to specific assets, an ad account, a Page, and specific permissions, then generate an access token from it. Unlike a personal access token tied to your own login, a system user token can be set to never expire, which is the only reason it works for an AI agent that needs to run without you reauthorizing it every hour.
Meta's Marketing API authentication documentation and the newer ads MCP server docs both point to this as the supported path for programmatic and agent access, separate from the OAuth flow a real person would click through in a browser.
Generate a token scoped to one agent, one account
The actual steps, as of this writing:
- Open Meta Business Settings → Users → System users, and add a new system user with the Employee role (not Admin, unless the agent genuinely needs it).
- Under Assign assets, give that system user access to the one ad account you want the agent to touch, with the Manage campaigns role rather than a broader one.
- Click Generate token, pick (or create) a Business app, tick exactly
ads_readandads_management, and generate it. You can set the expiry to Never, but that choice only makes sense if you are also prepared to come back and revoke it later. - Copy the token once. Meta does not show it again, so paste it directly into the tool you are connecting rather than saving it in a text file "for later."
The permissions matter more than the expiry setting. ads_read alone is enough for an agent that only reports on performance; ads_management is only needed once the agent is actually staging or applying changes, and some AI tools ask for it by default even when they do not need it yet.
What to check before you paste the token anywhere
Before handing a Meta Ads token to any AI tool, three questions are worth answering:
- Does it store the token, or only forward it? A tool that stores your token has a database row that is now part of your attack surface if that database is ever breached. A tool that forwards it per request through a broker it does not control (or does not forward it at all, using someone else's managed OAuth app) never has it to lose.
- Does every write still need your approval?
ads_managementlets a tool pause a campaign, change a budget, or edit an ad set's targeting. Whether that actually happens automatically or only after you review a staged change is a decision the tool's design makes, not something the token's permissions enforce for you. - Is the system user scoped to one ad account, or the whole business? If you manage multiple ad accounts, assign the system user to only the one you are actually testing or connecting, and repeat the step for each account you add later rather than widening the first token's scope.
How okaytorun handles the token specifically
okaytorun connects to Meta Ads by taking the pasted system user token and storing it as a connected account on Composio's side, using Composio's API key auth config for its Meta Ads toolkit. okaytorun's own servers never hold the token; every Graph API request is proxied through that connection. When you first paste a token, verifyMetaToken makes a real call to confirm it actually reaches an ad account before the connection is kept, and deletes the connection if the token does not work, rather than silently storing something unusable.
From there, Meta Ads behaves like every other platform okaytorun connects to: the agent reads campaign and ad set data, proposes a change with the before and after values shown, and nothing applies to the account until you click Approve. A prompt like this runs entirely on reads, no token permission beyond ads_read required to answer it:
Review my Meta Ads account. Which ad sets are spending the most per
purchase, and which ones look capped by budget while still converting?
The Meta Ads AI agent post covers what that kind of agent should actually do with the account once connected, beyond just answering questions. For the setup steps specific to Claude, the Meta Ads MCP setup guide and the Meta Ads MCP server page walk through connecting it as a tool rather than through the okaytorun app directly.
Rotating or revoking the token later
Because the token lives on a system user you created, revoking access does not require changing your own Facebook password or disconnecting your personal account from anything. Go back to Business Settings → System users, remove the asset assignment or delete the system user outright, and every tool holding that token loses access immediately, including any copy of it that leaked somewhere you don't know about. That's the actual safety net a never-expiring token depends on: not that it's hard to misuse, but that it's fast to kill the moment you need to.
If you're connecting more than one AI tool to the same Meta Ads account, create a separate system user and token per tool rather than reusing one. It costs an extra two minutes in Business Settings, and it means revoking access from one tool never requires guessing which other connections shared the same credential.
Frequently asked questions
Can an AI agent sign in to Meta Ads with a Facebook login, like it can with Google?
Not generally. Meta's official ads MCP server (mcp.facebook.com/ads) supports OAuth through Facebook Login for Business, but dynamic client registration there is allowlisted, so most third-party AI tools and connectors cannot register a client the way they can with Google or LinkedIn. A pasted system user access token is the practical workaround most AI tools use instead.
What is a Meta system user access token?
It is a token tied to a system user, an account you create in Meta Business Settings specifically to run API access rather than a real person's login. You assign it specific assets (an ad account, a Page) and specific permissions (ads_read, ads_management), then generate a token for it that can be set to never expire, which is what makes it usable by an unattended AI agent.
Is it safe to set a Meta Ads access token to never expire?
It is safe only if you treat it like a password you can revoke in one click, scoped to the narrowest assets and permissions the tool actually needs, and you actually go back and revoke it when you stop using that tool or swap it for another. A token with ads_management that never expires and is scoped to every ad account on the business is the version that causes damage if it leaks.
What should I check before pasting a Meta Ads token into an AI tool?
Check whether the tool stores the token at all, or only forwards it per request through a broker it does not control; whether it asks for ads_management when ads_read would do; and whether every write it can make still requires your approval before anything changes in the account, rather than applying automatically.