0n3
MCP servers · X Ads · MCP server

Connect Codex CLI to X Ads

One line gives Codex CLI your X Ads account as tools: 11 endpoints, campaigns, line items, promoted tweets, called with your own connection. No key in the prompt, a receipt for every call, revoke Codex CLI's access alone any time.

Get the line for Codex CLIConnect X Ads first

Three steps

  1. Create a free 0n3 account and connect X Ads. Paste a key or sign in; it lands in your vault, encrypted.
  2. Install 0n3 into Codex CLI. OpenAI's terminal agent reads 0n3 over Streamable HTTP with a token from your environment.
  3. Ask Codex CLI: whoami. Then: "List campaigns in X Ads".
Put the token in your environment
export ON3_TOKEN="<your 0n token>"

Add it to your shell profile so Codex finds it next time.

The line above carries a placeholder; 0n3.app/install mints a real key named for Codex CLI and fills it in.

What Codex CLI can then do in X Ads

Campaigns · Manage ad campaigns4
List campaignsGET /accounts/{accountId}/campaigns
Create a campaignPOST /accounts/{accountId}/campaigns
Get a campaignGET /accounts/{accountId}/campaigns/{campaignId}
Update a campaignPUT /accounts/{accountId}/campaigns/{campaignId}
Line items · Manage line items and targeting2
List line itemsGET /accounts/{accountId}/line_items
Create a line itemPOST /accounts/{accountId}/line_items
Promoted tweets · Manage promoted tweets2
List promoted tweetsGET /accounts/{accountId}/promoted_tweets
Create a promoted tweetPOST /accounts/{accountId}/promoted_tweets
Audiences · Manage tailored audiences2
Create an audiencePOST /accounts/{accountId}/tailored_audiences
List audiencesGET /accounts/{accountId}/tailored_audiences
Reports · Pull campaign analytics0
Pull campaign analytics
More · Everything else this app exposes.1
Get statsGET /stats/accounts/{accountId}

X Ads in other AI clients

Claude Code + X AdsMCP server + skillClaude (desktop & claude.ai) + X AdsconnectorChatGPT + X Adsconnector · GPT actionGemini CLI + X AdsMCP serverCursor + X AdsMCP serverVS Code (Copilot) + X AdsMCP serverWindsurf + X AdsMCP server

Codex CLI with other apps

Hostinger363 endpointsTelegram132 endpointsPipedrive95 endpointsResend67 endpointsSquare57 endpointsLinkedIn50 endpointsSlack45 endpointsFigma32 endpointsCloudConvert32 endpointseBay25 endpointsQuickBooks21 endpointsCloudflare21 endpoints