Skip to content

X Ads MCP API reference

Every X Ads tool the MCP server exposes, with its parameters. 51 tools, 75 metrics and 4 dimensions, on a dedicated endpoint.

View as Markdown

Campaigns, ad groups, promoted posts, image/video libraries, website cards and carousels, targeting, conversion events and native performance.

To connect another identity without replacing your existing access, open this source in the dashboard and choose Add another account. Select accounts from the combined list and save. See account scoping for selection, plan limits and reconnection.

Connection

Platform id
x_ads
Tool prefix
x_ads_
Account parameter
account_id
Dedicated endpoint
https://mcp.getmcpads.com/x-ads/mcp
Access
Connect your own X Ads account and select the advertisers to expose. Free permits reads; Pro, Team and Enterprise permit writes. Reconnect older connections for media.write. X controls account verification and delivery eligibility.
Tools
51, 23 of which write
Metrics
75
Dimensions
4

Scope requested

Scope requested
ScopeGrantsAllows writes
ads.readRead authorized X Ads accounts, campaigns, creatives, targeting and performance.No
ads.writeCreate and manage X Ads campaigns, ad groups, targeting and promoted posts.Yes
media.writeUpload images and videos for X Ads creatives.Yes
offline.accessRenew the X authorization without another sign-in.No

Catalogues

Images, video and website cards

Upload PNG or JPEG images up to 5 MB, animated GIFs up to 15 MB and MP4 videos up to 16 MB. The Campaign Launcher uploads your files to X itself before it builds the website cards and carousels. Reconnect an older X Ads connection in Sources to grant media.write. Customers authorize their own X account through Get MCP Ads; they do not need to create a developer application.

  1. Call get_capabilities with platform x_ads, then describe_tool for the operation you need. Advanced tools remain callable through run_tool even when your assistant's initial tool list is short.
  2. Preview x_ads_upload_media with the selected account_id, media_type and base64 file bytes in media_base64. Confirm the reviewed upload. It returns a media ID and media_key; it does not create an ad.
  3. For video or GIF processing, call x_ads_get_media_upload_status using the returned media ID. Respect check_after_secs and wait for processing_info.state to become succeeded before using the asset.
  4. Register the media_key with x_ads_create_media_library_item. Use the library read, update and delete tools to inspect, rename or remove library entries.
  5. Create a promoted-only post with x_ads_create_ad_post, or create a website card with x_ads_create_card and attach its card_uri to a new post. Cards support a single image/video or a carousel of 2 to 6 media keys with one website destination. Replacing a card requires creating a new one.
  6. Attach the post with x_ads_promote_post. Read it back with x_ads_list_account_posts, x_ads_get_promoted_post or x_ads_list_promoted_posts, and inspect x_ads_list_post_previews. Every write needs its own preview and confirmation. Keep the parent campaign and ad group paused until delivery is explicitly approved.

Campaigns, targeting and conversion events

Create campaigns and ad groups in pause, then update names, bids, budgets, schedules, placements and frequency settings. Budgets and schedules belong to ad groups (line items). Search location/interest targeting, add or remove criteria, and read them back. Website event tags can be created, read, updated and deleted; creating a tag does not install a pixel or generate conversion traffic.

Permissions, billing and limits

  • Free permits reads; Pro, Team and Enterprise permit writes within the selected accounts and provider permissions. Media tools require ads.read, ads.write and media.write on the X connection. The status tool is read-only but still requires those provider scopes.
  • X API credits, advertising budgets and account verification are separate. A 402 credits-depleted upload error concerns the developer application: contact Get MCP Ads support for a hosted connection. Buying advertising credit or changing your Get MCP Ads plan does not resolve that error.
  • Uploads are not automatically retried. If a partial failure returns an allocated media ID, retain it and inspect its status before starting another upload. The tool accepts file bytes, not an arbitrary download URL.
  • X controls verification, advertiser eligibility, creative review and objective prerequisites. Premium verification may block delivery while paused creation still succeeds. App-install and app-engagement objectives require a suitable mobile app.
  • App/lead cards, multiple website destinations per carousel and files larger than the upload limits are outside this connector's current scope. X Ads is not yet included in the gateway's cross-platform business reviews or creative galleries. Native performance and post-preview tools remain available.

Write tools (23)

Absent from the tool list on the Free plan. Each one previews by default and needs a second call with confirm: true.

Write tools (23)
ToolWhat it doesKindDiscovery
x_ads_activate_campaignActivate a campaign (set entity_status=ACTIVE).WriteOn demand
x_ads_activate_line_itemActivate a line item (set entity_status=ACTIVE).WriteOn demand
x_ads_add_targeting_criterionAdd one targeting criterion to a line item (call once per criterion).WriteOn demand
x_ads_create_ad_postCompose a promoted-only ("nullcasted") post to use as an ad creative.WriteOn demand
x_ads_create_campaignCreate a campaign in an ads account.WriteOn demand
x_ads_create_cardCreate a card from a JSON components payload.WriteOn demand
x_ads_create_custom_audienceCreate an empty customer list (CRM) custom audience in an ads account.WriteOn demand
x_ads_create_line_itemCreate a line item (ad group) under a campaign.WriteOn demand
x_ads_create_media_library_itemRegister an existing media key as a named item in the account's media library.WriteOn demand
x_ads_create_web_event_tagCreate a website conversion event tag (pixel); the returned id can be set as a line item's primary_web_event_tag Preview by default.WriteOn demand
x_ads_delete_cardDelete a card from an ads account.WriteOn demand
x_ads_delete_media_library_itemDelete a media library object from an ads account Preview by default.WriteOn demand
x_ads_delete_web_event_tagDelete a website conversion event tag Preview by default.WriteOn demand
x_ads_promote_postAttach post(s) to a line item as its ad creative(s).WriteOn demand
x_ads_remove_targetingRemove a targeting criterion from its line item (undo a targeting mistake).WriteOn demand
x_ads_rename_campaignRename an X Ads campaign.WriteOn demand
x_ads_rename_line_itemRename an X Ads line item (ad group).WriteOn demand
x_ads_update_campaignRename a campaign or pause it (entity_status=PAUSED).WriteOn demand
x_ads_update_custom_audience_usersAdd or remove people of an X customer list custom audience from normalized SHA-256 emails and phone numbers, in one batch of at most 2,500.WriteOn demand
x_ads_update_line_itemUpdate a line item's bid, budget, name, schedule, placements, goal, pacing, audience expansion (set audience_expansion=EXPANDED to turn on Optimized Targeting) or entity_status.WriteOn demand
x_ads_update_media_library_itemUpdate a media library object's metadata (e.g.WriteOn demand
x_ads_update_web_event_tagUpdate a website conversion event tag Preview by default.WriteOn demand
x_ads_upload_mediaUpload an image, GIF or MP4 to X.WriteOn demand

Read tools (28)

Tools marked Announced appear in your client's tool list. The rest are reachable through search_tools and run_tool, which run the same checks.

Read tools (28)
ToolWhat it doesKindDiscovery
x_ads_get_account_statsGet synchronous analytics (impressions, engagements, spend) for an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_active_entitiesList which ads entities had metrics change in a time window (use before requesting account stats) Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_campaignGet a single campaign by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_campaign_reachGet reach and average-frequency metrics for campaigns Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_cardGet a single card by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_custom_audienceGet a single custom audience by ID, with its type, size and whether X can target it Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_line_itemGet a single line item by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_media_library_itemGet a single media library object by media key Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_media_upload_statusRead processing status of an upload owned by the connected X user.ReadOn demand
x_ads_get_promoted_postGet a single promoted post by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_targeting_criterionGet a single targeting criterion by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_get_web_event_tagGet a single website conversion event tag by ID Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_account_postsList posts (tweets) usable for promotion by an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_ads_accountsList the ads accounts the authenticated user can access Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadAnnounced
x_ads_list_campaignsList campaigns for an account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_cardsList the cards in an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_custom_audience_targetedList the line items and campaigns that target a custom audience Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_custom_audiencesList the custom audiences of an ads account, with their type, size and whether X can target them (targetable, reasons_not_targetable) Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_funding_instrumentsList funding instruments (payment sources) for an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_line_item_placementsList valid placement combinations per line item product type Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_line_itemsList line items (ad groups) for an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_media_libraryList the media library objects in an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_post_previewsGet rendered HTML previews for published or scheduled posts Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_promoted_postsList promoted posts (promoted tweets) for an ads account Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_targeting_criteriaList targeting criteria for an ads account's line items Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_list_web_event_tagsList the website conversion event tags (pixels) in an ads account; a tag's id is what a conversion line item takes as its primary_web_event_tag Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.ReadOn demand
x_ads_search_targeting_interestsSearch targetable interest categories by name.ReadOn demand
x_ads_search_targeting_locationsSearch targetable locations by name.ReadOn demand

MCP resources

Read these with resources/read for machine readable metadata about the source.

MCP resources
NameURI
X Ads reporting and writesx-ads://guide

Manage your ads from your AI assistant

Start for free

Free with 1 ad account, no card. Pro is free for 7 days.

Esc

Type to search