mcpField
F
Facebook Ads MCP Server

Facebook Ads MCP Server

Local
github.com/gomarble-aiBusiness & Marketing366Updated 12w ago

About Facebook Ads MCP Server

Facebook Ads MCP Server is an MCP server that reads Meta Ads accounts, campaigns, ad sets, ads and performance data. It suits users who want AI assistants to query and analyze Meta advertising data.

Key features

  1. 01Lookup of ad accounts, campaigns, ad sets and ads
  2. 02Ad creative details retrieval
  3. 03Performance insights for accounts, campaigns, ad sets and ads
  4. 04Change history for ad accounts and ad sets
  5. 05Pagination URL fetching for additional data

Use cases

  1. 01Having an AI assistant review campaign structure in a Meta ad account
  2. 02Analyzing performance of campaigns or ad sets
  3. 03Tracking setting changes recorded in an ad account

MCP support

The project is an MCP server that exposes account, object, insights and change history tools to MCP clients, using a Meta access token.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Facebook/Meta Ads MCP Server

Trust Score smithery badge

This project provides an MCP server acting as an interface to the Meta Ads, enabling programmatic access to Meta Ads data and management features.

Your browser does not support the video tag.

Easy One-Click Setup

For a simpler setup experience, we offer ready-to-use installers:

👉 Download installer - https://gomarble.ai/mcp

Join our community for help and updates

👉 Slack Community - AI in Ads

Try Google ads mcp server also

👉 Google Ads MCP - Google Ads MCP

What It 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
Important Disclaimer

This setup does not require you to manually obtain a Meta Developer Access Token.

Instead, it connects securely to GoMarble's server to create the token on your behalf. GoMarble does not store your token — it is saved locally on your machine for use with the MCP server.


Setup

Prerequisites
  • Python 3.10+
  • Dependencies listed in requirements.txt
  1. (Optional but Recommended) Create and Activate a Virtual Environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    

    Using a virtual environment helps manage project dependencies cleanly[Source].

  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Obtain Meta Access Token: Secure a Meta User Access Token with the necessary permissions (e.g., ads_read). You can generate this through the Meta Developer portal. Follow this link.

Usage with MCP Clients (e.g., Cursor, Claude Desktop)

To integrate this server with an MCP-compatible client, add a configuration(Claude) similar to the following. Replace YOUR_META_ACCESS_TOKEN with your actual token and adjust the path to server.py if necessary.

{
  "mcpServers": {
    "fb-ads-mcp-server": {
      "command": "python",
      "args": [
        "/path/to/your/fb-ads-mcp-server/server.py",
        "--fb-token",
        "YOUR_META_ACCESS_TOKEN"
      ]
      // If using a virtual environment, you might need to specify the python executable within the venv:
      // "command": "/path/to/your/fb-ads-mcp-server/venv/bin/python",
      // "args": [
      //   "/path/to/your/fb-ads-mcp-server/server.py",
      //   "--fb-token",
      //   "YOUR_META_ACCESS_TOKEN"
      // ]
    }
  }
}

Restart the MCP Client app after making the update in the configuration.

(Note: On Windows, you might need to adjust the command structure or use cmd /k depending on your setup.)

Debugging the Server

Execute server.py, providing the access token via the --fb-token argument.

python server.py --fb-token YOUR_META_ACCESS_TOKEN
Available MCP Tools

This MCP server provides tools for interacting with META Ads objects and data:

Tool NameDescription
Account & Object Read
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.
Fetching Collections
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.
Insights & Performance Data
get_adaccount_insightsRetrieves performance insights for an ad account.
get_campaign_insightsRetrieves performance insights for a campaign.
get_adset_insightsRetrieves performance insights for an ad set.
get_ad_insightsRetrieves performance insights for an ad.
fetch_pagination_urlFetches data from a pagination URL (e.g., from insights).
Activity/Change History
get_activities_by_adaccountRetrieves change history for an ad account.
get_activities_by_adsetRetrieves change history for an ad set.

(Note: Most tools support additional parameters like fields, filtering, limit, pagination, date ranges, etc. Refer to the detailed docstrings within server.py for the full list and description of arguments for each tool.)

(Note: If your Meta access token expires, you'll need to generate a new one and update the configuration file of the MCP Client with new token to continue using the tools.)

Dependencies
License

This project is licensed under the MIT License.


Installing via Smithery

To install Facebook Ads Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @gomarble-ai/facebook-ads-mcp-server --client claude

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.