Catalog PyPI
Back to packageRELEASE DETAILS

1.0.0

PyPI

adiffy-meta-ads-mcp

Adiffy Meta Ads MCP Server — Model Context Protocol server for Meta Ads API

adiffyadsapifacebookmcpmeta
Published7 Mar 2026
Direct dependencies9
Transitive dependenciesNot calculated

README

Version 1.0.0 documentation

Adiffy Meta Ads MCP Server

Model Context Protocol (MCP) server for Meta Ads API

Provides 29+ tools for managing Meta (Facebook/Instagram) advertising campaigns through any MCP-compatible client.

Features

  • Account Management — List ad accounts, get account details
  • Campaign Operations — Create, read, update campaigns
  • Ad Set Management — Manage targeting, budgets, schedules
  • Ad Management — Create/edit ads with creatives
  • Insights & Reporting — Performance metrics with breakdowns
  • Targeting — Interest search, audience estimation, demographics
  • Creative Management — Preview ad creatives and images
  • Budget Schedules — Automated budget management
  • Ads Library — Search Meta's Ad Library

Quick Start

Prerequisites

  • Python 3.10+
  • Meta App credentials (META_APP_ID, META_APP_SECRET)
  • Meta API access token (META_ACCESS_TOKEN)

Environment Variables

# Required
export META_APP_ID="your_meta_app_id"
export META_APP_SECRET="your_meta_app_secret"
export META_ACCESS_TOKEN="your_access_token"

# Optional
export META_ADS_ENABLE_REPORTS="1"          # Enable report generation
export META_ADS_DISABLE_CALLBACK_SERVER="1" # Disable local OAuth server
export META_ADS_DISABLE_LOGIN_LINK="1"      # Disable login link tool

Installation

# Install with pip
pip install -e .

# Or with uv
uv pip install -e .

Running

# Default: stdio transport (for MCP clients like Claude Desktop)
adiffy-meta-ads-mcp

# HTTP transport (for web integrations)
adiffy-meta-ads-mcp --transport streamable-http --port 8080

# Login only
adiffy-meta-ads-mcp --login

Docker

docker build -t adiffy-meta-ads-mcp .
docker run -e META_APP_ID="..." -e META_APP_SECRET="..." -e META_ACCESS_TOKEN="..." adiffy-meta-ads-mcp

MCP Client Configuration

Add to your MCP client config (e.g., mcp_config.json):

{
  "meta-ads": {
    "command": "adiffy-meta-ads-mcp",
    "env": {
      "META_APP_ID": "your_app_id",
      "META_APP_SECRET": "your_app_secret",
      "META_ACCESS_TOKEN": "your_token"
    }
  }
}

Available Tools

ToolDescription
get_ad_accountsList all accessible ad accounts
get_account_infoGet details for a specific account
get_campaignsList campaigns with filtering
get_campaign_detailsGet campaign details and metrics
create_campaignCreate a new campaign
get_adsetsList ad sets with filtering
get_adset_detailsGet ad set details
update_adsetUpdate ad set settings
get_adsList ads with filtering
get_ad_detailsGet ad details
get_ad_creativesGet creative details for ads
get_creative_detailsGet specific creative details
get_ad_imageDownload ad creative images
update_adUpdate ad settings
get_insightsGet performance insights
search_interestsSearch for targeting interests
get_interest_suggestionsGet interest suggestions
estimate_audience_sizeEstimate target audience size
search_behaviorsSearch targeting behaviors
search_demographicsSearch demographics
search_geo_locationsSearch geographic locations
create_budget_scheduleCreate budget schedules
get_login_linkStart OAuth authentication
searchOpenAI deep research search
fetchOpenAI deep research fetch

Authentication

The server supports two authentication modes:

  1. Direct Token (recommended for production): Set META_ACCESS_TOKEN environment variable
  2. Local OAuth (for development): Uses a local callback server to handle the Meta OAuth flow

License

MIT License — see LICENSE for details.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.26.0runtime
mcp
Environment
{
  "extras": "cli",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mcp[cli]==1.12.2runtime
pathlib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pathlib>=1.0.1runtime
pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pillow>=10.0.0runtime
python-dateutil
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
python-dateutil>=2.8.2runtime
python-dotenv
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
python-dotenv>=1.1.0runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.32.3runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=1.0.0; extra == "test"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.4.1; extra == "test"runtime

Distribution files

2 collected
adiffy_meta_ads_mcp-1.0.0-py3-none-any.whl

bdist_wheel · 76.62 KB · Python py3

Source file
adiffy_meta_ads_mcp-1.0.0.tar.gz

sdist · 224.05 KB · Python source

Source file

Repository

PENDING
adiffy/meta-ads-mcp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:87b4516d2bc1f85d321fe3d4d3c109dd77d24cabf4b1048887b2b6a0bcf4732d

Other collected versions

View all collected versions →