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-ads give 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: LinkedIn Ads MCP Server
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
Available Tools
15 toolsaccount_summaryAccount summaryARead-only
One-shot snapshot: account status, active campaigns with budgets and serving issues, and per-campaign performance for the last N days (default 7).
Inputs: last_n_days.
geo_lookupGeo lookupBRead-only
Search locations (cities, regions, countries) to get ids for campaign location targeting.
Inputs: query (required), limit.
get_adGet adBRead-only
Get full details of one ad, including creative, review and appeal status.
Inputs: ad_id (required), raw.
get_ad_accountGet ad accountARead-only
Get the ad account tied to the API key: name, URL, status, currency, timezone and brand/integrity review status. Money values in other tools are in this account's currency.
Inputs: no named parameters.
get_ad_groupGet ad groupCRead-only
Get full details of one ad group.
Inputs: ad_group_id (required), raw.
get_campaignGet campaignBRead-only
Get full details of one campaign, including targeting and serving issues.
Inputs: campaign_id (required), raw.
get_insightsGet performance insightsARead-only
Performance report (impressions, clicks, spend, CTR, CPC, CPM) for the ad account, broken down by campaign, ad group or ad. Date range: pass since/until (YYYY-MM-DD, inclusive, account timezone; until defaults to yesterday) or last_n_days (default 7, ending yesterday). Scope to one entity with campaign_id / ad_group_id / ad_id. Optional one-dimension segment: product, country, device, platform. Spend values are in account currency units (not micros). Today's attribution metrics are preliminary. Advanced: pass canonical fields like "campaign.roas", "ad.cpa", "country.name", filters and sort.
Inputs: sort, ad_id, after, level, +10 more.
get_spend_limitsGet spend limitsARead-only
Get the ad account's daily spend limit and dated spend-limit windows, with amounts spent and remaining.
Inputs: no named parameters.
list_ad_groupsList ad groupsBRead-only
List ad groups, optionally for one campaign, with bid strategy, max bid and context hints.
Inputs: name, after, limit, order, +1 more.
list_adsList adsCRead-only
List ads, optionally for one ad group, with creative text, review status and serving issues.
Inputs: name, after, limit, order, +1 more.
list_campaignsList campaignsBRead-only
List campaigns with status, budget (account currency), targeting countries and serving issues.
Inputs: name, after, limit, order.
list_conversion_setupList conversion setupBRead-only
List conversion pixels/sources and conversion event settings (event type, attribution window, linked campaigns).
Inputs: no named parameters.
list_product_feedsList product feedsBRead-only
List product feeds with countries, currencies, product and campaign counts.
Inputs: after, limit.
list_recent_conversion_eventsList recent conversion eventsARead-only
List recent raw conversion events received for a pixel/source. Useful to verify a pixel or Conversions API integration is firing.
Inputs: pixel_id (required), limit.
preview_adPreview adBRead-only
Render a preview of how an ad will look in ChatGPT. Does not change the ad.
Inputs: ad_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
The list_/get_ pairs map cleanly to distinct resources (campaigns, ad groups, ads, feeds), and geo_lookup/preview_ad are clearly unique. The main overlap is account_summary, which bundles account status, campaigns, and performance and thus partially duplicates get_ad_account, list_campaigns, and get_insights. One or two tools could be confused, but overall boundaries are clear.
Strong, predictable get_/list_ verb_noun pattern dominates (get_ad, list_campaigns, get_ad_group, list_conversion_setup). Deviations are minor: geo_lookup reverses to noun_verb and account_summary uses a noun_noun snapshot name, both still readable and recognizable.
15 tools is well within the sensible range and each one earns its place, covering account, campaigns, ad groups, ads, feeds, conversions, targeting, and reporting. No redundant or trivial tools inflate the set.
The surface is heavily read-oriented: rich list/get/preview and diagnostic coverage, but no create, update, pause, or budget-mutation operations for campaigns, ad groups, or ads, leaving write-side lifecycle workflows as dead ends. A user can inspect everything but cannot manage or change anything.
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.
Build, edit and sync Google, Microsoft, Reddit and Meta ad campaigns from your assistant.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceConnects 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-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to access, analyze, and manage LinkedIn advertising data, including campaigns, creatives, audiences, and conversions, with full create, update, and delete capabilities plus analytics via natural language.7 npm42MIT
- AlicenseBqualityCmaintenanceEnables Claude and other MCP-capable assistants to monitor and manage Google Ads accounts by pulling performance reports, running GAQL queries, adjusting budgets, pausing or enabling campaigns, adding keywords and negative keywords, and creating campaigns and ads, with preview and read-only safety controls.31Apache 2.0
- AlicenseNot gradedqualityCmaintenanceConnects Meta advertising accounts to AI assistants so users can query campaign performance, pull insights and metrics, and explore audiences and targeting options in natural language. It also allows creating, updating, and deleting campaigns, ad sets, ads, creatives, and lead forms, with new campaigns paused by default and write or destructive actions gated by admin permissions.MIT