# Meta Ads

An MCP server that connects your agent to Meta Ads API: read campaign stats, compare performance, change budgets and status.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: get-mcp-ads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/get-mcp-ads/meta-ads-mcp-server
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/get-mcp-ads-meta-ads

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `META_ACCESS_TOKEN`, `META_ENABLE_WRITES`, `META_API_VERSION` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-server
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [meta-ads](https://affpapa.org/en/nevibecode/skills/meta-ads.md) — skill · 2300 installs
- [meta-ads-creative](https://affpapa.org/en/nevibecode/skills/meta-ads-creative.md) — skill · ★ 4288 repo stars
- [pp-meta-ads](https://affpapa.org/en/nevibecode/skills/pp-meta-ads.md) — skill · 112 installs
- [meta-ads-strategy](https://affpapa.org/en/nevibecode/skills/meta-ads-strategy.md) — skill · 613 installs
- [ads-meta](https://affpapa.org/en/nevibecode/skills/ads-meta.md) — skill · 5500 installs
- [meta-ads-audit](https://affpapa.org/en/nevibecode/skills/meta-ads-audit.md) — skill · ★ 4288 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
