Meta Ads MCP Server
Allows analysis of video creatives hosted on Dropbox by providing the file URL for AI-powered scene analysis.
Enables Facebook OAuth authentication and retrieval of Facebook Pages linked to the ad account for integration with Facebook's Marketing API.
Allows analysis of video creatives hosted on Google Drive by providing the file URL for AI-powered scene analysis.
Provides comprehensive tools for ad analytics, creative analysis, and campaign management via the Meta Marketing API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Meta Ads MCP ServerShow me campaign performance for last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Meta Ads MCP Server
A Model Context Protocol (MCP) server that provides access to Meta Marketing API for comprehensive ad analytics and AI-powered video creative analysis.
Quick Start (Claude Code)
claude mcp add --transport http meta-ads https://sp-meta-ads-mcp.fly.dev/mcpThen ask:
"Show me campaign performance for last 7 days"Claude will prompt you to authenticate with Facebook automatically.
Manual Configuration
Edit ~/.config/claude-code/mcp.json:
{
"mcpServers": {
"meta-ads": {
"url": "https://sp-meta-ads-mcp.fly.dev/mcp",
"transport": "http"
}
}
}Related MCP server: Meta Marketing API MCP Server
Features
Facebook OAuth Authentication with multi-user session isolation
18 MCP Tools for ad analytics, creative analysis, and comparisons
AI Video Analysis via Gemini AI with Firestore caching
StreamableHTTP Transport for remote MCP connections
Available Tools (18)
Performance Analytics
Tool | Description |
| Ad account info and summary metrics |
| Unified metrics at campaign/adset/ad level with relevance diagnostics |
| Video completion funnel, engagement depth, retention scoring |
| Breakdowns by age, gender, country, device, platform, placement |
| Daily frequency/CTR trends with fatigue scoring |
| Aggregate performance by creative ID across ads |
| Available custom conversion events |
Creative Analysis
Tool | Description |
| Extract ad copy (primary, headline, description) |
| AI scene-by-scene analysis of Meta video ads |
| Parallel AI analysis of multiple video ads |
| Analyze video from URL (Google Drive, Dropbox, direct) |
| Analyze image from URL |
| Cluster ads by messaging theme correlated with performance |
Comparisons
Tool | Description |
| A/B time period analysis |
| Rank campaigns/adsets/ads side by side |
Account & Setup
Tool | Description |
| List saved targeting audiences |
| List linked Facebook pages |
| List ad sets in a campaign |
Run Locally
Prerequisites
Node.js 24+
Meta/Facebook Developer Account with an ad account
Facebook App with OAuth configured
Optional (for video analysis):
Google Cloud Storage bucket
Firestore database
Gemini API key or Vertex AI
Setup
git clone https://github.com/superpower-growth/meta-ads-mcp.git
cd meta-ads-mcp
cp .env.example .env
# Edit .env with your credentials
npm install
npm run build
npm startFor local development without OAuth, set REQUIRE_AUTH=false in .env.
Environment Variables
See .env.example for full documentation. Key variables:
Variable | Description |
| Long-lived token from Graph API Explorer |
| Ad account ID (format: |
| From Facebook App Settings |
| From Facebook App Settings |
| Random 32+ char secret ( |
|
|
Video Analysis (Optional)
Variable | Description |
| Gemini API key (or use Vertex AI) |
| GCP service account key |
| GCS bucket for video staging |
| Cache TTL (default: 24) |
Deployment
Docker
docker build -t meta-ads-mcp .
docker run -d -p 3000:3000 --env-file .env meta-ads-mcpFly.io
fly deployAPI Endpoints
Endpoint | Description |
| Health check (no auth) |
| MCP SSE streaming |
| MCP request/response |
| MCP server metadata for |
Troubleshooting
"Session not found" after redeployment — Restart Claude Code to reconnect. Tokens are persisted in Firestore.
"Unauthorized" errors — Sessions last 24 hours. Re-authenticate by restarting Claude Code.
Meta API errors — Verify your token has ads_read permission and META_AD_ACCOUNT_ID has the act_ prefix.
License
MIT
Built with the Model Context Protocol SDK
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/superpower-growth/meta-ads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server