Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

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

README.md

Facebook/Meta Ads MCP Server

![Trust Score](https://archestra.ai/mcp-catalog/gomarble-ai__facebook-ads-mcp-server) ![smithery badge](https://smithery.ai/server/@gomarble-ai/facebook-ads-mcp-server)

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

<video controls width="1920" height="512" src="https://github.com/user-attachments/assets/c4a76dcf-cf5d-4a1d-b976-08165e880fe4">Your browser does not support the video tag.</video>

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]](https://docs.python.org/3/tutorial/venv.html).

  1. Install Dependencies:
    pip install -r requirements.txt
  1. 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 Name | Description | | ------------------------------- | -------------------------------------------------------- | | Account & Object Read | | | 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. | | Fetching Collections | | | 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. | | get_ads_by_adset | Retrieves ads within an ad set. | | get_ad_creatives_by_ad_id | Retrieves creatives associated with an ad. | | Insights & Performance Data | | | get_adaccount_insights | Retrieves performance insights for an ad account. | | get_campaign_insights | Retrieves performance insights for a campaign. | | get_adset_insights | Retrieves performance insights for an ad set. | | get_ad_insights | Retrieves performance insights for an ad. | | fetch_pagination_url | Fetches data from a pagination URL (e.g., from insights).| | Activity/Change History | | | get_activities_by_adaccount | Retrieves change history for an ad account. | | get_activities_by_adset | Retrieves 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

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Other servers.