## Meta Ads integration Meta Ads is Meta's advertising platform for running campaigns on Facebook and Instagram. It can be connected to Agen.co two ways, matching the **Official** / **In-house** filter in the connector picker: - **Official** — Agen.co connects through Meta's own hosted Ads MCP server (`https://mcp.facebook.com/ads`), so your AI agents use the same reporting, campaign management, catalog, and signal tools Meta exposes to MCP clients like Claude. Each user signs in with their own Meta account, and there is no Meta developer app to create. - **In-house** — Agen.co wraps the Meta Marketing API directly through its own integration layer, using a Meta for Developers app you create with the Marketing API use case. Pick **Official** if the built-in MCP tools cover what your agents need. Fall back to **In-house** if you need the Marketing API surface beyond them, such as bid settings, value rule sets, and budget schedules. ### Connect via the official MCP server Prerequisites - A Meta account with access to the ad accounts you want agents to use, through a [Meta Business Portfolio](https://business.facebook.com/). - Each user signs in with their own Meta account, and agents can only reach what that account can already access in Meta. Meta supports dynamic client registration for its Ads MCP server, so you do not create a Meta app, copy a Client ID or Client Secret, or register a callback URL. #### Connect Meta Ads in Agen.co 1. In the Agen.co portal, go to **Connectors** → **My connectors** and click **Add connector**. 2. In the **Select connector** drawer, search for `Meta Ads` and select it. The **Add Meta Ads** panel opens. 3. Keep the **Official** tab selected and fill in the field: | Field | Required | Description | | --- | --- | --- | | **Instance Slug** | Yes | Namespaces this instance — it prefixes each imported tool as `slug__tool`, so several instances of the same MCP can coexist. Prefilled with `meta-ads`. Use lowercase kebab-case. You can change it later from the connector's settings. | 4. Click **Connect**. Meta opens in a new tab, and the panel shows **Waiting for authorization — complete it in the opened tab…** 5. Sign in with your Meta account and approve the requested access. 6. Back in Agen.co, the panel switches to **Select the tools to import from Meta Ads.** Every tool is toggled on; turn off any you don't want to import, then click **Add**. The connector is created and its tools imported only when you click **Add**. If you close the panel before that, nothing is saved, even if the Meta tab reported success. #### Scopes Meta requests The Ads MCP server publishes these scopes: | Scope | Used for | | --- | --- | | `ads_read` | Read ad accounts, campaigns, ad sets, ads, and performance insights | | `ads_management` | Create, update, and pause campaigns, ad sets, and ads | | `catalog_management` | Create and manage product catalogs and feeds | | `business_management` | Read and manage Business Portfolio assets | | `pages_show_list` | List the Facebook Pages the user can access | | `pages_manage_ads` | Manage ads on those Pages | | `instagram_basic` | Read basic Instagram account information | | `ads_mcp_management` | Access to Meta's Ads MCP server | #### What it covers | Area | What it covers | | --- | --- | | Reporting | Performance insights and analytics | | Ads | Create and manage campaigns, ad sets, and ads | | Catalogs | Create and manage catalogs and troubleshoot feeds | | Signals and datasets | Signal health and data quality | | A/B tests and lift studies | Create, manage, and read tests and conversion lift studies | | Activity logs | Account activity history | | Help | Search the Meta Business Help Center | The list follows Meta's Ads MCP server documentation (checked 2026-10-06) and can change. Enabling the Meta Ads connector isn't enough on its own. Tool calls remain denied until you create a [policy](/agen-for-work/policies/overview) that grants access to the specific tools you want to expose. ### Connect via the in-house integration Prerequisites - A [Meta for Developers](https://developers.facebook.com/) account. - A [Meta Business Portfolio](https://business.facebook.com/) to associate with the app (you can also create one during app creation). - Access to at least one Meta ad account that the connected user manages. #### Create a Meta app ##### Step 1: Add app details Sign in to the [Meta for Developers apps page](https://developers.facebook.com/apps/) and click **Create App**. On the **App details** step, enter an **App name** (for example, `Frontegg Ads Connector`) and confirm the **App contact email**. Meta uses this email for policy notifications, so set it to an address you check regularly. Click **Next**. App name restrictions Meta does not allow app names that contain reserved brand terms like `FB`, `Face`, `Book`, `Insta`, or `Gram`. Choose a neutral name (for example, `Frontegg Ads Connector`) instead. ![Meta app details step with the app name filled in](/assets/meta-ads-1.77a61e60254408c9f5038431b66164ea26e75ea3d2666321d952239f27930c86.1ce25488.png) ##### Step 2: Select the Marketing API use case On the **Use cases** step, select **Create & manage ads with Marketing API**. This use case grants the `ads_read` and `ads_management` permissions and provisions the OAuth settings the integration needs. Click **Next**. ![Use cases step with Create & manage ads with Marketing API selected](/assets/meta-ads-2.86f280f1bd9cfc5619b8ea858852a6e75b22fe4b217b08e11e7550267bdb6a14.1ce25488.png) ##### Step 3: Connect a business portfolio On the **Business** step, choose the Business Portfolio that will own this app, then click **Next**. You can connect an unverified portfolio now and complete business verification later when you move beyond the limited access tier. ![Business portfolio selection step](/assets/meta-ads-3.14e3a2125c08749ffb5ba7adc85ef99fa45df539cc14190dde6586ae01314397.1ce25488.png) ##### Step 4: Review and create the app Click **Next** through the **Requirements** step, review the **Overview**, then click **Create app**. Meta may ask you to re-enter your Facebook password to confirm. ![Overview step with Create app highlighted](/assets/meta-ads-4.226ea609c7b28f1f885d9682f4f6479eabf7e773a04bc8655a1cff20b7fad18e.1ce25488.png) #### Copy the credentials ##### Step 5: Find the App ID and App secret In the app dashboard, navigate to **App settings → Basic**. The top of the page shows the **App ID** and **App secret**. Copy the **App ID** — this is your Frontegg **Client ID**. Click **Show** next to **App secret**, re-enter your Facebook password when prompted, and copy the value — this is your Frontegg **Client Secret**. ![App settings Basic page with App ID and App secret](/assets/meta-ads-5.bfd6ab12b7766e000a79701425ecd3a9f3e5dfa3b7a6ab6106b7b3cb6453a475.1ce25488.png) #### Configure permissions ##### Step 6: Confirm the Marketing API permissions Navigate to **Use cases → Customize** on the **Create & manage ads with Marketing API** tile, then open the **Permissions and features** tab. The Marketing API use case includes the permissions the integration uses — confirm that both `ads_read` and `ads_management` are listed. The integration uses the following scopes: | Scope | Description | | --- | --- | | `ads_read` | Read ad accounts, campaigns, ad sets, ads, ad creatives, and performance insights. | | `ads_management` | Create, update, pause, and delete campaigns, ad sets, and ads. | Minimum required scopes For read-only reporting, you need `ads_read`. To create or modify campaigns, ad sets, and ads, add `ads_management`. Standard access requires App Review Permissions are initially **Ready for testing** — they work only for users assigned to the app under **App roles → Roles** or **Test users**. To grant access to any Meta user, publish your app and submit it for [App Review](https://developers.facebook.com/docs/app-review/), requesting **Standard access** and the higher **Marketing API access tier**. ![Permissions and features tab with ads_read and ads_management](/assets/meta-ads-6.2be7ed9ecb9e0eca55d979b76a17029d9ab3e01a314be0afd639eeecc76eca71.1ce25488.png) #### Configure the redirect URL ##### Step 7: Add the Frontegg redirect URL In the left menu, open **Facebook Login for Business → Settings**. Under **Client OAuth settings**, make sure **Client OAuth login**, **Web OAuth login**, and **Use Strict Mode for redirect URIs** are set to **Yes**. Scroll to **Valid OAuth Redirect URIs** and add your Frontegg redirect URL: - `https://YOUR_MCP_GATEWAY_URL/integration-callback` Replace `YOUR_MCP_GATEWAY_URL` with the MCP Gateway URL from the Frontegg portal **Settings → Basic configuration** page. Press `Enter` to add the URI as a chip, then click **Save changes**. ![Facebook Login for Business settings with the redirect URI added](/assets/meta-ads-7.2ea89325172344a4e0a57684a1d93aa2b66934deb9feffbb1696bd60d6b5d8a2.1ce25488.png) #### Verify the OAuth flow ##### Step 8: Preview the consent screen Open the Meta OAuth dialog in a new tab to confirm that the redirect URL, App ID, and scopes are wired correctly: ```text https://www.facebook.com/v24.0/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=https://YOUR_MCP_GATEWAY_URL/integration-callback&response_type=code&scope=ads_read,ads_management ``` If everything is configured correctly, Meta shows a consent screen titled "Continue as ..." that names your app — this is the screen the connected user sees when authorizing the integration. If the redirect URL is missing or mistyped, Meta shows a "URL Blocked" error instead. ![Meta OAuth consent screen for the Frontegg Ads Connector app](/assets/meta-ads-8.59990fedce3630c90a19c6bf2995be6d5beb299f42cb6834c2a9947c764c763f.1ce25488.png) #### Configure the Frontegg portal Once you have your **App ID (Client ID)** and **App secret (Client Secret)**, enter them in the Frontegg portal: 1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → Meta Ads. 2. Enter the **Client ID** and **Client Secret** in the corresponding fields. 3. Select the required **scopes**. 4. Click **Save**. When a user authorizes the integration, Meta prompts them to log in and grant the requested permissions to your app. Tokens expire after about 60 days Meta does not issue refresh tokens for this flow. Access tokens are long-lived (about 60 days), after which the connection must be re-authorized. Keep your credentials secure Never share or commit your App secret to version control. ### Additional resources - [Meta Ads MCP server documentation](https://developers.facebook.com/documentation/ads-commerce/ads-ai-connectors/ads-mcp-server/ads-mcp-server-overview) - [Meta Marketing API documentation](https://developers.facebook.com/docs/marketing-api/) - [Marketing API permissions reference](https://developers.facebook.com/docs/permissions/) - [Meta App Review process](https://developers.facebook.com/docs/app-review/) - [Meta for Developers apps page](https://developers.facebook.com/apps/) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)