Skip to main content

MCP server for creating, managing, and analyzing Meta (Facebook/Instagram) ad campaigns with Claude.

Project description

meta-ads-manager-mcp

MCP server for creating and managing Meta (Facebook/Instagram) ad campaigns directly from Claude. Tell Claude what you want. It deploys.

Built by Attainment Labs.


What it does

Add this server to your Claude config. You get 5 tools:

Tool What it does
create_meta_campaign Create a full campaign: campaign, ad set, creatives, and ads
get_campaign_status Check status of a campaign, its ad sets, and ads
pause_campaign Pause a live campaign
activate_campaign Activate a paused campaign
delete_campaign Permanently delete a campaign

All campaigns are created as PAUSED by default. You review before spending.


Install

Option 1: uvx (recommended, no install needed)

# No setup required — uvx runs it directly

Add to ~/.mcp.json:

{
  "mcpServers": {
    "meta-ads": {
      "command": "uvx",
      "args": ["meta-ads-manager-mcp"],
      "env": {
        "META_ACCESS_TOKEN": "your-token-here",
        "META_AD_ACCOUNT_ID": "your-account-id",
        "META_PAGE_ID": "your-page-id"
      }
    }
  }
}

Option 2: pip install

pip install meta-ads-manager-mcp

Then in ~/.mcp.json:

{
  "mcpServers": {
    "meta-ads": {
      "command": "meta-ads-manager-mcp",
      "env": {
        "META_ACCESS_TOKEN": "your-token-here",
        "META_AD_ACCOUNT_ID": "your-account-id",
        "META_PAGE_ID": "your-page-id"
      }
    }
  }
}

Credentials

You need three values from your Meta Business Manager:

Variable Where to find it
META_ACCESS_TOKEN Meta for Developers: Graph API Explorer, generate a long-lived token with ads_management permission
META_AD_ACCOUNT_ID Meta Business Manager: Settings > Ad Accounts (numbers only, no act_ prefix)
META_PAGE_ID Facebook Page: Settings > Page Info > Page ID

The access token expires. Generate a 60-day long-lived token to reduce rotation frequency.


Usage examples

Once the server is connected, just describe what you want:

Create a campaign:

"Create a Meta campaign targeting US fitness enthusiasts aged 25-40. Daily budget $30. Use the image at /Users/me/ads/hero.jpg. Copy: 'Track every rep. Hit every goal.' Headline: 'FitCommit AI'. CTA: Learn More. Link to fitcommit.ai."

Check status:

"What's the status of campaign 120243616427570285?"

Pause:

"Pause campaign 120243616427570285."

Activate:

"Go live with campaign 120243616427570285."

Delete:

"Delete campaign 120243616427570285."


dry_run mode

create_meta_campaign defaults to dry_run=True. This simulates all API calls and returns fake IDs without making any requests or spending money. Set dry_run=False when you're ready to deploy.


YAML workflow

Prefer writing campaigns as config files? Use meta-ads-cli — the companion CLI tool.


Requirements

  • Python 3.9+
  • uv for the uvx install path
  • A Meta Business Manager account with an ad account and Facebook Page

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meta_ads_manager_mcp-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meta_ads_manager_mcp-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file meta_ads_manager_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: meta_ads_manager_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for meta_ads_manager_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 722ae3ff9e8cf9a7dfcf4853033ccd393b6ced27904687e3f2940ddf9d9da101
MD5 6e0cf4c21bb77528a9de48248118d39c
BLAKE2b-256 34515134c4312dc35f64bf57b829b65db0f8cca085656e49cb3d7811e5d9e610

See more details on using hashes here.

File details

Details for the file meta_ads_manager_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meta_ads_manager_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1c7e5108e9abe7e3afaa4e616f7162a95c3cec677b61bfe15bd6e8c8c9ad7b
MD5 0a94f9dad847cc588843847e1e9c3077
BLAKE2b-256 676922d166a9ad21899dd32342b7f394facbd004fc02c6dfc922d3eea2a55a84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page