Skip to main content

Set up the Meta Ads MCP server

The Meta Ads MCP server gives AI agents access to the Meta Marketing API — ad accounts, campaigns, ad sets, ads, creatives, performance insights, and targeting search across Facebook and Instagram. This guide walks through creating a Meta app, configuring Facebook Login for Business, and connecting it to MintMCP.

Prerequisites

Create a Meta app

Meta's create-app wizard walks through five steps: App details, Use cases, Business, Requirements, and Overview.

  1. Go to developers.facebook.com/apps and click Create app.

  2. Under App details, enter an app name (for example, MintMCP Meta Ads) and a contact email, then click Next.

    App details step showing app name and contact email fields
  3. Under Use cases, select Create & manage ads with Marketing API and click Next. This adds the Marketing API and Facebook Login for Business products to the app automatically.

    Use cases step with Create and manage ads with Marketing API selected
  4. Under Business, select a Business portfolio if you have one, then continue through Requirements.

    Associate a Business portfolio

    A portfolio unlocks the System-user access token, which gives the connector continuous access to business assets — ad accounts and Pages — without the ~60-day expiry of user tokens, so a shared MintMCP connector doesn't force every user to re-authorize every two months. Add the app to a portfolio at business.facebook.com before creating the Login configuration; without one, only User access tokens are available and the System-user option stays locked.

  5. On the Overview step, confirm the details and click Create app.

    Overview step summarizing app details, use case, and business before creating the app

Configure Facebook Login for Business

  1. In the left sidebar, go to Facebook Login for BusinessConfigurations, then click Create configuration.

    Facebook Login for Business navigation with Configurations selected
  2. Under Name, give the configuration a name and click Next.

    Create a Configuration wizard on the Name step
  3. Under Login variation, choose General and click Next. The other variations require a Business portfolio.

    Login variation step with General selected and other options locked behind a business portfolio
  4. Under Access token, choose User access token — or System-user access token if you associated the app with a Business portfolio (recommended for continuous access). Click Next.

    Access token step with User access token selected and System-user token locked behind a business portfolio
  5. Click Next through Assets (asset selection needs a Business portfolio).

  6. Under Permissions, select ads_management, ads_read, business_management, and pages_show_list, then finish creating the configuration.

    Permissions step with ads_management, ads_read, business_management, and pages_show_list selected
Access level

In development mode, only users with a role on the app (admins, developers, or testers) can authorize. To let arbitrary employees connect, set the app to Live mode — but ads_management and business_management scopes require Advanced Access, which means passing Meta App Review before going live.

Configure the redirect URI

  1. In the left sidebar, go to Facebook Login for BusinessSettings.

    Facebook Login for Business navigation with Settings selected
  2. Under Valid OAuth Redirect URIs, add:

    https://app.mintmcp.com/oauth/callback
    Valid OAuth Redirect URIs field with the MintMCP callback URL added

    The exact callback URL also appears in the connector's OAuth settings inside MintMCP after you install it — confirm they match.

  3. Click Save Changes.

Copy the App ID and App Secret

  1. In the left sidebar, go to App settingsBasic.

    App settings navigation with Basic selected
  2. Copy the App ID. This is your Client ID in MintMCP.

  3. Click Show next to App secret, confirm your password if prompted, and copy the secret. This is your Client Secret in MintMCP.

    Basic settings page showing the App ID and masked App secret

Add Meta Ads to MintMCP

  1. In MintMCP, go to MCP storeManage store.

  2. Find the Meta Ads connector and click to install it.

  3. Open the connector's OAuth settings and enter:

    SettingValue
    Authorization URLhttps://www.facebook.com/v23.0/dialog/oauth
    Token URLhttps://graph.facebook.com/v23.0/oauth/access_token
    Scopeads_read,ads_management,business_management,pages_show_list
    Client IDApp ID from App settings → Basic
    Client SecretApp Secret from App settings → Basic
  4. Confirm the Redirect URL shown in the connector's OAuth settings matches the URI you added under Valid OAuth Redirect URIs (https://app.mintmcp.com/oauth/callback). They must be identical, or sign-in fails.

  5. Click Save.

The first time a user calls a tool, MintMCP directs them to sign in with Facebook and consent to the requested scopes, then stores their token for subsequent calls.

Token lifetime

Meta does not issue refresh tokens. With a user access token, the connector exchanges the initial OAuth grant for a long-lived user token (~60 days) via Meta's fb_exchange_token flow, and users must re-authorize by reconnecting once it expires. A system-user access token — available when the app belongs to a Business portfolio — does not expire, so it avoids the recurring re-authorization for a shared connector.

Security considerations

  • Each user authorizes with their own Meta account, so tool calls run against that user's ad account permissions and are tied to their identity.
  • The App Secret is an org-wide credential — anyone with it can initiate OAuth flows as your app. Keep it out of version control and restrict who can view it in MintMCP.
  • All write tools (create campaign, create ad set, create ad) default new objects to PAUSED status. The AI cannot start ad spend without an explicit activation step from the user.
  • The ads_management and business_management scopes grant full read-write access to ad accounts and Business Manager data. Grant this connector only to users who need that level of access.
  • In development mode, only users with a role on the Meta app can authorize. Granting access to all employees requires the app to be in Live mode with Advanced Access approved by Meta.

Next steps