MCP server for creating and managing Meta (Facebook/Instagram) ad campaigns with Claude.
Project description
attainment-meta-ads-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": ["attainment-meta-ads-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 attainment-meta-ads-mcp
Then in ~/.mcp.json:
{
"mcpServers": {
"meta-ads": {
"command": "attainment-meta-ads-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+
uvfor the uvx install path- A Meta Business Manager account with an ad account and Facebook Page
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file attainment_meta_ads_mcp-0.1.0.tar.gz.
File metadata
- Download URL: attainment_meta_ads_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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7047ba043cd412ac709d47608689a91cc8fdba1dfb05b130a19d8e670dfa4c67
|
|
| MD5 |
9a775e02f866e57f39a17cba1178ccbf
|
|
| BLAKE2b-256 |
e17b02882c05388446bde76e54651ded845543844f2160650d70a3a74c3543a5
|
File details
Details for the file attainment_meta_ads_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: attainment_meta_ads_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8089fc6e838117a2743fa4d802abfb56e989d1f1037d836c7c142ba326a48ab1
|
|
| MD5 |
cb8123ed2819187f75d6130a31aeac8c
|
|
| BLAKE2b-256 |
1a95558128d7629e620e503ca50de8bb9cfffa00e929e0a82e970484fe3bf57f
|