Set up Meta Ads in Metorial for Claude, ChatGPT and Cursor
Share Meta Ads with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or system user token sign-in, 34 tools (19 read-only).
To give your team Meta Ads in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Meta Ads integration in a Metorial portal, and each person signs in to Meta Ads with their own account. Agents can create, manage, and optimize ad campaigns across Facebook, Instagram, Messenger, and WhatsApp. The integration has 34 tools, 19 read-only, 10 write and 5 destructive, plus 2 triggers.
What you'll learn
- How an admin shares Meta Ads in a portal and how each person connects
- The 6 OAuth scopes Meta Ads can request, and what each one allows
- How to keep the 19 read-only tools and reject the other 15
Before you start
- A portal with at least one access group
- An account with Meta Ads for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| OAuth (default) | OAuth | Signs in to Meta Ads |
| System User Token | API token | apiToken |
The portal and metorial setup use OAuth unless someone picks another method.
OAuth
People sign in to Meta Ads and approve the scopes you allow. The integration can request:
| Scope | Name | What it allows |
|---|---|---|
ads_management | Ads Management | Create, edit, and delete campaigns, ad sets, and ads |
ads_read | Ads Read | Read performance data, campaign details, and insights |
business_management | Business Management | Manage business assets like ad accounts, pixels, and catalogs |
pages_read_engagement | Pages Read Engagement | Read content posted on Pages and engagement data |
leads_retrieval | Leads Retrieval | Retrieve lead data submitted through lead ads |
pages_manage_metadata | Pages Manage Metadata | Subscribe apps to receive webhooks for Page events |
System User Token
To connect, a person enters:
apiToken: System User access token generated from Business Manager. These tokens do not expire.
Setup settings
Whichever method you pick, setup also asks for:
adAccountId: Meta Ad Account ID (e.g., act_123456789). This is used as the default ad account for all operations.businessId(optional): Optional Meta Business ID used by product catalog tools. You can also pass businessId directly to those tools.apiVersion(optional): Graph API version to use (e.g., v25.0)
Use your own Meta Ads OAuth app
With your own OAuth app, people see your company's name on the Meta Ads consent screen, and the client ID and secret belong to you.
Start the credentials in Metorial
In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Meta Ads and copy the Redirect URI.
Register the app with Meta Ads
Create an OAuth app or client in Meta Ads and add the redirect URI from Metorial as its redirect or callback URL.
Finish in Metorial
Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Meta Ads integration.
Admin: share Meta Ads in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Meta Ads. Under Auth Method, keep OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Meta Ads as themselves.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Meta Ads.
Choose who gets it
Add the access groups that should see Meta Ads. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Meta Ads integration. Once it exists, check which groups have it:
Employee: connect Meta Ads
In the portal
Open Meta Ads in the catalog
Sign in to your portal and open Meta Ads. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Meta Ads sign-in tab opens. Sign in and approve the permissions listed.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses OAuth. To connect with System User Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Meta Ads connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 19 read-only tools, such as get_ad and list_ads, and lose the 10 write tools, such as create_ad or update_ad, and the 5 destructive tools, such as delete_ad or delete_ad_set.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 34 tools, minus any you rejected. list_ads takes no input. It retrieves ads from the ad account or a specific ad set.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (19)
get_ad: Retrieve detailed information about a specific ad by its ID. NeedsadId.list_campaigns: Retrieve campaigns from the configured ad account.search_ad_library: Search Meta's public Ad Library for ads running across Facebook, Instagram, Messenger, and WhatsApp. NeedsadReachedCountries.get_custom_audience: Retrieve detailed information about a specific custom audience. NeedsaudienceId.get_leads: Retrieve submitted lead data from a lead generation form. NeedsformId.list_custom_audiences: Retrieve custom audiences from the ad account.list_ad_sets: Retrieve ad sets from the ad account or a specific campaign.get_insights: Query performance metrics (impressions, clicks, spend, conversions, ROAS, etc.) at account, campaign, ad set, or ad level.get_campaign: Retrieve detailed information about a specific campaign by its ID. NeedscampaignId.list_ads: Retrieve ads from the ad account or a specific ad set.list_lead_forms: Retrieve lead generation forms from a Facebook Page. NeedspageId.get_ad_set: Retrieve detailed information about a specific ad set including its targeting configuration. NeedsadSetId.get_ad_creative: Retrieve detailed information about a specific ad creative. NeedscreativeId.list_ad_creatives: Retrieve ad creatives from the ad account.list_pages: List Facebook Pages available to the authenticated user.list_product_catalogs: List product catalogs owned by a Meta Business.list_ad_accounts: List ad accounts visible to the authenticated user.list_businesses: List Meta Business accounts available to the authenticated user.list_catalog_products: List products in a Meta product catalog, with optional catalog API filter support. NeedscatalogId.
Write tools (10)
update_campaign: Update an existing campaign's settings including name, status, budget, and bid strategy. NeedscampaignId.create_ad_creative: Create a new ad creative. NeedsnameandobjectStorySpec.create_custom_audience: Create a new custom audience. Needsname.update_ad: Update an existing ad's name, status, or creative. NeedsadId.add_users_to_audience: Add users to an existing custom audience using hashed identifiers. NeedsaudienceId,schemaanduserData.create_ad_set: Create a new ad set within a campaign. Needsname,campaignId,targetingandoptimizationGoal.update_ad_set: Update an existing ad set's settings including targeting, budget, schedule, and status. NeedsadSetId.create_ad: Create a new ad within an ad set. Needsname,adSetIdandcreativeId.create_campaign: Create a new advertising campaign. Needsnameandobjective.send_conversion_events: Send server-side conversion events via the Conversions API. NeedsdatasetIdandevents.
Destructive tools (5)
delete_ad: Delete an ad. NeedsadId.delete_custom_audience: Delete a custom audience. NeedsaudienceId.delete_ad_set: Delete an ad set. NeedsadSetId.delete_campaign: Delete a campaign. NeedscampaignId.remove_users_from_audience: Remove users from an existing custom audience using the same SHA-256 hashed identifier schema used for uploads. NeedsaudienceId,schemaanduserData.
Triggers
Meta Ads has 2 triggers, which fire on events in Meta Ads:
ad_account_changes: Receives webhook notifications when campaigns, ad sets, or ads change status (e.g., approved, rejected, delivery issues).lead_submitted: Receives webhook notifications when a new lead is submitted through a lead ad form.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Meta Ads there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Meta Ads on metorial.com: the integration overview