Facebook Ads 10xeR MCP Server Creative Performance Analytics
Optimize Facebook Ads creative performance with the MCP server for deep creative insights, multi-dimensional breakdowns, and comprehensive ad analytics.
Overview
This MCP (Model Context Protocol) server provides programmatic creative performance analytics for Facebook Ads. It ingests ad-level metrics and creative metadata, applies multi-dimensional breakdowns and model-context scoring, and returns actionable insights about which creative elements drive performance across audiences, placements, and time windows. The server helps turn raw ad telemetry into reproducible signals for creative testing and optimization.
Designed for engineers and analysts, the server exposes HTTP APIs and supports containerized deployment. You can integrate it into pipelines that fetch Facebook Ads data (via the Marketing API or data warehouses), run automated creative diagnostics, and surface prioritized recommendations to dashboards or model training jobs.
GitHub: https://github.com/fortytwode/10xer
Features
- Deep creative analysis combining metrics (CTR, CPC, ROAS) with creative metadata (copy, images, CTAs)
- Multi-dimensional breakdowns (audience, placement, device, time window)
- Aggregate and time-series analytics with cohort and trend comparison
- Anomaly and uplift detection for creative performance shifts
- Programmatic scoring of creatives using configurable model-context rules
- HTTP API endpoints for analysis, breakdowns, history, and model context
- Docker-friendly for reproducible deployment and CI/CD
Installation / Configuration
Prerequisites: Docker (recommended) or Node.js/Python runtime, a Postgres (or other) database for event storage, and credentials to pull Facebook Ads metrics.
Clone the repo:
Using Docker Compose (recommended):
# docker-compose.yml (example)
version: "3.8"
services:
mcp-server:
build: .
ports:
- "8080:8080"
env_file: .env
depends_on:
- db
db:
image: postgres:14
environment:
POSTGRES_DB: 10xer
POSTGRES_USER: 10xer
POSTGRES_PASSWORD: example
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
Start services:
Environment variables (.env example):
PORT=8080
DATABASE_URL=postgres://10xer:example@db:5432/10xer
FACEBOOK_ACCESS_TOKEN=<your_facebook_token>
MCP_API_KEY=<secure_api_key>
MODEL_CONTEXT_CONFIG=/app/config/model_context.yaml
If you prefer a local runtime, run migrations and start the server (example for Node):
Or for Python/FastAPI:
Available Resources
- API endpoints for analysis and breakdowns (see table below)
- Example SQL schema for creative events and aggregated metrics
- Model context configuration (YAML/JSON) to specify scoring rules and dimensions
- Sample scripts to ingest Facebook Ads data into the database
- Postgres for storage; optional Redis for caching ephemeral model computations
- Example dashboard templates (Grafana, Metabase) to visualize outputs
API endpoints (examples)
| Path | Method | Description |
|---|---|---|
| /health | GET | Server health check |
| /analyze | POST | Run creative performance analysis for a date range and dimensions |
| /breakdown | POST | Return multi-dimensional breakdowns and top segments |
| /history | GET | Get time-series performance for a creative or campaign |
| /models | GET/POST | List or update model-context scoring rules |
Sample analyze request:
Sample response (trimmed):
Use Cases
- A/B test prioritization: Automatically rank creatives after a test window and return the top candidates for scaling based on uplift-adjusted CTR and ROAS.
- Multi-dimensional troubleshooting: Identify that a creative performs well overall but underperforms for mobile placement in a specific region; return segment-level metrics and recommended creative changes.
- Creative element impact analysis: Measure the contribution of headline, image, and CTA combinations to conversion rate using model-context scoring rules.
- Anomaly detection and alerts: Detect sudden drops in conversion rate for a creative and trigger notifications or rollback workflows.
- Training data generation: Export labeled examples (creative, audience, performance) for downstream ML models that predict creative success.
This MCP server is intended as a building block—use it to embed creative intelligence into reporting, automation, and model pipelines to make Facebook Ads creative decisions more data-driven and reproducible.