
Openai Ads Mcp
io.github.HYPD-AI由 GitHub 帳號 HYPD-AI 發布v0.1.3更新於 Oct 24, 2026
Read-only MCP server for the OpenAI Ads API: campaigns, ad groups, ads, and insights.
概覽
唯讀 MCP 伺服器,讓助理查詢 OpenAI Ads 的廣告帳戶、廣告活動、廣告群組、廣告與成效資料。
- 可以做什麼
- 查詢目前金鑰綁定的廣告帳戶並確認連線狀態,列出或取得單一廣告活動與廣告群組,包含預算、定向與出價設定,列出或取得廣告及其素材與審核狀態,依日期區間取得帳戶、廣告活動、廣告群組或單一廣告的成效資料,支援每日或彙總粒度、欄位選擇、排序、篩選與游標分頁,並原樣回傳 API 的 JSON,同時呈現 HTTP 狀態碼與錯誤內容。
- 適用情境
- 適合用自然語言向助理詢問 OpenAI Ads 的投放狀況,例如進行中的廣告活動與預算、某段期間的花費、點擊與點擊率,或哪些廣告仍在審核中,而不必開啟廣告後台。
- 執行需求
- 以 stdio 方式在本機執行,通常透過 npx 啟動,需要 Node.js 20 或更新版本。需要 OpenAI Ads API 金鑰,透過環境變數 OPENAI_ADS_API_KEY 提供;每把金鑰僅對應一個廣告帳戶,帳戶目前僅限美國。需要能連線至 OpenAI Ads API 的網路;可選用 OPENAI_ADS_BASE_URL 覆寫端點位址。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Openai Ads Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
openai-ads-mcp
A Model Context Protocol (MCP) server for the OpenAI Ads (Advertiser) API. It lets MCP-compatible clients — Claude Desktop, Cursor, VS Code, and others — read your OpenAI Ads campaigns, ad groups, ads, and performance insights through natural language.
[npm] [CI] [License: MIT] [Node] [MCP]
Read-only. This first release only reads data — it never creates, edits, or pauses anything and never spends budget. Write actions are on the roadmap.
Unofficial. This is a community project and is not affiliated with or endorsed by OpenAI. See the disclaimer.
Overview
The OpenAI Ads API exposes an advertiser's account, campaigns, ad groups, ads, and reporting. This server wraps the read endpoints of that API as MCP tools so an AI assistant can answer questions like:
- "Is my OpenAI Ads API key working? What account is it tied to?"
- "List my active campaigns and their budgets."
- "Show spend, clicks, and CTR for campaign
cmp_123over the last 30 days, by day." - "Which ads in ad group
adg_456are still pending review?"
Features
- 11 read-only tools covering the account, campaigns, ad groups, ads, and insights at every level.
- Faithful responses — the API's JSON is returned as-is, so nothing is lost in translation.
- Clear errors — HTTP status and the API error body are surfaced to the model instead of being swallowed.
- Micros-aware — every tool description explains the micros convention so the assistant can present human-readable currency.
- Cursor pagination passthrough (
limit,order,after,before). - Zero-install via
npx—npx -y @hypd-ai/openai-ads-mcp, no clone or build.
Tools
Insights tools accept since/until (YYYY-MM-DD) for the reporting window, plus time_granularity (daily/none), aggregation_level, fields, sort, filters, limit (1–10000), and after/before cursors.
Prerequisites
- Node.js 20 or newer.
- An OpenAI Ads API key. Create an Ads account at ads.openai.com (currently US-only), then issue a key from Settings → ads.openai.com/settings. See the quickstart and authentication docs. Each key is scoped to a single ad account.
Installation & configuration
MCP clients launch the server as a subprocess and pass your API key via an environment variable.
Published on npm as
@hypd-ai/openai-ads-mcp—npxfetches it for you, so there's nothing to clone or build. To run the latest unreleasedmaininstead, replace@hypd-ai/openai-ads-mcpwithgithub:HYPD-AI/openai-ads-mcp(its first launch builds from source — see Running from source).
Add the snippet for your client below.
Claude Desktop
Edit your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop, then ask: "Use the openai-ads tools to look up my ad account."
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
VS Code
Add to .vscode/mcp.json. VS Code can prompt for the key and store it as a secret via inputs:
Other MCP clients
Any client that speaks MCP over stdio works. Run npx -y @hypd-ai/openai-ads-mcp (or node /path/to/dist/index.js) with OPENAI_ADS_API_KEY set in the environment.
Configuration
See .env.example.
A note on "micros"
Fields whose names end in _micros — for example a campaign's lifetime_spend_limit_micros or an ad group's max_bid_micros — are expressed in micros:
So a lifetime_spend_limit_micros of 25000000 is $25.00. Divide a _micros value by 1,000,000 to display a human amount, or multiply by 1,000,000 to convert the other way.
Insights metrics are not micros. Reporting values like
spend,cpc, andcpmare already in the account's currency as decimals (e.g.spend: 42.75means $42.75).
Read-only by design
This release registers only read (GET) tools — and each one is annotated with the MCP readOnlyHint, so well-behaved clients know it cannot mutate state. There is no tool here that can create, edit, pause, or delete anything, and nothing that can spend budget. Write actions will arrive as a deliberate, separately reviewed step (see Roadmap).
Running from source
Then point your MCP client at the built entry file:
Try it with the MCP Inspector
Development
Project layout:
How tools map to the API
All endpoints are under the base URL (default https://api.ads.openai.com/v1).
Roadmap
- ✍️ Write actions — create & update (via
POST) campaigns, ad groups, and ads, plus the dedicated state transitions (POST .../activate,.../pause,.../archive). The HTTP client already supportsPOST; these will be gated behind an explicit opt-in, since they change delivery and spend. - 🖼️ Creative uploads —
POST /upload(JSONimage_urlormultipart/form-data) to attach images to ad creatives. - 🌍 Campaign targeting — country include/exclude (
targeting.locations.countries). - 📈 Conversions API support.
- 🌐 Remote/HTTP transport for hosted deployments.
- 📦 Published npm release so
npx -y openai-ads-mcpworks out of the box.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md. In short: open an issue to discuss substantial changes, keep npm run lint && npm run typecheck && npm test green, and add tests for new behavior.
Disclaimer
This is an unofficial, community-built project. It is not affiliated with, endorsed by, or sponsored by OpenAI. "OpenAI" and related names and logos are trademarks of OpenAI. Your use of the OpenAI Ads API through this tool is subject to OpenAI's terms and policies. The tool is provided "as is", without warranty of any kind — see the license.
License
MIT © HYPD AI
來源:README.md,提交 d96ee62
工具
0版本歷史
1- v0.1.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分