meta-ads-mcp-server
Provides read and optional write access to Meta (Facebook) Ads data, including campaigns, ad sets, ads, creatives, audiences, pixels, catalogs, Pages, Instagram accounts, activity logs, A/B tests and lift studies, with query planning and preview-first writes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meta-ads-mcp-serverShow me last week's campaign performance and top ad sets by ROAS."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
meta-ads-mcp-server
An open-source Model Context Protocol server for the Facebook (Meta) Ads Marketing API. It lets Claude, ChatGPT, Cursor or any MCP client read and analyse your advertising data, and change it if you choose to.
You run it. Your token stays on your machine. Nothing is proxied through a third party.
npx -y @getmcpads/meta-ads-mcp-serverPrefer not to run it yourself? getmcpads.com is the hosted version of this server, with Meta Ads alongside Google Ads, TikTok Ads, Pinterest Ads, GA4 and Search Console behind a single endpoint, hosted OAuth, and cross-platform reporting. Same tools, same safety model, no setup.
What you get
34 read tools | Campaigns, ad sets, ads, creatives, audiences, pixels, catalogs, Pages, Instagram, activity logs, A/B tests and lift studies |
10 write tools | Off by default. Status, budgets, schedules, renames, campaign creation. Each one previews before it applies |
190 metrics | Including derived ones computed client-side (ROAS, CPA, frequency, hook rate, attribution-window views) |
56 breakdowns · 90 dimensions | With a compatibility matrix that catches invalid combinations before they hit the API |
7 resources | Live catalogues the model can read: metrics, breakdowns, compatibility rules, 11 workflow recipes |
Forward-compatible reads |
|
The query planner
Meta rejects many metric/breakdown combinations, and the error messages rarely say why. This server encodes the compatibility matrix, so it splits an impossible request into several valid API calls and merges the results instead of failing.
meta_validate_query lets the model check a combination before spending a call on it.
That is the difference between an assistant that reports "the API returned error 100" and
one that returns your numbers.
Related MCP server: Facebook Ads MCP Server
How this compares to Meta's own MCP server
Meta ships an official MCP server, hosted at mcp.facebook.com/ads. It is a good product.
Here is an honest comparison, because the right choice depends on what you need.
Meta's official server | This server | ||
Hosting | Meta-hosted, remote | You host it. stdio, local process | Hosted for you |
Data path | Through Meta's endpoint | Direct to the Graph API. No intermediary | Through our gateway |
Auth | Meta Business OAuth, 2 clicks | You bring a token, which is more setup (see below) | Hosted OAuth |
Tools | 29 | 44 (34 read + 10 write) | 44, plus 5 other platforms |
Writes | Applied directly | Preview first, applied only on | Preview first |
Metric compatibility | None | Query planner splits incompatible requests | Same planner |
Auditable | No | Yes. Apache-2.0, read every line | This server, audited |
Modifiable | No | Fork it | No |
Help Center search | ✅ | ❌ | ❌ |
Catalog creation | ✅ | ❌ (catalog reads are supported) | ❌ |
Choose Meta's if you want the fastest possible setup and don't need to see the code. Choose this one if you need your data to stay on your infrastructure, want to audit or extend what the model can do, or want writes that can't fire on the first call. Choose getmcpads.com if you want this server's capabilities without running it, or you need more than one ad platform in the same conversation.
Getting a token
This is the one step that takes real effort, and it's worth doing properly.
You need a Meta access token with ads_read. There are three ways to get one; the
second is the one we recommend.
Recommended: System User token (does not expire)
A System User belongs to your Business, not to a person. Its token survives password changes and staff departures, and needs no App Review to access ad accounts your Business already owns.
Go to Business Settings → Users → System Users
Add a system user. Give it the Employee role unless you need more.
Assign Assets → select your ad accounts → grant View performance (add Manage campaigns only if you plan to enable writes).
Generate New Token → pick your app → select scope
ads_read(addads_managementonly for writes).Set the expiry to Never.
Copy the token. Meta shows it once.
📖 Meta's System User documentation
Quick test: Graph API Explorer (expires in ~1 hour)
Fine for trying the server out, useless for daily work.
Graph API Explorer → select your app →
add ads_read → Generate Access Token.
Long-lived user token (~60 days)
Exchange a short-lived token for a 60-day one. You will have to redo this every two months. 📖 Long-lived tokens
Which permissions?
Permission | When you need it |
| Always. Campaigns, insights, everything read-only |
| Only if you set |
| Optional. Business Manager asset discovery |
| Optional. Page posts and organic enrichment |
| Optional. Linked Instagram accounts |
| Optional. Product catalog reads |
Run meta_health_check as your first call: it reports which scopes you actually have
and which ones are missing for the tools you tried to use, without printing your token.
Setup
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"meta-ads": {
"command": "npx",
"args": ["-y", "@getmcpads/meta-ads-mcp-server"],
"env": {
"META_ACCESS_TOKEN": "your-token-here"
}
}
}
}Restart Claude Desktop. Ask it: "list my Meta ad accounts".
Claude Code
claude mcp add meta-ads --env META_ACCESS_TOKEN=your-token-here -- npx -y @getmcpads/meta-ads-mcp-serverCursor
.cursor/mcp.json in your project, same shape as the Claude Desktop config above.
From source
git clone https://github.com/getmcpads-com/meta-ads-mcp-server.git
cd meta-ads-mcp-server
npm install && npm run build
cp .env.example .env # then fill in META_ACCESS_TOKEN
npm startConfiguration
Variable | Default | Meaning |
| none | Required. Your Meta access token |
| unset | Set to |
|
| Graph API version. Override to pin another |
|
|
|
Check your setup at any time:
npm run doctorWrites, and why they preview first
Write tools are disabled by default. Enable them with META_ENABLE_WRITES=1.
When enabled, every write tool returns a preview and changes nothing:
// meta_update_adset_budget { adSetId: "123", currency: "EUR", dailyBudget: 50 }
{
"applied": false,
"action": "meta_update_adset_budget",
"change": { "adSet": "123", "field": "daily_budget", "amount": 50,
"currency": "EUR", "inMinorUnits": 5000 },
"message": "Preview only, nothing was changed. Repeat the same call with confirm: true to apply this change to the live account."
}Only a second call carrying confirm: true touches the live account.
This is deliberate. An assistant composes these calls, and it can pick the wrong account, the wrong campaign, or the wrong order of magnitude on a budget. A mandatory preview makes the mistake visible before it costs money, and gives a human the stopping point the protocol does not guarantee on its own.
Two further guardrails:
meta_create_campaignalways creates the campaignPAUSED. There is no option to create it active.Budgets are converted to minor units per currency. The yen, the won and the CFA franc have no subunit, so sending 1250 for ¥12.50 would multiply the spend by a hundred. The server knows the zero-decimal currencies.
Tool | What it changes |
| Pause or reactivate |
| Daily or lifetime budget |
| Start and end time |
| Name only |
| Creates a campaign, always |
Tools
Discovery and health
Tool | Purpose |
| Validates the token, lists accessible accounts, reports missing scopes |
| Token validity, expiry and granted scopes |
| Every ad account the token can reach |
| Currency, timezone, spend cap, status, business info |
| Businesses, Pages, Instagram accounts, pixels, datasets |
Structure
Tool | Purpose |
| List entities, filterable by parent |
| Full hierarchy: campaigns → ad sets → ads |
| Search by name within an account |
| Activity log: who changed what, and when |
Performance
Tool | Purpose |
| The main reporting tool. Metrics, breakdowns, attribution windows |
| Check a metric/breakdown combination before running it |
| Native Insights fields, no aliasing |
| Why delivery is limited: statuses and issues |
Creatives
Tool | Purpose |
| Text, images, videos, links, CTAs |
| Normalised asset metadata, media URLs, asset feeds |
| Rendered preview markup for a placement |
Audiences and targeting
Tool | Purpose |
| Custom, saved and lookalike audiences |
| Interests, geographies, locales, cities, postal codes |
| Suitability, placement and context controls |
Commerce and organic
Tool | Purpose |
| Product catalogs and items |
| Product-breakdown insights enriched with catalog metadata |
| Pixels and datasets |
| Pages and their recent posts |
| Linked Instagram accounts |
| Media URLs, permalinks, counts for organic content |
Experiments
Tool | Purpose |
| Conversion lift studies and A/B tests |
| Detailed study results |
| Results with confidence guardrails |
Escape hatches
Tool | Purpose |
| Read flat fields from any Graph node |
| List an allowlisted Graph edge with your own field selection |
These last two exist so a new Graph field doesn't require a new release. The edge allowlist deliberately excludes lead records, which carry personal data.
URI | Contents |
| What this server exposes, and which tool to run first |
| All 190 metrics with categories and formats |
| All 56 breakdowns and where they are valid |
| The compatibility matrix, 90 dimensions |
| 11 step-by-step workflows |
| Read-only scope guidance |
| Scope positioning for a Meta App Review submission |
Security
The server holds a credential that can read live ad accounts, and modify them when writes are enabled. Concretely:
The token is never logged, at any log level, and never written to disk.
Requests go only to
graph.facebook.comon the pinned version. Any other host is refused rather than called. Covered by tests.Redirects are refused once a token is attached, so a redirect cannot forward your credential elsewhere. Covered by tests.
No telemetry. The server makes no network call other than to the Graph API. There is no analytics, no phone-home, and no usage reporting. You can verify this by grepping the source for
fetch.
Full policy and reporting instructions: SECURITY.md.
Looking for a managed, multi-platform version?
This server does one platform, on your machine, with your token. That is on purpose.
If you'd rather not run it yourself, or you need Facebook Ads alongside Google Ads, TikTok Ads, Pinterest Ads, GA4 and Search Console behind one endpoint, with hosted OAuth and cross-platform reporting, that's what we build at getmcpads.com.
Same philosophy, less plumbing. This project stays open source and independently useful either way.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md. Please read SECURITY.md before reporting anything security-related.
Licence
Apache License 2.0. See also NOTICE.
Facebook, Meta, Instagram and the Meta Marketing API are trademarks of Meta Platforms, Inc. This project is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. It is an independent client of a public API.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceEnables AI-powered analysis, management, and optimization of Meta advertising campaigns across Facebook and Instagram, including performance insights, budget optimization, and creative testing.33
- FlicenseNot gradedqualityDmaintenanceConnects AI assistants to Facebook's Ads API to enable natural language queries for campaign data, insights, and performance metrics. It allows users to manage ad accounts and retrieve detailed analytics like impressions, clicks, and spend through MCP-compatible interfaces.
- FlicenseNot gradedqualityDmaintenanceEnables managing Facebook ads campaigns, ad sets, ads, creatives, insights, and audience targeting via Meta's Marketing API.
- FlicenseAqualityBmaintenanceA read-only MCP server that pulls Meta Ads campaign, ad-set, and ad performance data to help users spot problems and adjust them in Ads Manager.6
Related MCP Connectors
Google Ads, Meta Ads & GA4 MCP server - 250+ tools for campaigns, creatives, audiences & reports.
Search Meta, Google Ads, LinkedIn, and TikTok ad libraries plus creative analysis via MCP.
60+ Meta Ads tools for AI agents: audits, campaign management, audiences and CAPI tracking.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/getmcpads-com/meta-ads-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server