Facebook Ads Library MCP
A powerful MCP server for Facebook Ads Library that provides 15+ tools for competitive intelligence, creative analysis, and performance prediction, enabling users to search, monitor, and analyze advertising data.
README
🔥 Facebook Ads Library MCP - Advanced Intelligence Platform
The most powerful Facebook Ads Library MCP server with 15+ advanced tools for competitive intelligence, market analysis, and advertising insights. Built with FastMCP and completely FREE.
🌟 Why This MCP?
Beats paid services like ScrapeCreators ($497/month) with:
- ✅ 15+ Advanced Tools vs their 5-6 basic ones
- ✅ AI-Powered Creative Analysis (they don't have this)
- ✅ ML Performance Prediction (they don't have this)
- ✅ Direct API Access (no proxy limitations)
- ✅ 100% Free & Open Source (vs $497/month)
- ✅ Complete Customization (add your own features)
🚀 Quick Start
1. Installation
git clone https://github.com/RamsesAguirre777/facebook-ads-library-mcp.git
cd facebook-ads-library-mcp
pip install -r requirements.txt
2. Get Facebook Access Token
- Go to Facebook Graph API Explorer
- Generate access token with
ads_readpermission - (Optional) Extend token to 60 days
3. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"facebook_ads": {
"command": "python",
"args": [
"/path/to/facebook-ads-library-mcp/facebook_ads_mcp_complete.py",
"--facebook-token",
"YOUR_FACEBOOK_ACCESS_TOKEN"
]
}
}
}
4. Restart Claude Desktop
🛠️ 15+ Advanced Tools
🔍 Search & Discovery
search_facebook_ads()- Advanced search with multiple filtersdiscover_competitor_brands()- Find industry competitors automaticallyfind_similar_advertisers()- Discover brands with similar strategies
📊 Deep Analysis
analyze_ad_creative_elements()- AI-powered creative analysisanalyze_ad_performance_metrics()- Performance insights & KPIsanalyze_ad_targeting_insights()- Audience targeting analysis
🎯 Monitoring & Tracking
monitor_brand_ad_changes()- Real-time campaign monitoringtrack_ad_spend_estimation()- Budget tracking & estimation
🏆 Competitive Intelligence
competitive_ad_analysis()- Multi-brand strategy comparisonbenchmark_against_industry()- Industry benchmarkingidentify_market_opportunities()- Market gap analysis
🔮 Prediction & Optimization
predict_ad_performance()- ML-powered performance predictiongenerate_facebook_intelligence_report()- Comprehensive reports
🛠️ Utilities
export_facebook_ads_data()- Export in JSON/CSV/Markdown
💡 Usage Examples
Basic Competitive Analysis
# In Claude Desktop
"Analyze Nike's current Facebook advertising strategy"
"Compare ad strategies between Tesla and BMW"
"Generate a complete intelligence report for Airbnb"
Advanced Market Research
# Discover competitors
"Find all fitness app companies advertising on Facebook"
# Market opportunities
"Identify advertising gaps in the fintech industry"
# Performance prediction
"Predict performance for this ad: 'Get fit in 30 days with our AI trainer'"
Monitoring & Alerts
# Track competitor changes
"Monitor Apple for new ad campaigns and alert me if they launch 5+ new ads"
# Spend tracking
"Estimate Shopify's monthly Facebook ad spend"
🔧 Advanced Configuration
Environment Variables
# Create .env file
echo "FACEBOOK_ACCESS_TOKEN=your_token_here" > .env
Multiple Regions
{
"mcpServers": {
"facebook_ads_us": {
"command": "python",
"args": ["facebook_ads_mcp_complete.py", "--facebook-token", "US_TOKEN"]
},
"facebook_ads_eu": {
"command": "python",
"args": ["facebook_ads_mcp_complete.py", "--facebook-token", "EU_TOKEN"]
}
}
}
📈 Performance Comparison
| Feature | ScrapeCreators | Our MCP | Savings |
|---|---|---|---|
| Monthly Cost | $497 | $0 | $497/month |
| Facebook Tools | 5-6 basic | 15+ advanced | 3x more |
| Creative Analysis | ❌ | ✅ AI-powered | Exclusive |
| Performance Prediction | ❌ | ✅ ML-based | Exclusive |
| Rate Limits | Restricted | Direct API | Unlimited |
| Customization | ❌ | ✅ Full control | Infinite |
🏗️ Architecture
Facebook Ads Library MCP
├── Core API Wrapper
│ ├── Authentication & Rate Limiting
│ └── Error Handling & Retry Logic
├── Search & Discovery Engine
│ ├── Advanced Filtering
│ └── Competitor Discovery
├── AI Analysis Engine
│ ├── Creative Element Analysis
│ └── Performance Prediction
├── Monitoring System
│ ├── Real-time Change Detection
│ └── Alert System
└── Export & Reporting
├── Multiple Format Support
└── Executive Reports
🔒 Security & Privacy
- No Data Storage - All data processed in real-time
- Direct API Access - No proxy servers or data logging
- Open Source - Complete transparency
- Local Processing - Your data stays on your machine
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
git clone https://github.com/RamsesAguirre777/facebook-ads-library-mcp.git
cd facebook-ads-library-mcp
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements-dev.txt
📖 Documentation
- Setup Guide - Detailed installation instructions
- API Reference - Complete tool documentation
- Examples - Real-world use cases
- Troubleshooting - Common issues & solutions
🔄 Changelog
See CHANGELOG.md for detailed version history.
🆘 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: ramses.aguirre777@email.com
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- FastMCP for the excellent MCP framework
- Crawl4AI for AI-powered web crawling
- Facebook Graph API for providing access to ads data
⭐ Star History
<div align="center"> <h3>🔥 Built with passion for the MCP community 🔥</h3> <p> <a href="https://twitter.com/RamsesAguirre777">Twitter</a> • <a href="https://github.com/RamsesAguirre777">GitHub</a> • <a href="https://linkedin.com/in/RamsesAguirre777">LinkedIn</a> </p> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。