Meta Ads with AdKit
This skill tells you how to create, edit, and report on Facebook and Instagram ads through AdKit. It covers the steps. For what to build (objective, audience, creative, budget), read the meta-ads-strategy skill.
Connect AdKit
AdKit is one MCP connector for Meta, Google, TikTok, LinkedIn, Microsoft, Reddit, X, and Pinterest ads.
- Claude, ChatGPT, and most AI apps: add a custom connector with the address
https://mcp.adkit.so, then sign in. - Claude Code:
claude mcp add --transport http adkit https://mcp.adkit.so
For other AI apps, see how to set up the AdKit MCP server for Meta Ads. If the AdKit tools are not available, tell the user how to connect. Then stop.
What AdKit can do on Meta
| Entity | Actions |
|---|---|
campaigns |
list, get, create, update, delete |
adsets |
list, get, create, update, delete |
ads |
list, get, create, update, delete |
media |
list, upload, delete (images and videos) |
research |
interests (find interest IDs for targeting) |
lead-forms |
list (existing Instant Forms of a Facebook Page) |
conversions |
list (custom conversions and recent pixel events) |
results |
list (spend, impressions, clicks, conversions, ROAS) |
accounts |
list, available, connect, disconnect, update, pages, pixels |
drafts |
get, publish (review your changes, then send them) |
creatives |
create, update, delete (advanced; normal ads do not need this) |
Steps
All calls go through adkit_manage with platform: "meta". Before a call you have not made in this session, read its fields with adkit_help({ path: "manage meta <entity> <action>" }). Do not guess field names. In this skill, campaigns create means entity: "campaigns", action: "create".
Project: call
adkit_projectsand get theprojectId. Every call needs it.Account: call
adkit_status. If no Meta account is connected, calladkit_setupwithplatform: "meta"and give the user the link. After they sign in, useaccountsavailable, thenaccountsconnect.Account defaults: find the Facebook Page with
accountspagesand the pixel withaccountspixels. Save them withaccountsupdate(defaultPageId,defaultPixelId). To also run ads under an Instagram account, ask the user for its ID and save it asdefaultInstagramUserId. This change applies immediately, with no draft.Build from the top down. Each create saves a draft. For each level, do these steps before you start the next level:
- Show the draft to the user (
draftsget, or the linkhttps://app.adkit.so/manage/drafts?open=<draftId>). - Wait for a yes. Then publish it with
draftspublish. - Use the Meta ID that the publish result returns as the parent of the next level. A draft ID never works as a parent ID.
The levels, in order:
- Campaign:
campaignscreatewith a name, an objective, andstatus: "paused". A paused campaign spends nothing. - Ad set:
adsetscreatewith thecampaignId, budget, optimization, and targeting. Useresearchintereststo get interest IDs. - Media:
mediauploadfrom a public URL. It returns animageHashor avideoId. For a local file: calladkit_managewithentity: "media"andaction: "request_upload_url"(no platform). It returns an upload URL. Send the file to that URL withPUT. Then callmediauploadwithsource: "temporary_upload". - Ad:
adscreatewith theadsetId, the copy, the URL, and the creative.
- Show the draft to the user (
Go live:
campaignsupdatewithstatus: "active". Publish that draft only after the user says yes. Then check withadsetslistandadslistthat the ad sets and ads are active too.Results:
resultslistwith aleveland aperiodor a date range (fromandto).
Meta rules
- The campaign objective limits which optimization goals the ad set can use.
- An ad takes one creative source:
media(one image or video),carouselCards,existingPostId(promote an existing post), orcreativeId. Useads, notcreatives, for normal ads. AdKit builds the creative. campaigns,adsets, andadslist actions return settings only. Spend and conversions come fromresults.conversionsshows what is tracked, not how many conversions happened.- Ads shown in the EU need beneficiary and payer details. Save them once with
accountsupdate(dsaDefaults). - Use AdKit field names (camelCase). The entities in the table above ignore raw Meta API field names.
Anything else in the Meta API
For a Meta feature that AdKit does not cover, use entity: "platform-api-request" with action: "mutate". The action is always mutate, also for reads. AdKit sends the request to the Meta Marketing API as it is. The user must turn on Advanced Platform Access in AdKit's Agent Permissions.
- Check every path and field in the Meta Marketing API reference.
- Read requests run immediately, with no draft. Writes save a draft, like any other change.
- After you use it, report the missing feature with
adkit_feedback.
{
"projectId": "<projectId>",
"entity": "platform-api-request",
"action": "mutate",
"data": {
"platform": "meta",
"accountId": "act_<accountId>",
"endpoint": "act_<accountId>/campaigns",
"method": "POST",
"payload": {
"name": "Test campaign",
"objective": "OUTCOME_TRAFFIC",
"status": "PAUSED",
"special_ad_categories": []
},
"description": "Create a paused traffic campaign"
}
}
Other platforms
The same AdKit connector runs Google Ads, TikTok Ads, LinkedIn Ads, Microsoft Ads, Reddit Ads, X Ads, and Pinterest Ads ads. Each platform has its own skill in this repo, for example google-ads and tiktok-ads.