0n3
MCP servers · Facebook Ads · MCP server

Connect Codex CLI to Facebook Ads

One line gives Codex CLI your Facebook Ads account as tools: 11 endpoints, campaigns, adsets, ads, 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 Facebook Ads first

Three steps

  1. Create a free 0n3 account and connect Facebook 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: "Create a campaign in Facebook 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 Facebook Ads

Campaigns · Manage ad campaigns4
Create a campaignPOST /act_{adAccountId}/campaigns
List campaignsGET /act_{adAccountId}/campaigns
Get a campaignGET /{campaignId}
Update a campaignPOST /{campaignId}
Adsets · Manage ad sets and targeting2
Create an adsetPOST /act_{adAccountId}/adsets
List adsetsGET /act_{adAccountId}/adsets
Ads · Manage ad creatives2
Create an adPOST /act_{adAccountId}/ads
List adsGET /act_{adAccountId}/ads
Insights · View performance insights1
Get insightsGET /act_{adAccountId}/insights
Audiences · Create and manage custom audiences2
Create an audiencePOST /act_{adAccountId}/customaudiences
List audiencesGET /act_{adAccountId}/customaudiences

Facebook Ads in other AI clients

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

Codex CLI with other apps

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