Perfect for marketers, founders, and analysts who want to connect Facebook Ads to Claude Desktop, no coding required. Just run it locally and start chatting with your own ad data.
💡 This guide is written by Smacient, based on the open-source Facebook Ads MCP Server created by GoMarble. All credit for the tool goes to the original developers, we’re just making it easy for everyone to use.
What is an MCP Server?
MCP (Model Context Protocol) servers act as a bridge between Claude and your data tools, like Facebook Ads. When installed locally, Claude can use these servers to securely talk to your ad accounts, pull reports, and analyze performance — all without writing code or uploading data anywhere else.
The Facebook Ads MCP Server used in this guide was built by GoMarble and shared freely under an open-source license. This guide simplifies the setup so anyone, even non-coders, can use it confidently with Claude Desktop.
What You’ll Achieve
- Chat with Claude to analyze your Facebook Ads data
- Ask things like:
- “How much did I spend on campaigns last week?”
- “Show me the best-performing ad sets this month”
- Everything runs on your machine, no cloud hosting needed
- No need to write Python or touch any API docs
Tools You’ll Need
Tool | Why You Need It |
Claude Desktop | To run clause with tools |
Python (3.10+) | To run the MCP server |
Facebook Developer Access | To generate your app token |
Git (optional) | For manual install if needed |
🚀 Need Help With the Setup?
If the setup feels too technical, our team is here to help.
Don’t worry, we’ve got your back!
👉 Click here to get expert assistance now!
Prerequisites
Before starting, make sure:
1. You have Python installed
Download it from python.org. During install:
- Check “Add Python to PATH”
- Then click Install Now
To confirm it’s installed:
Open your command line:
- Windows: Press Win + R, type cmd, and press Enter
- macOS: Press Cmd + Space, type Terminal, and hit Enter
- Linux: Press Ctrl + Alt + T, or open Terminal from your applications menu
Then run this text below:
python –version |
If installed correctly, you should see it return something like: Python 3.10.13
( Note: the number next to python might differ based on the version you have downloaded )
2. You’ve installed Claude Desktop
Claude Desktop is required to use MCP servers.
Download the desktop app from Anthropic’s official Claude site. ( https://claude.ai/download )
Once installed, we’ll configure it later to recognize the Facebook Ads tool.
This repository offers two ways to install and set up this server:
Method 1: One-Click Setup (Recommended for Beginners)
The repo provides ready-to-run .exe and .app files.
For Windows
- Download this .exe file:
- Run the .exe file
- It will launch a local MCP server for Facebook Ads.
- Done!
- You can now register the server with Claude (instructions below 👇)
For macOS
- Download the .app file from the here.
- Double-click to open
- Done!
Method 2: Manual Setup for Developers
If you prefer the manual route or want to tweak the server, follow this:
Step 1: Install Git (if you don’t have it)
Windows: Download from git-scm.c
macOS: Run git in terminal — it will prompt install
Linux: Use sudo apt install git
Step 2: Clone the Repository
Option A: Clone with Git (Recommended)
git clone https://github.com/gomarble-ai/facebook-ads-mcp-server.git cd facebook-ads-mcp-server |
Option B: Download ZIP
- Visit: https://github.com/gomarble-ai/facebook-ads-mcp-server
- Click Code → Download ZIP
- Extract to a folder (e.g., Documents/facebook-ads-mcp)
Step 3: Set Up Virtual Environment (Inside your command prompt)
1. Open Command Prompt (CMD)
2. Navigate to the project folder:
cd C:\Users\YourName\Documents\facebook-ads-mcp |
3. Set up the virtual environment using this command:
python -m venv .venv |
Activate it:
- Windows:
.venv\Scripts\activate |
- macOS/Linux:
source .venv/bin/activate |
Step 4: Install Dependencies
pip install -r requirements.txt |
Step 5: Set Up Your .env File
Create a file named .env in the root folder
Right-click in the folder → choose New → Text Document → name it exactly .env (delete the .txt extension if it appears).
Add the following:
ACCESS_TOKEN=your_facebook_access_token AD_ACCOUNT_ID=act_1234567890 |
🔐 You can get your Facebook Access Token from your Meta Developer account by creating an app at: https://developers.facebook.com/apps/
Step 6: Run the MCP Server
uv run mcp install server.py |
Final Step: Add to Claude
- Open Claude → Go to Settings → Developer → Edit Config
In the claude.json file, add this under “mcpServers”:
“Facebook Ads”: { “command”: “uv”, “args”: [ “run”, “–with”, “mcp[cli]”, “mcp”, “run”, “C:\\Path\\To\\facebook-ads-mcp-server\\server.py” ], “env”: { “VIRTUAL_ENV”: “C:\\Path\\To\\facebook-ads-mcp-server\\.venv”, “PATH”: “C:\\Path\\To\\facebook-ads-mcp-server\\.venv\\Scripts;${PATH}”, “ACCESS_TOKEN”: “your_facebook_access_token”, “AD_ACCOUNT_ID”: “act_1234567890” } } |
Replace paths and tokens with your actual values.
- Save and restart Claude Desktop
Ask Claude Anything!
Now open Claude Desktop and ask:
Get my Facebook ad spend for the past 7 days. |
Claude will:
- Detect the MCP server
- Request permission to use it
- Fetch real data using tools like get_insights, get_campaigns, and more
🧯 Troubleshooting
- No tools in Claude?
→ Re-check the claude.json path and restart Claude - Server errors?
→ Run the server manually using uv run mcp run server.py to see logs - No data showing?
→ Ensure your access token has ads_read permission and the ad account ID is correct
That’s It!
You now have Facebook Ads connected directly to Claude on your laptop — no cloud, no code, just insights on demand.
We also have other blogs where we discuss MCP Servers and AI in depth:
- The CMO’s Guide to AI-Driven Growth: Insights from BOND’s 2025 AI Report
- Connect Google Analytics 4 to Claude Desktop with an MCP Server – A complete guide
- The End-to-End Model Context Protocol (MCP) Guide for Marketers
FAQs
1. What is an MCP Server and why is it needed for connecting Facebook Ads to Claude Desktop?
An MCP (Middleware Control Protocol) Server acts as a bridge between Claude Desktop and external platforms like Facebook Ads. It enables seamless data flow, allowing Claude to fetch ad performance data, automate tasks, and generate insights without direct API coding.
2. Can I use Claude Desktop to create or manage Facebook Ads directly?
While Claude Desktop cannot create or publish Facebook Ads, it can analyze campaign performance, generate reports, and suggest optimizations when integrated through an MCP Server. This setup enhances your workflow without replacing Facebook Ads Manager.
3. Is any coding knowledge required to set up the integration?
No, most MCP Servers offer no-code or low-code configurations. The guide walks you through the setup process using tools like Zapier or n8n, making it accessible even for non-technical users.