Facebook Ads MCP Server

Facebook Ads MCP Server

By gomarble-ai GitHub

The Facebook Ads MCP Server offers robust Facebook Ads integration, featuring account listing, detailed retrieval of campaigns, ad sets, ads, and creatives, along with performance insights and change history logs.

facebook-ads mcp-server
Overview

What is Facebook Ads MCP Server?

The Facebook Ads MCP Server is a powerful integration tool that allows users to connect their AI assistants directly to Facebook Ads data, enabling natural language queries for deeper insights into ad performance.

How to use Facebook Ads MCP Server?

To use the server, set up a Python environment, install the required packages, and run the server with your Facebook Access Token. Connect your AI client to the MCP configuration to start querying your ads data.

Key features of Facebook Ads MCP Server?

  • AI-powered analysis of Facebook Ads data using natural language.
  • Access to detailed information on campaigns, ad sets, ads, creatives, and performance insights.
  • Ability to track changes and view history logs of ad performance.
  • Easy setup with standard Python requirements.

Use cases of Facebook Ads MCP Server?

  1. Analyzing campaign performance metrics like ROAS and CTR.
  2. Fetching detailed insights based on custom date ranges and demographic breakdowns.
  3. Auditing changes made to ad sets and campaigns over time.

FAQ from Facebook Ads MCP Server?

  • Can I use this server with any AI assistant?

Yes! The server is designed to work with various AI assistants like Cursor and Claude.

  • What are the prerequisites for using the server?

You need Python 3.10+ and a Facebook Access Token with ads_read permission.

  • Is there a limit to the queries I can make?

The server can handle a large number of queries, but performance may vary based on the complexity of the requests.

Content

Unlock Deeper Facebook Ads Insights: Powered by AI & MCP

Stop Clicking, Start Asking. Connect your AI assistant (Cursor, Claude, etc.) directly to your Facebook Ads data with this powerful MCP Server.

Instantly get answers like:

  • "Show me my top 5 campaigns by ROAS last month?"
  • "Compare CTR for ad sets A vs. B over the last 7 days."
  • "What was the total spend breakdown by age and gender for campaign 'Summer Sale'?"
  • "Who paused ad set 'Ad Set - Leads Q3' yesterday?"

Why You Need This:

  • AI-Powered Analysis: Query your ads data using natural language via your AI assistant.
  • Deep Data Access: Go beyond basics – campaigns, ad sets, ads, creatives, insights, history.
  • Granular Insights: Fetch performance with custom dates, breakdowns (age, platform, etc.), filters & attribution.
  • Track Changes: See who changed what and when (get_activities_...).
  • Easy Setup: Standard Python, quick to deploy.

Quick Start Guide:

  1. Prerequisites: Python 3.10+, Facebook Access Token (ads_read permission).
  2. Setup:
    • (Optional) Create Python virtual environment (python3 -m venv venv && source venv/bin/activate)
    • Install: pip install -r requirements.txt
  3. Prepare Server:
    python server.py --fb-token YOUR_FACEBOOK_ACCESS_TOKEN
    
  4. Connect AI Client: Add to MCP config (adjust paths):
    {
      "mcpServers": {
        "fb-ads-mcp-server": {
          "command": "/path/to/venv/bin/python", // Or just "python"
          "args": [ "/path/to/server.py", "--fb-token", "YOUR_TOKEN" ]
        }
      }
    }
    
  5. Restart your AI client.

Example Interactions:

This server gives your AI tools to talk to the Facebook Ads API. Ask questions like:

  • Get Objects:
    • "Get details for campaign 1234567890 using fields: name, objective, effective_status."
    • "Fetch ad creative 2384xxxxxxxxx and show its image_url and body."
  • List Objects:
    • "List all ads in ad set 6123xxxxxxxxx with effective_status ACTIVE."
    • "Show me all campaigns in account act_987654321."
  • Analyze Performance:
    • "What was the spend, impressions, and clicks for account act_987654321 last_30d?"
    • "Get insights for ad 6789xxxxxxxxx broken down by publisher_platform for the last 7 days."
    • "Fetch campaign insights for 1234567890 with time_increment monthly for the last year."
  • Audit History:
    • "Show me the activity log for ad set 4455667788 using time_range since 2024-01-15 until 2024-01-16."
    • "What changes happened in account act_987654321 today?"
  • (Behind the Scenes) Paginate: If results are large, the AI can use fetch_pagination_url to get the next page automatically or upon request.

(See readme.md or server.py docstrings for the full list of tools and their detailed parameters!)


No tools information available.

Mirror of

image-generation mcp-server
View Details

Secure MCP server for analyzing Excel files with oletools

oletools mcp-server
View Details

Mirror of

bigquery mcp-server
View Details

MCPHubs is a website that showcases projects related to Anthropic's Model Context Protocol (MCP)

mcp mcp-server
View Details
Dealx
Dealx by DealExpress

-

dealx mcp-server
View Details

Google Analytics MCP server for accessing analytics data through tools and resources

google-analytics mcp-server
View Details

A Python-based MCP server that lets Claude run boto3 code to query and manage AWS resources. Execute powerful AWS operations directly through Claude with proper sandboxing and containerization. No need for complex setups - just pass your AWS credentials and start interacting with all AWS services.

aws mcp-server
View Details