Meta Ads — Claude Code MCP server: what it does, how to install
An MCP server that connects your agent to Meta Ads API: read campaign stats, compare performance, change budgets and status.
Apache-2.0 updated 2026-10-23
claude mcp add --env META_ACCESS_TOKEN=<META_ACCESS_TOKEN> --env META_ENABLE_WRITES=<META_ENABLE_WRITES> --env META_API_VERSION=<META_API_VERSION> --transport stdio get-mcp-ads-meta-ads -- npx -y @getmcpads/meta-ads-mcp-serverWhat Meta Ads does
The server provides 42 read tools (campaigns, ad sets, ads, creatives, audiences, pixels, catalogs, Pages, A/B tests, activity logs) and 24 write tools — disabled by default, each change shows a preview before it applies. The agent can request 190 metrics, including derived ones (ROAS, CPA, frequency), and group data by 56 breakdowns and 90 dimensions. A compatibility matrix validates combinations before sending the request.
The server runs locally, requests go directly to the platform API via the META_ACCESS_TOKEN. Node.js version 22.23.4 or later on line 22, 24.22.1 or later on line 24, or 26.12.1 or later is required — these releases carry the October 2026 security fixes. Write tools are enabled by setting META_ENABLE_WRITES=true; without it, only read operations are available.
What it helps with
- compare campaign performance by ROAS and CPA over a period
- check ad delivery status and rejection reasons
- change ad set budget or schedule after previewing the change
- fetch metrics grouped by age, gender and device
- rename a campaign or create a new one with specified parameters
Example prompts for the agent
- Show all active campaigns in the account and their spend for the last 7 days
- Compare CTR and conversions across ad sets in campaign
<id>, broken down by platform - Change the daily budget of ad set
<adset_id>to 150 dollars — show me the preview first
How to install Meta Ads
Platform CLI
claude mcp add --env META_ACCESS_TOKEN=<META_ACCESS_TOKEN> --env META_ENABLE_WRITES=<META_ENABLE_WRITES> --env META_API_VERSION=<META_API_VERSION> --transport stdio get-mcp-ads-meta-ads -- npx -y @getmcpads/meta-ads-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add get-mcp-ads-meta-ads --env META_ACCESS_TOKEN=<META_ACCESS_TOKEN> --env META_ENABLE_WRITES=<META_ENABLE_WRITES> --env META_API_VERSION=<META_API_VERSION> -- npx -y @getmcpads/meta-ads-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"get-mcp-ads-meta-ads": {
"command": "npx",
"args": [
"-y",
"@getmcpads/meta-ads-mcp-server"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>",
"META_ENABLE_WRITES": "<META_ENABLE_WRITES>",
"META_API_VERSION": "<META_API_VERSION>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"get-mcp-ads-meta-ads": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@getmcpads/meta-ads-mcp-server"
],
"env": {
"META_ACCESS_TOKEN": "<META_ACCESS_TOKEN>",
"META_ENABLE_WRITES": "<META_ENABLE_WRITES>",
"META_API_VERSION": "<META_API_VERSION>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e META_ACCESS_TOKEN=<META_ACCESS_TOKEN> -e META_ENABLE_WRITES=<META_ENABLE_WRITES> -e META_API_VERSION=<META_API_VERSION> get-mcp-ads-meta-ads npx -y @getmcpads/meta-ads-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Meta Ads
How to install Meta Ads in Claude Code?
Run claude mcp add meta-ads -e META_ACCESS_TOKEN=<META_ACCESS_TOKEN> -- npx -y @getmcpads/meta-ads-mcp-server. Get the Meta access token from your app settings at developers.facebook.com.
What does Meta Ads do?
Gives the agent access to Meta Ads API: read campaign, ad and creative stats, change budgets, status and schedule, create campaigns. Write tools are disabled by default and show a preview before each change.
Which Node.js version does Meta Ads require?
Version 22.23.4 or later on line 22, 24.22.1 or later on line 24, or 26.12.1 or later. On an older version the server starts with a warning on stderr.