Metadata-Version: 2.4
Name: meta-ads-mcp-server
Version: 0.1.0
Summary: Model Context Protocol server exposing the Meta Ads Graph API — 300+ tools for Facebook & Instagram Ads.
Author: Matt Yu
License: MIT
Project-URL: Homepage, https://github.com/mattyu-dev/mcp-meta
Project-URL: Repository, https://github.com/mattyu-dev/mcp-meta
Project-URL: Documentation, https://github.com/mattyu-dev/mcp-meta/tree/main/docs
Project-URL: Bug Tracker, https://github.com/mattyu-dev/mcp-meta/issues
Keywords: mcp,meta,facebook,instagram,ads,graph-api,marketing,model-context-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.26.0
Requires-Dist: httpx[http2]>=0.27.0
Requires-Dist: pydantic>=2.6
Requires-Dist: pydantic-settings>=2.2
Requires-Dist: python-dotenv>=1.0
Requires-Dist: anyio>=4.3
Requires-Dist: redis>=5.0.0
Requires-Dist: prometheus-client>=0.19.0
Requires-Dist: pyjwt[crypto]>=2.9.0
Requires-Dist: opentelemetry-api>=1.22.0
Requires-Dist: opentelemetry-sdk>=1.22.0
Requires-Dist: opentelemetry-exporter-otlp>=1.22.0
Provides-Extra: dev
Requires-Dist: pytest>=8.1; extra == "dev"
Requires-Dist: respx>=0.20; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: ruff>=0.3; extra == "dev"

# meta-ads-mcp-server

> MCP server for the Meta Marketing API (Facebook & Instagram Ads) — 300+ tools.

[![PyPI](https://img.shields.io/pypi/v/meta-ads-mcp-server)](https://pypi.org/project/meta-ads-mcp-server/)
[![Python](https://img.shields.io/pypi/pyversions/meta-ads-mcp-server)](https://pypi.org/project/meta-ads-mcp-server/)
[![License](https://img.shields.io/pypi/l/meta-ads-mcp)](https://github.com/mattyu-dev/mcp-meta/blob/main/LICENSE)

## Install

### Option 1: uvx (zero install, recommended)

Add this to your MCP client config (e.g. Claude Desktop's `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "meta-ads": {
      "command": "uvx",
      "args": ["meta-ads-mcp-server"],
      "env": {
        "META_ACCESS_TOKEN": "YOUR_TOKEN",
        "META_DEFAULT_AD_ACCOUNT_ID": "act_YOUR_ACCOUNT_ID"
      }
    }
  }
}
```

### Option 2: pip install

```bash
pip install meta-ads-mcp-server
```

Then add to your MCP client config:

```json
{
  "mcpServers": {
    "meta-ads": {
      "command": "meta-ads-mcp",
      "env": {
        "META_ACCESS_TOKEN": "YOUR_TOKEN",
        "META_DEFAULT_AD_ACCOUNT_ID": "act_YOUR_ACCOUNT_ID"
      }
    }
  }
}
```

### Option 3: Interactive Setup Wizard

```bash
pip install meta-ads-mcp-server
meta-ads-setup
```

The wizard auto-detects your installed MCP clients (Claude Desktop, Cursor, VS Code, Windsurf, Gemini CLI) and configures them for you.

## Getting Your Meta Access Token

1. Go to [Meta Business Settings > System Users](https://business.facebook.com/settings/system-users)
2. Create or select a System User
3. Click **Generate New Token**
4. Select `ads_management` and `ads_read` permissions
5. Copy the token

## Licensing

**Free tier** (no key needed): 10 read-only tools — insights, campaign search, spend trends, business listing, and more. Enough to explore and evaluate.

**Pro tier** (license key): Unlocks all 300+ tools including campaign creation, audience management, optimization, fraud detection, and the full enterprise suite.

Add your license key to the MCP config:

```json
{
  "mcpServers": {
    "meta-ads": {
      "command": "uvx",
      "args": ["meta-ads-mcp-server"],
      "env": {
        "META_ACCESS_TOKEN": "YOUR_TOKEN",
        "META_DEFAULT_AD_ACCOUNT_ID": "act_YOUR_ACCOUNT_ID",
        "LICENSE_KEY": "YOUR_LICENSE_KEY"
      }
    }
  }
}
```

Contact the developer for a license key.

## What's Included

300+ tools covering campaigns, ad sets, ads, audiences, creative, insights, attribution, A/B testing, budget optimization, fraud detection, and much more.

[Full documentation](https://github.com/mattyu-dev/mcp-meta) | [Tool reference](https://github.com/mattyu-dev/mcp-meta/blob/main/docs/TOOLS.md)
