Facebook Ads MCP Server

MCP server acting as an interface to the Facebook Ads, enabling programmatic access to Facebook Ads data and management features.

Local serverstdioPython

What is the Facebook Ads MCP server?

MCP server acting as an interface to the Facebook Ads, enabling programmatic access to Facebook Ads data and management features. Exposed over MCP by the facebook ads mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

  • Installs and configures the MCP server locally
  • Automatically handles environment setup
  • Prompts for Meta token authentication during the process which is optional
  • If Meta access token is not provided then connect to GoMarble's server to create the token on your behalf

Its toolset

Everything the assistant can do here goes through one of these:

  • list_ad_accounts — Lists ad accounts linked to the token
  • get_details_of_ad_account — Retrieves details for a specific ad account
  • get_campaign_by_id — Retrieves details for a specific campaign
  • get_adset_by_id — Retrieves details for a specific ad set
  • get_ad_by_id — Retrieves details for a specific ad
  • get_ad_creative_by_id — Retrieves details for a specific ad creative
  • get_adsets_by_ids — Retrieves details for multiple ad sets by their IDs
  • get_campaigns_by_adaccount — Retrieves campaigns within an ad account
  • get_adsets_by_adaccount — Retrieves ad sets within an ad account
  • get_ads_by_adaccount — Retrieves ads within an ad account
  • get_adsets_by_campaign — Retrieves ad sets within a campaign
  • get_ads_by_campaign — Retrieves ads within a campaign

Configuration

You will need one environment variable: YOUR_META_ACCESS_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.10+ * Dependencies listed in requirements.txt 1. (Optional but Recommended) Create and Activate a Virtual Environment: Using a virtual environment helps manage project dependencies cleanly[Source]. 2. Install Dependencies: 3. Obtain Meta Access Token: Secure a Meta User Access Token with the necessary permissions (e.g.

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Facebook Ads's toolset — list_ad_accounts, get_details_of_ad_account, get_campaign_by_id and 11 more — is a fair guide to whether it matches your workflow.

This entry was verified against Facebook Ads's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Facebook Ads.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the facebook ads mcp server does with a few real requests.

Available tools

ToolWhat it does
list_ad_accountsLists ad accounts linked to the token.
get_details_of_ad_accountRetrieves details for a specific ad account.
get_campaign_by_idRetrieves details for a specific campaign.
get_adset_by_idRetrieves details for a specific ad set.
get_ad_by_idRetrieves details for a specific ad.
get_ad_creative_by_idRetrieves details for a specific ad creative.
get_adsets_by_idsRetrieves details for multiple ad sets by their IDs.
get_campaigns_by_adaccountRetrieves campaigns within an ad account.
get_adsets_by_adaccountRetrieves ad sets within an ad account.
get_ads_by_adaccountRetrieves ads within an ad account.
get_adsets_by_campaignRetrieves ad sets within a campaign.
get_ads_by_campaignRetrieves ads within a campaign.
get_ads_by_adsetRetrieves ads within an ad set.
get_ad_creatives_by_ad_idRetrieves creatives associated with an ad.

How to install the Facebook Ads MCP server

{
  "mcpServers": {
    "facebook-ads": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"],
      "env": {
        "YOUR_META_ACCESS_TOKEN": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.10+ * Dependencies listed in requirements.txt 1. (Optional but Recommended) Create and Activate a Virtual Environment: Using a virtual environment helps manage project dependencies cleanly[Source]. 2. Install Dependencies: 3. Obtain Meta Access Token: Secure a Meta User Access Token with the necessary permissions (e.g.
VariableDescriptionRequired
YOUR_META_ACCESS_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Facebook Ads to list ad accounts.
  • Use Facebook Ads to get details of ad account.
  • Use Facebook Ads to get campaign by id.

Frequently asked questions

It connects Facebook Ads to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (list_ad_accounts, get_details_of_ad_account, get_campaign_by_id, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Facebook Ads directly.