Sandbox
@brandu-mos/konquest-meta-ads-mcp

Meta Ads MCP server for Claude Code

KonQuest Meta Ads MCP is a supervised MCP server for managing Meta Ads from Claude Code. It includes public tools for CRUD, targeting, diagnostics, validation, and safety, plus a separate premium bundle for optimization and copy generation. The repo also ships config files, docs, and tests for the tool surface.

43 stars11 forksPythonUpdated 5mo ago
Who it's for

Builders who want Claude Code to manage Meta Ads with approval steps and safety checks.

What it delivers

You can create, inspect, and adjust Meta Ads from your agent without losing control over writes, activation, and budgets.

What it does

Full Meta Ads CRUD

Create, read, update, and delete campaigns, ad sets, ads, and creatives.

Multi-asset ad creation

Build ads with video, static images, and multi-dimension assets.

Targeting and audience tools

Search interests, behaviors, and geo targets, plus audience listing.

Pixels and tracking diagnostics

Check pixel health, event diagnostics, test events, and CAPI-related setup.

Catalog and DPA support

Work with product catalogs, feeds, product sets, and validation.

Safety and verification

Use preflight checks, naming enforcement, duplicate checks, rate limiting, and rollback references before writes.

Vault-driven copy and intelligence

Read client vault inputs like ICPs and brand voice to guide ad copy and concept selection.

How to get it

  1. 1Run
    cd meta-ads-mcp
    uv sync
  2. 2Copy .env.example to .env and fill in your values
    cp .env.example .env

README

KonQuest Meta Ads MCP

Supervised Meta Ads Operating System for Claude Code. You can find the premium version here: https://farasokster.gumroad.com/l/konquest-meta-ads-mcp-premium

Open-Core Model

KonQuest Meta Ads MCP uses an open-core model:

Public (this repo) - 57 tools, MIT license:

  • Full CRUD for campaigns, ad sets, and ads
  • Multi-asset ad creation (video + static image, multi-dimension)
  • Image upload and retrieval
  • Campaign and ad set duplication
  • Insights and bulk cross-account analytics
  • Pixel and tracking diagnostics (5 tools)
  • Catalog and DPA support (6 tools, including product set create/update)
  • Full targeting toolkit (6 tools)
  • Setup readiness checker (42+ checks with fix instructions)
  • Validation pipeline, naming enforcement, post-write verification
  • Safety tiers, rate limiting, rollback references
  • 215 automated tests

Premium bundle - adds 41 tools:

  • Advisory optimization engine (review queues, learning, experiments, budget governor, creative rotation)
  • Vault intelligence and copy generation (brand voice, ICP targeting, concept selection)
  • Greek language QA (Greeklish detection, orthography checks)
  • Automation suite (diagnostics, bulk operations, account audit)
  • Vault bootstrap (15 template files per client)
  • Premium tests and evaluations

Premium bundle available separately. Public tools work fully without it.

What Makes This Different

  • Production-tested across 37+ client campaigns with real budgets and real edge cases
  • Not a wrapper - includes optimization engine, safety gates, validators, and rollback
  • Vault-integrated - reads client intelligence (ICPs, brand voice, angles) to generate better ads
  • Greek language QA built in (adaptable to any language validation)
  • All ads created PAUSED - nothing goes live without explicit operator approval
  • Supervised, not autonomous - operator confirms every write, every activation, every budget change

Tool Classification

ClassificationCountDescription
production-safe38Read-only data access. No API writes, no local state changes.
supervised-only29Write/delete operations requiring operator approval before execution.
advisory-only31Generate recommendations, plans, copy, diagnostics. No Meta API writes. May write local files.
Total: 98 registered

Architecture

meta_ads_mcp/
  core/          # 66 tools - API read/write operations
  engine/        # 32 tools - optimization, review, learning, experiments
  validators/    # Quality gates (compliance, creative specs, tracking, structure)
  safety/        # Rate limiting, rollback, duplicate checking, file locks, tier access
  ingestion/     # Internal: video manifest management
  reporting/     # Internal: not currently active (see Non-Shipped Code)

Tool Categories

CategoryToolsDescription
Account Management6Token health, ad accounts, pages, IG identity, discovery
Campaigns4Create, read, update campaigns
Ad Sets4Create, read, update ad sets with targeting
Ads4Create, read, update ads
Creatives3Create, read ad creatives
Insights & Analytics1Performance data with archetype-aware normalization
Pixels & Tracking5Pixel health, event diagnostics, test events, CAPI
Catalogs & DPA6Product catalogs, feeds, product sets, validation
Audiences1Custom audience listing
Targeting3Interest, behavior, and geo search
Video Management3Upload (simple + resumable) and processing status
Ad Builder1Multi-asset ad creation with IG gate enforcement
Copy Engine2Vault-driven ad copy generation and validation
Naming Convention1Enforced naming schema for all objects
Automation & Diagnostics6Greek QA, full diagnostic, bulk ops, account audit
Vault & Intelligence2Client vault reader, concept selection
Optimization Engine4Optimization cycles, launch planning, execution packs
Mutation Corridor2Budget/targeting changes with verification
Activation & Rollback4Status changes and undo with preflight checks
Review Queue7Operator review queue, outcome snapshots, digests
Learning Layer5Policy memory, outcome evaluation, learning cycles
Experiments7A/B testing, budget governor, creative rotation, scaling
Copy Generation2Auto copy chain, vault-grounded Greek copy

Engine Features

  • Optimization loops - automated budget shifting based on performance signals
  • Experiment management - A/B test tracking with statistical significance
  • Budget governors - prevent overspend with configurable daily/lifetime limits
  • Creative rotation - fatigue detection and automatic creative refresh triggers
  • Policy learning - tracks action outcomes and adapts confidence over time
  • Naming gate - hard enforcement of naming conventions before any API write

Safety Features

  • Rate limiting - respects Meta API rate limits with backoff
  • Rollback - undo recent changes with execution journal
  • Duplicate checking - prevents accidental duplicate campaigns/ads
  • File locks - safe concurrent access to vault storage
  • Tier-based access - safety tiers per account (sandbox, standard, production)

Validator Suite

  • Compliance validator - Meta ad policy pre-check
  • Creative spec validator - image/video dimension and format validation
  • Tracking validator - pixel and event verification before launch
  • Structure validator - campaign structure consistency checks
  • Operational validator - budget, schedule, and targeting sanity checks

Non-Shipped Code

Code that exists in the repository but is NOT part of the active tool surface:

  • reporting/templates.py, reporting/formatter.py - not imported at runtime, no active report generation
  • evals/ - internal evaluation stubs, not operator-facing
  • Internal helpers (not MCP tools): identity.py (IG resolution), api.py (HTTP client), auth.py (token verification), utils.py (format helpers), safety/ (rate limiter, rollback, dedup), validators/ (pre-write validation pipeline)

Setup

1. Install

cd meta-ads-mcp
uv sync

2. Environment Variables

Copy .env.example to .env and fill in your values:

cp .env.example .env

Required:

  • META_ACCESS_TOKEN - Meta Marketing API access token (system user token recommended)

Optional:

  • META_APP_SECRET - for appsecret_proof (recommended for production)
  • META_APP_ID - Meta app ID
  • VAULT_PATH - path to your marketing vault directory (defaults to ~/marketing-vault)

3. MCP Configuration

Add to your Claude Code MCP config (.mcp.json):

{
  "mcpServers": {
    "meta-ads": {
      "command": "uv",
      "args": ["--directory", "/path/to/meta-ads-mcp", "run", "python", "-m", "meta_ads_mcp"],
      "env": {
        "META_ACCESS_TOKEN": "your_token_here",
        "VAULT_PATH": "/path/to/your/marketing-vault"
      }
    }
  }
}

4. Vault Structure (Optional)

If using the vault integration for client intelligence:

your-vault/
  01_CLIENTS/{client-slug}/
    00-profile.md        # Account IDs, pixel, page, IG
    02-icp-personas.md   # Target audience profiles
    04-brand-voice.md    # Tone, language, style rules
    05-messaging-house.md # Angles, value props
    08-objections.md     # Objections + bias deployment
    matrix.md            # Decision Matrix
  02_COMPETITORS/{slug}/
    landscape.md         # Competitive landscape

Testing

uv run --extra dev python -m pytest tests/ -v
# Public package: 215 passed | Full (with premium): 246 passed

License

MIT - see LICENSE.

Files in the repo

Repository payload13 top-level entries
  • config
  • docs
  • meta_ads_mcp
  • tests
  • .env.example
  • .gitignore
  • Dockerfile
  • glama.json
  • LICENSE
  • pyproject.toml
  • README.md
  • server.json
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k