
Scaleforge Mcp Meta Ads
io.github.Mike25app由 GitHub 帳號 Mike25app 發布v0.2.3更新於 Oct 24, 2026
Meta Ads MCP by ScaleForge — control Facebook & Instagram Ads via Graph API v24.0. 32 tools.
概覽
在本機執行的 MCP 伺服器,包裝 Meta Graph API v24.0,讓助理讀取並管理 Facebook 與 Instagram 廣告帳戶、行銷活動、廣告組合、廣告與洞察資料。
- 可以做什麼
- 列出並檢視廣告帳戶、行銷活動、廣告組合、廣告、創意與粉絲專頁,包含各專頁的廣告數量餘額
- 建立、更新與硬刪除行銷活動、廣告組合和廣告,並依 object story spec 建立創意
- 透過遠端網址上傳圖片與影片,取得 image hash 與 video ID
- 依行銷活動、廣告組合與廣告層級取得含細分維度的洞察數據
- 透過 Meta Batch API 批次暫停、啟用與調整出價,並附廣告數量預檢
- 搜尋公開的 Meta 廣告檔案庫做競品研究,並取得或自動建立專頁綁定的 Instagram 帳號
- 適用情境
- 適合在桌面 MCP 用戶端中讓助理檢視或操作實際的 Meta 廣告:稽核帳戶與花費、取得分版位成效數據,或不必自行寫腳本就能批次調整狀態與出價。
- 執行需求
- 透過 npx 以 stdio 在本機執行(需 Node.js)。需在 META_ACCESS_TOKEN 環境變數提供 Meta 存取權杖,權限包含 ads_management、ads_read、business_management,涉及粉絲專頁時另需 pages_read_engagement 與 pages_manage_ads。需能連線 graph.facebook.com。長期使用建議採用 Business Manager 的 System User 權杖。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Scaleforge Mcp Meta Ads,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Meta Ads MCP by ScaleForge
Control Facebook & Instagram Ads from Claude, ChatGPT, Cursor, or any MCP-compatible agent.
Direct Meta Graph API v24.0 wrapper. 32 tools. No backend required — just bring your own Meta access token.
The problem
Meta's Marketing API is powerful but punishing. Anyone who's tried to automate Meta Ads has run into these five walls:
- Rate-limit whack-a-mole (error code #17). Your script hits
User request limit reachedhalfway through a launch and leaves campaigns in a half-configured state. Meta's per-account budget of calls resets over 5 minutes, but nothing in the API tells you that without context. - Token expiry chaos. User access tokens from the Graph API Explorer die every ~2 hours. You fix a bug, come back from lunch, and every request is suddenly
(#190) Error validating access token. - v22 → v24 deprecations (Sept 2025).
instagram_actor_id→instagram_user_id,degrees_of_freedom_specis gone entirely,asset_feed_idhas been deprecated since v3.1. Copy-pasted sample code from Stack Overflow breaks silently. - Image hashes are per-ad-account. An image uploaded on Account A cannot be used on Account B — you get
Image Not Foundon the second account. Video IDs are global, but image hashes are not. This trips up 100% of first-time multi-account automations. - The 250-ads-per-Page cap. Meta limits ads-running-or-in-review per Page (not per account) — and this limit is shared across every account using that Page. Overshoot and the 251st ad silently fails review.
The solution
This MCP is a thin, typed wrapper over Meta's Graph API with those five pains baked out:
- Auto-batch for bulk ops (
pause_campaigns_batch,activate_campaigns_batch,update_bids_batch) — up to 50 ops per HTTP request, chunked automatically. Sidesteps rate-limit code #17 for bulk work. - Pre-flight ads_volume check before every bulk activation — warns you when a Page is near the 250-ad cap, per ad account, before Meta silently fails the reviews.
- Enhanced error messages with actionable links — when your token expires or a rate limit fires, the MCP tells your agent exactly what to do (create a System User token, wait 5 min, etc.).
- v24.0 everywhere — current field names, no deprecated spec shapes.
- PBIA auto-provisioning (
get_pbia) — when a Page has no linked Instagram account, the MCP creates a Page-Backed Instagram Account on demand so IG placements work.
No ScaleForge backend is in the chain. Your agent → this MCP → https://graph.facebook.com/v24.0/*. That's it.
Hosted endpoint (no install)
Use the ScaleForge-hosted Streamable HTTP endpoint — zero install, nothing to run locally:
- Smithery listing:
https://smithery.ai/server/kirichyk-misha/meta-ads(one-click install for Claude Desktop, Cursor, Windsurf, Continue, ChatGPT Desktop — Smithery prompts for your Meta token, writes the config). - Direct URL for custom clients:
https://getscaleforge.com/mcp(MCP Streamable HTTP). Supply your token via Smithery session config orAuthorization: Bearer <token>header.
Prefer a local npm install? Use the stdio package below.
Quick start — pick one
Smithery (easiest, auto-configures the client)
Smithery will prompt you for the Meta access token and write the config file.
Claude Code CLI
Verify with claude mcp list.
Claude Desktop (manual JSON config)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or the Windows / Linux equivalent — Claude Desktop creates it if missing):
Restart Claude Desktop. The 32 tools appear under the hammer icon.
Cursor
Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):
Local test (no client setup)
The server starts on stdio. Poke it interactively with @modelcontextprotocol/inspector:
Architecture
The MCP is a thin, typed translation layer. It does not cache, does not proxy, does not phone home. Every call goes from your machine straight to Meta's servers with your token.
Get a Meta Access Token
You need an access token with ads_management, ads_read, business_management, and (for Page-scoped work like PBIA provisioning) pages_read_engagement + pages_manage_ads.
There are two kinds of tokens. Pick based on your use case.
Option 1 — Quick token (2 minutes, expires in ~2 hours)
Good for: trying the MCP, quick experiments, one-off scripts.
- Open the Graph API Explorer.
- In the User or Page dropdown, select User Token.
- Click Add a Permission and select:
ads_management,ads_read,business_management,pages_read_engagement,pages_manage_ads. - Click Generate Access Token and approve the dialog.
- Copy the token at the top. That's your
META_ACCESS_TOKEN.
The token expires in ~2 hours. When it dies, the MCP will return an enhanced error pointing you here.
Option 2 — Stable token (never expires)
Good for: production, scheduled jobs, anything you don't want to re-auth every 2 hours.
You generate a System User token inside Meta Business Manager. System User tokens have no expiry and can be scoped to specific assets (ad accounts + Pages). This is the same token type ScaleForge and every production Meta integration uses.
- Create a Facebook App (if you don't have one) at developers.facebook.com/apps. Any app works — Business type is fine.
- Create a Business Manager at business.facebook.com. You need this as the container for your System User.
- Add your ad accounts and Pages to the Business under Business Settings → Accounts → Ad Accounts / Pages. (If they're owned by another Business, request access.)
- Create a System User: Business Settings → Users → System Users → Add → name it (e.g.
mcp-meta-ads) → role Admin. [screenshot: Business Settings → Users → System Users tab with "Add" button] - Assign ad accounts to the System User: click the System User → Add Assets → pick Ad Accounts → select yours → turn on Manage permission. Repeat for Pages. [screenshot: Add Assets dialog with "Manage" toggle highlighted]
- Generate the token: click Generate New Token → select your Facebook App → pick scopes:
ads_managementads_readbusiness_managementpages_read_engagementpages_manage_adsread_insights(optional — needed for some insight breakdowns) [screenshot: Generate Token dialog with scopes checklist]
- Click Generate and copy the token. It never expires. Store it in a secret manager / env var / password manager.
Now use it:
If you revoke or regenerate later, the old token stops working immediately.
Baked-in pain point fixes
Tools reference
32 tools across 10 categories.
Accounts (3)
Campaigns (5)
Ad Sets (5)
Ads (4)
Creatives (4)
Media (2)
Insights (3)
Bulk (3)
Pages (2)
Ads Library (1)
Example prompts
Once the server is connected, try these in your agent.
Read-only
- "List my Meta ad accounts and show me which ones are active, currency, and spend cap."
- "For campaign
1234567890, pull last_14d insights with breakdown by placement — which placement has the lowest CPL?" - "Show me the ads_volume for account
act_555— any Page over 85% of its limit?" - "Search the Meta Ad Library for ads from Competitor X running in the US in the last month."
- "List all ad sets in campaign
ABCDand show which ones have is_dynamic_creative=true."
Write (confirm first)
Write operations change live Meta Ads state — spend starts or stops immediately. A well-behaved agent (Claude, GPT-4) will show you the target list and ask "proceed?" before calling these.
- "Pause campaigns
111,222,333— show me their names and current spend first, then pause." - "Activate campaigns
444and555. Run the ads_volume pre-flight first; if any Page is over 85%, abort and tell me which." - "Bump the bid on ad sets
6001and6002to $4.50. Convert to cents for me." - "Create a new campaign in
act_777called 'Spring Promo Test', OUTCOME_LEADS objective, daily_budget 5000 cents, PAUSED."
FAQ
How do I get a Meta access token?
See Get a Meta Access Token above. Two options: quick 2-hour token (Graph API Explorer) or stable System User token (Business Manager, never expires).
Why does my token keep expiring?
You're using a User access token from the Graph API Explorer. Those expire in ~2 hours by design. For anything beyond experimentation, generate a System User token via Business Manager — those never expire. Full steps here.
What's ads_volume?
Meta limits how many ads can be "running or in review" per Facebook Page — default 250 — and this limit is shared across every ad account using that Page. The get_ads_volume tool shows you how much headroom each Page has. activate_campaigns_batch calls it automatically as a pre-flight check.
Is this free?
Yes. MIT license, npm package is free. You pay Meta for ads as usual. There is no ScaleForge account or subscription needed to use this MCP.
How does this compare to Pipeboard / other MCPs?
- Pipeboard / hosted MCPs — run on their server, you send your token to them, they rate-limit you. Fine for very light usage, but the token lives on someone else's machine.
- This MCP — runs locally, your token never leaves your box, direct path to Meta. 32 tools (more coverage than any other Meta MCP we've seen).
- ScaleForge managed platform (see below) — a separate product for teams that want managed Meta access, RedTrack integration, scheduled auto-rules, UI dashboards. This MCP is a standalone tool that does not depend on it.
Can I use this without ScaleForge?
Yes. This MCP is a standalone npm package — it talks straight to graph.facebook.com. No account anywhere.
Can I contribute more tools?
Please do. PRs welcome at github.com/Mike25app/scaleforge-mcp-meta-ads. Each tool is a small file in src/tools/ — copy one of the existing files as a template.
Powered by ScaleForge
Built and maintained by the ScaleForge team. If you need managed Meta access (System User provisioning, RedTrack integration, scheduled auto-rules, dashboards), check out the full platform — this MCP stays free and standalone regardless.
Security
- Generate least-privilege tokens. Scope your System User to only the ad accounts + Pages it needs. Revoking a token takes effect immediately.
- Never commit tokens to source control. The MCP reads from
META_ACCESS_TOKENenv var — keep it in your agent host's secret store (Claude Desktop's env block, shell profile with 600 perms, 1Password, etc.). - Rotate periodically. Even non-expiring System User tokens should be rotated on a team policy. Regenerating in Business Manager invalidates the old one.
- No telemetry. This MCP does not phone home. The only outbound requests it makes are to
https://graph.facebook.com/v24.0/*. - Rate limits apply per token / per ad account (Meta-side). Bulk tools automatically use Meta Batch API to stay under.
Links
- npm: @getscaleforge/mcp-meta-ads
- GitHub: Mike25app/scaleforge-mcp-meta-ads
- Issues: github.com/Mike25app/scaleforge-mcp-meta-ads/issues
- ScaleForge (managed platform): getscaleforge.com
- Meta Marketing API docs: developers.facebook.com/docs/marketing-apis
License
MIT — see LICENSE.
來源:README.md,提交 0fe715e
工具
0版本歷史
1- v0.2.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分