Skip to main content
Glama
openai-ads-mcp

openai-ads-mcp

by kopeli91
README.md
# openai-ads-mcp

A small, read-only OpenAI Ads (ChatGPT ads) MCP server for Claude Code.

OpenAI doesn't offer an official MCP for its ads platform, only Ads Manager and the Advertiser API (`https://api.ads.openai.com/v1`). This server wraps that API so Claude can read your campaigns and performance. It can't change anything in the account.

## Quick start with Claude Code

Clone the repo, open Claude Code in the folder, and say:

> Follow SETUP_PROMPT.md and set this up for me.

Using the **Claude Desktop** app instead of Claude Code? Follow [CLAUDE_DESKTOP.md](CLAUDE_DESKTOP.md).

## What's in here

| file | what it does |
|---|---|
| `CLAUDE_DESKTOP.md` | how to add the server to the Claude Desktop app |
| `SETUP_PROMPT.md` | the full setup guide, written as a prompt you can give Claude |
| `server.py` | the MCP server (one file) |
| `requirements.txt` | Python dependencies |

By default the API key lives in `~/.openai-ads/openai_ads.env`. To use a different folder, set `OPENAI_ADS_SECRETS_DIR`. Nothing secret is stored in this repo.

## Tools (read-only)

- `account` returns the ad account's name, status, timezone and currency
- `campaigns` returns every campaign with budget, dates and bidding, and can explain why a campaign isn't serving
- `ad_groups` and `ads` return the ad groups in a campaign and the ads (with creative) in an ad group
- `insights` returns impressions, clicks, spend, CTR, CPC, CPM and conversions. It defaults to the last 7 full days and can split by country, device, platform or product
- `conversions` splits conversions into click-through and view-through, with attributed sales
- `change_history` returns the account's change log, defaulting to the last 14 days
- `recommendations` returns OpenAI's own insights report for the account

The server has no create, update, pause or archive endpoints.