> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Meta Ads in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/meta-ads
Last updated: 2026-11-24

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 will 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](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Meta Ads for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/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.

1. **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**.

2. **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.

3. **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

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **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.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Meta Ads.

4. **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:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search "meta ads"
```

## Employee: connect Meta Ads

### In the portal

1. **Open Meta Ads in the catalog**

   Sign in to your portal and open Meta Ads. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Meta Ads sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search "meta ads"
metorial setup <catalog-item-id>
```

`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.

```bash
metorial list "meta ads"
metorial client list
metorial install <client-identifier> <integration-id>
```

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](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list "meta ads"
metorial tools <integration-id>
metorial call <integration-id> list_ads -d '{}'
```

`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. Needs `adId`.
- `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. Needs `adReachedCountries`.
- `get_custom_audience`: Retrieve detailed information about a specific custom audience. Needs `audienceId`.
- `get_leads`: Retrieve submitted lead data from a lead generation form. Needs `formId`.
- `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. Needs `campaignId`.
- `list_ads`: Retrieve ads from the ad account or a specific ad set.
- `list_lead_forms`: Retrieve lead generation forms from a Facebook Page. Needs `pageId`.
- `get_ad_set`: Retrieve detailed information about a specific ad set including its targeting configuration. Needs `adSetId`.
- `get_ad_creative`: Retrieve detailed information about a specific ad creative. Needs `creativeId`.
- `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. Needs `catalogId`.

### Write tools (10)

- `update_campaign`: Update an existing campaign's settings including name, status, budget, and bid strategy. Needs `campaignId`.
- `create_ad_creative`: Create a new ad creative. Needs `name` and `objectStorySpec`.
- `create_custom_audience`: Create a new custom audience. Needs `name`.
- `update_ad`: Update an existing ad's name, status, or creative. Needs `adId`.
- `add_users_to_audience`: Add users to an existing custom audience using hashed identifiers. Needs `audienceId`, `schema` and `userData`.
- `create_ad_set`: Create a new ad set within a campaign. Needs `name`, `campaignId`, `targeting` and `optimizationGoal`.
- `update_ad_set`: Update an existing ad set's settings including targeting, budget, schedule, and status. Needs `adSetId`.
- `create_ad`: Create a new ad within an ad set. Needs `name`, `adSetId` and `creativeId`.
- `create_campaign`: Create a new advertising campaign. Needs `name` and `objective`.
- `send_conversion_events`: Send server-side conversion events via the Conversions API. Needs `datasetId` and `events`.

### Destructive tools (5)

- `delete_ad`: Delete an ad. Needs `adId`.
- `delete_custom_audience`: Delete a custom audience. Needs `audienceId`.
- `delete_ad_set`: Delete an ad set. Needs `adSetId`.
- `delete_campaign`: Delete a campaign. Needs `campaignId`.
- `remove_users_from_audience`: Remove users from an existing custom audience using the same SHA-256 hashed identifier schema used for uploads. Needs `audienceId`, `schema` and `userData`.

## 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](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Meta Ads there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Meta Ads on metorial.com](https://metorial.com/integrations/meta-ads): the integration overview