climent-meta-ads-mcp
Provides read-only access to the Meta Marketing API for ad accounts, account summaries, campaigns, ad sets, ads and creative copy, plus performance insights and breakdowns by age, gender, country, platform or placement.
Click on "Deploy 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., "@climent-meta-ads-mcp Show me my Facebook ad spend and ROAS for the last 30 days."
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.
climent-meta-ads-mcp
A free, open-source, read-only MCP server for the Meta Marketing API (Facebook and Instagram ads). Ask Claude, Cursor or any MCP client about your campaigns, ad sets, ads and audiences, using your own Meta token, on your own machine.
Node.js, runs with
npx. No Python, no Docker.Read-only by construction: the only HTTP method in the code is
GET. Meta writes withPOSTandDELETE; neither exists here.Same tool vocabulary as its sibling
climent-google-ads-mcp(*_list_accounts,*_account_summary,*_campaigns,*_ads...), with the same metric names (spend,ctr,cpc,roas).Open source under Apache-2.0. No telemetry. We never receive your data.
Marketing API version: v25.0 by default, set in src/constants.js; newer versions (v26.0, v27.0) are one environment variable away. The default API version, the authentication (Authorization header plus appsecret_proof) and the fields this server asks for mirror an integration that has called the live Meta API every day in production (as of 2026-12-04).
Quickstart
You need Node.js 20 or newer and one value: a Meta access token with the ads_read permission. If you do not have one yet, follow Credentials first (about 10 minutes).
Claude Desktop
Edit claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"meta-ads": {
"command": "npx",
"args": ["-y", "github:Manucliment/climent-meta-ads-mcp"],
"env": {
"META_ACCESS_TOKEN": "your-system-user-token",
"META_APP_SECRET": "your-app-secret"
}
}
}
}META_APP_SECRET is optional (see below). On Windows, if Claude Desktop cannot find npx, use "command": "cmd" and "args": ["/c", "npx", "-y", "github:Manucliment/climent-meta-ads-mcp"].
Claude Code
claude mcp add meta-ads -e META_ACCESS_TOKEN=... -- npx -y github:Manucliment/climent-meta-ads-mcpTo keep the token out of your shell history, put the block above in a project .mcp.json and reference an environment variable ("META_ACCESS_TOKEN": "${META_ACCESS_TOKEN}").
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (project) takes the same mcpServers block as Claude Desktop.
Any other MCP client
Run npx -y github:Manucliment/climent-meta-ads-mcp as a stdio server with the environment variables below. Or run it over HTTP (next section).
Environment variables
Variable | Required | What it is |
| yes | A system user token (recommended) or a long-lived user token with |
| no | Your app secret. If set, every call is signed with |
| no | Graph API version to call, as |
The token is sent in the Authorization header, never in a URL. The server reads only these variables: no .env files, keychains or files on disk.
Related MCP server: Meta Ads MCP Server
Self-host over HTTP
For remote clients, or to share one server with a team, run the Streamable HTTP transport. It refuses to start without a bearer token.
export MCP_HTTP_BEARER_TOKEN="$(openssl rand -hex 32)" # at least 32 characters
export META_ACCESS_TOKEN=...
npx -y github:Manucliment/climent-meta-ads-mcp http
# MCP endpoint: http://127.0.0.1:3000/mcpMCP_HTTP_HOST(default127.0.0.1) andMCP_HTTP_PORT(default3000) control where it listens.GET /healthzanswers{"ok":true}without auth and without data.Every request to
/mcpmust sendAuthorization: Bearer <MCP_HTTP_BEARER_TOKEN>; anything else gets401.The server speaks plain HTTP. Before exposing it to the internet, put it behind HTTPS (Caddy, nginx, a cloud load balancer).
Whoever has the bearer token can read every ad account your Meta token can read. Treat it like the Meta token.
Claude Code example: claude mcp add --transport http meta-ads https://your-host/mcp --header "Authorization: Bearer <token>".
ChatGPT and other remote clients can only talk to MCP servers over HTTP(S), so they need this mode. Some of them only support OAuth or no authentication for custom connectors, not a static bearer header. Check what your client supports; if it cannot send an Authorization header, put the server behind a proxy you control that adds it, and never expose it without authentication.
Credentials, step by step
Everything below happens in your own Meta accounts. Nothing is shared with us. Screens and labels in Meta's tools change often; the names below were current when this was written.
1. A Meta app with the Marketing API
Go to developers.facebook.com/apps and create an app. Choose the use case for creating and managing ads with the Marketing API, and connect it to your business portfolio (Business Manager).
Adding the Marketing API gives the app the Limited access tier automatically. That is enough to read your own ad accounts (see limits below).
In App settings > Basic, copy the App secret if you want to use
META_APP_SECRET.
2. A system user and its token (recommended)
A system user is a non-human user of your business. Its token is not tied to your personal login and can be set to never expire.
Open business.facebook.com/settings > Users > System users > Add. A regular (employee) role is enough.
Assign assets: pick the ad accounts this server may read and give view performance access only. Read-only access is all it needs.
Generate new token: choose your app, choose an expiry (never, or 60 days), and select the permission
ads_read. Nothing else is needed.Copy the token into
META_ACCESS_TOKEN. Meta shows it once.
What the permission is for:
Permission | Needed? | What it allows |
| yes | Read ad accounts, campaigns, ad sets, ads, creatives and insights. This server uses nothing else |
| no | Create and edit ads. This server never writes, so do not grant it |
| no | Manage business assets and users. Not used |
3. Alternative: a long-lived user token
If you cannot create a system user: in the Graph API Explorer pick your app, generate a User token with ads_read, then paste it into the Access Token Debugger and click Extend Access Token. It lasts about 60 days, and stops working if you change your password. You will have to renew it.
4. Access tiers and limits: the honest part
Meta grants the Marketing API in two tiers (Authorization):
Tier | How you get it | What it means here |
Limited access (default) | Automatic when you add the Marketing API | Works for ad accounts your own business owns. Meta describes it as for development and heavily rate-limited per ad account. Allows 1 system user |
Full access | At least 500 Marketing API calls in 15 days, an error rate under 15%, and App Review | Lightly rate-limited. Allows 10 system users |
Separately, Meta's docs say that managing your own ad accounts needs only standard access to ads_read, while managing other people's ad accounts needs advanced access to ads_read, which goes through App Review. If you are an agency reading client accounts shared with your business, you may hit this: if those accounts return permission errors while your own work, this is the likely reason. We have not measured where Meta draws the line for partner-shared accounts.
In practice: for conversational use on your own accounts, the default tier is fine. If you see rate-limit errors, wait a few minutes, ask for fewer rows or a shorter date range.
Tools
All tools are read-only. Dates are a preset (today, yesterday, last_7d, last_14d, last_30d, this_month, last_month; the default is last_30d, and last_N excludes today) or since + until as YYYY-MM-DD, in the ad account time zone. Money is in the account currency, named in every response (currency); budgets are converted from Meta's minor units. Lists are capped (max_rows, default 50) and say "truncated": true when there is more.
Every performance row has spend, impressions, reach, frequency, clicks, link_clicks, ctr, cpc, cpm, purchases, purchase_value, cost_per_purchase, roas, leads, cost_per_lead and the main raw actions.
Tool | What it returns | Example prompt |
| Ad accounts the token can read (name, currency, time zone, status) | "Which Meta ad accounts can you see?" |
| Account totals for a date range | "How did act_1234567890 do last month? What was the ROAS?" |
| Campaigns with status, objective, budget and performance, sorted by spend | "Which campaigns spent the most in the last 7 days, and at what cost per purchase?" |
| Ad sets with status, optimization goal, budget and performance, optionally for one campaign | "Compare the ad sets of campaign 120000000000000001 this month." |
| Ads with creative title, body text, link, call to action, thumbnail URL and performance | "Show the copy of my five best and five worst ads by CPA." |
| Performance split by | "Where did my spend go by placement last week, and which placement had the best CTR?" |
Notes on Meta data, also returned inside the responses:
purchasesandleadsuse Meta's deduplicatedpurchaseandleadaction types. The raw action types overlap (purchase,omni_purchase,offsite_conversion.fb_pixel_purchase); do not add them up.thumbnail_urlis a temporary signed link from Meta's CDN and expires.Reach does not add up across breakdown rows, and Meta may withhold or model some breakdown values for privacy.
Privacy
It runs on your machine (or your server) and talks only to
graph.facebook.com.No telemetry, no analytics, no phone-home. We (Climent Media) receive nothing: no data, no usage counts, no errors.
Tokens are never logged. Error messages pass through a redaction step that removes your token, your app secret and anything shaped like a Meta or Google token.
Your MCP client (Claude, Cursor...) does see the data the tools return, under that client's own privacy terms.
Limits
Read-only. It cannot pause ads, change budgets, edit audiences or create anything. Ask it and the model will tell you it can't, and how to do it in Ads Manager.
One token per server, so one set of ad accounts.
Defaults to Marketing API v25.0, not the newest, because that is the version proven in production with these exact requests. On 2026-12-04 Meta's Marketing API changelog lists v25.0 as available until 23 February 2027 (the Graph API changelog says TBD). Set
META_GRAPH_API_VERSION=v27.0before then; the next release will move the default.Large accounts: lists return one page (up to
max_rows) and say when they are truncated. Very long date ranges on big accounts can hit Meta's "reduce the amount of data" error; shorten the range.This package's own test suite mocks every request; it has not itself been run against the live API. The default API version, the authentication (Authorization header plus
appsecret_proof) and the fields this server asks for mirror an integration that has called the live Meta API every day in production (as of 2026-12-04). Please report anything that behaves differently.
Need more?
This server is a good way to look. When you want to act:
Climent Ads is our hosted product: no Meta app or token of your own, Meta Ads and Google Ads for many clients in one place, account audits, and changes to campaigns that a human approves before they are applied.
Climent Media is the agency behind it, if you would rather have people run your ads.
Develop
npm install
npm test # node:test, every API call mocked, no credentials needed
node bin/cli.js --helpLicense
Apache-2.0. See LICENSE. Not affiliated with or endorsed by Meta. Facebook, Instagram and Meta are trademarks of Meta Platforms, Inc.
Available Tools
6 toolsmeta_account_summaryMeta ad account summaryBRead-onlyIdempotent
Totals for one Meta ad account over a date range: spend, impressions, reach, frequency, clicks, link clicks, CTR, CPC, CPM, purchases, purchase value, ROAS, leads and the main action types, in the account currency.
Inputs: account_id (required), since, until, preset.
meta_adsMeta ads with creative and performanceARead-onlyIdempotent
Ads of one Meta ad account (optionally one campaign or ad set) with status, creative title, body text, link, call to action, thumbnail URL and performance for a date range, sorted by spend.
Inputs: account_id (required), since, until, preset, +4 more.
meta_ad_setsMeta ad sets with performanceARead-onlyIdempotent
Ad sets of one Meta ad account (optionally one campaign) with status, optimization goal, budget and performance for a date range, sorted by spend.
Inputs: account_id (required), since, until, preset, +3 more.
meta_campaignsMeta campaigns with performanceARead-onlyIdempotent
Campaigns of one Meta ad account with status, objective, budget and performance for a date range, sorted by spend. Money in the account currency.
Inputs: account_id (required), since, until, preset, +2 more.
meta_insights_breakdownMeta insights by age, gender, country, platform or placementBRead-onlyIdempotent
Performance of one Meta ad account split by a breakdown (age, gender, age_gender, country, region, platform, placement) for a date range, at account, campaign, ad set or ad level, sorted by spend.
Inputs: breakdown (required), account_id (required), level, since, +5 more.
meta_list_accountsList Meta ad accountsARead-onlyIdempotent
List the Meta ad accounts the access token can read, with name, currency, time zone and status.
Inputs: max_rows.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool maps to a distinct level of the Meta hierarchy (account, campaign, ad set, ad) or a distinct aggregation mode (summary totals vs. dimensional breakdown), so misselection is unlikely. There is mild overlap between meta_account_summary and meta_insights_breakdown or the per-level performance fields, but the descriptions make the boundary clear.
All tools share a consistent meta_ prefix and resource-oriented naming, which reads predictably. The verb style deviates slightly (meta_list_accounts uses a verb, while meta_account_summary and meta_campaigns are noun forms), but the pattern remains readable.
Six tools is well-scoped for a read-only Meta Ads reporting server: one per hierarchy level, plus account listing, summary, and breakdown. Nothing appears redundant or padded.
The surface covers the core reporting lifecycle from account discovery through campaign/ad set/ad performance and dimensional breakdowns, with no obvious dead ends for analysis. Minor gaps exist, such as no daily/time-series trend option and no creative preview beyond a thumbnail URL.
Maintenance
Related MCP Connectors
Meta Ads MCP server: run Facebook and Instagram campaigns, ad sets, ads and reports from AI.
Hosted Meta Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MCP server for marketing agencies: connect Google Ads, GA4, Search Console, Meta, LinkedIn and more to Claude or ChatGPT. Pull reports and make changes via OAuth login, no setup.
Analyze, edit and launch Meta (Facebook and Instagram) ads from Claude, ChatGPT, Cursor or Codex. Query insights and campaign health, change budgets, bids, status and targeting with undo, bulk-launch many ads across campaigns and ad sets from a live ad's settings, and duplicate by post to keep social proof. Choose per ad account what the agent may do and what waits in the Agent Inbox for approval. Requires a paid Ads Uploader account with MCP access.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server that lets AI assistants run your Meta Ads end to end — launch campaigns, upload creatives, update budgets, and dig into performance through natural conversation. Works across Facebook, Instagram, and other Meta surfaces.Business Source 1.1
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for managing and analyzing Meta Ads (Facebook/Instagram) with over 80 natural-language tools for AI agents like Claude Desktop.-
- AlicenseAqualityNot gradedmaintenanceMCP server to manage Meta Ads (Facebook/Instagram) campaigns, ad sets, insights, and audiences from Claude Code using natural language.9MIT
- AlicenseAqualityDmaintenanceMCP Server for the Meta Marketing API. Gives Claude Desktop direct access to your ad account data — campaign performance, creative analysis, audience breakdowns, and budget pacing.101MIT