mcp-openai-ads
Integrates with the OpenAI Ads (ads in ChatGPT) Advertiser API to read account data and OpenOptional: manage advertising campaigns. Provides tools for account summaries, performance insights with date ranges and segments, spend limits, campaigns, ad groups, ads, creative previews, product feeds, conversion setup and events, and geo lookup, plus optional write tools to create/update entities and upload images when writes are enabled.
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., "@mcp-openai-adsgive me a summary of my ChatGPT Ads account for the last 14 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.
mcp-openai-ads
An open-source Model Context Protocol (MCP) server for the OpenAI Ads (ads in ChatGPT) Advertiser API.
It lets an AI assistant such as Claude Desktop, Claude Code, Cursor or VS Code read your ChatGPT Ads account, report on performance and, if you allow it, manage campaigns, ad groups and ads.
Community project by PPC Blog Pro. Not affiliated with or endorsed by OpenAI.
Features
Read-only by default. Write tools are only registered when you set
OPENAI_ADS_ALLOW_WRITES=true.Dry run first. Every write returns a preview until it is called again with
confirm: true, and updates report a before/after diff.New entities start paused, so nothing spends money until you activate it.
Money in plain currency units. You say
daily_budget: 50and the server converts it to the API's micros.Compact markdown tables, which keep token use low.
Retries with backoff on 429 and 5xx responses, respecting
Retry-After. Create calls send anIdempotency-Key.
Related MCP server: Ads Analytics MCP
Tools
Tool | What it does |
| Account status, campaigns, budgets, serving issues and performance for the last N days |
| Performance report by account, campaign, ad group or ad. Supports date ranges, daily/hourly/monthly granularity, segments (country, device, platform, product), filters and sort |
| Account details, currency, timezone and brand review status |
| Daily limit and spend-limit windows, with amounts spent and remaining |
| Campaigns with budgets, targeting and serving issues |
| Bid strategy, max bid and context hints |
| Creative, review status and a rendered preview |
| Product feeds and their product and campaign counts |
| Pixels and conversion event settings |
| Recent raw events, to check that a pixel is firing |
| Location ids for targeting |
Write tools (require OPENAI_ADS_ALLOW_WRITES=true):
Tool | What it does |
| Activate, pause or archive a campaign, ad group or ad |
| Create a campaign, or change its budget, schedule or targeting |
| Create an ad group, or change its context hints or bidding |
| Create an ad, or change its creative (a changed creative goes back to review) |
| Upload a creative image from a local file or a URL |
Prompts: weekly_performance_review, find_underperformers, diagnose_not_serving.
Setup
1. Get an API key
Open OpenAI Ads Manager, then go to Settings.
Create an Advertiser API key. It is tied to one ad account.
See OpenAI's Advertiser API overview for details.
2. Add the server to your MCP client
Requires Node.js 20 or later.
Claude Desktop: edit claude_desktop_config.json:
{
"mcpServers": {
"openai-ads": {
"command": "npx",
"args": ["-y", "mcp-openai-ads"],
"env": {
"OPENAI_ADS_API_KEY": "your-advertiser-api-key"
}
}
}
}On Windows, if npx isn't found, use "command": "cmd" and "args": ["/c", "npx", "-y", "mcp-openai-ads"].
Claude Code:
claude mcp add openai-ads -e OPENAI_ADS_API_KEY=your-key -- npx -y mcp-openai-adsCursor: use the same JSON as Claude Desktop, in ~/.cursor/mcp.json.
VS Code: add this to .vscode/mcp.json:
{
"servers": {
"openai-ads": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-openai-ads"],
"env": { "OPENAI_ADS_API_KEY": "${input:openaiAdsKey}" }
}
},
"inputs": [{ "id": "openaiAdsKey", "type": "promptString", "description": "OpenAI Ads API key", "password": true }]
}Configuration
Variable | Default | Description |
| (required) | Advertiser API key |
|
| Set to |
|
| Maximum report rows returned per call |
|
| Override the API base URL |
Example prompts
"Give me a summary of my ChatGPT Ads account for the last 14 days."
"Show daily clicks and spend for campaign Fall Sale this month, split by device."
"Which ads have the lowest CTR? Suggest better copy."
"Why isn't my new campaign serving?"
(with writes enabled) "Raise the daily budget of Fall Sale to 80 and show me the change before applying it."
Safety notes
The API key has full access to its ad account. Keep it in your MCP client's
envblock, never in a repo.The server logs only to stderr and never logs the key.
Leave writes disabled unless you need them. When they are enabled, your AI client should still ask before calling a tool with
confirm: true.
Releasing (maintainers)
Bump
versionin bothpackage.jsonandserver.json(a test enforces that they match), and updateCHANGELOG.md.Commit, then
git tag vX.Y.Z && git push --tags.The Release workflow publishes to npm and to the MCP Registry as
io.github.dienhokhanh/mcp-openai-ads.
Development
npm install
npm run build
npm test
npm run inspect # opens the MCP Inspector against dist/index.jsTo run from source in a client, point it at node /path/to/repo/dist/index.js.
The API client is in src/client.ts, and tools live in src/tools/ as read.ts, insights.ts and write.ts. The OpenAI Ads API is new, so if an endpoint changes, please open an issue or PR.
Author
Built and maintained by PPC Blog Pro, which publishes PPC and paid-ads guides, tips and tools.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Run Google Ads and Meta Ads from ChatGPT or Claude: audit wasted spend, create and manage campaigns.
Connect authorized ad accounts to AI assistants for audits, reporting, and approval-gated changes.
OpenAI Ads MCP for ChatGPT Ads campaigns, creatives, audiences, insights, and conversions.
Run Google, Meta, Microsoft, TikTok and LinkedIn Ads from Claude or ChatGPT. Writes need approval.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to manage Google Ads accounts by providing tools for querying account data and performing write operations such as updating campaign budgets, statuses, and bidding strategies.2Apache 2.0
- AlicenseAqualityDmaintenanceProvides read access to campaign performance data from Google Ads, Meta Ads, and TikTok Ads via live API calls, enabling AI assistants to analyze and audit advertising campaigns.162MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage OpenAI Ads campaigns, ad groups, creatives, custom audiences, conversion tracking via web pixel and CAPI, and run tracking audits through the OpenAI Ads Advertiser API.4382 npmMIT
- FlicenseNot gradedqualityBmaintenanceConnects AI assistants to Google Ads, Meta Ads, ChatGPT Ads, TikTok Ads and LinkedIn Ads so users can query live campaign performance, budgets and audiences in the account's own currency and prepare changes as proposals that only take effect after explicit approval. Reads run immediately, while every write is staged as an approvable proposal with before/after values, and newly created campaigns, ad sets and ads start paused.1-