Skip to content

Connect Codex to ChatGPT Ads

Connect Codex to ChatGPT Ads in 3 steps: 1. Sign in to ApexGenius and connect ChatGPT Ads. 2. Add the ApexGenius plugin. 3. Start using ChatGPT Ads in Codex. Start in Plugins in the ChatGPT desktop app and authorize your connection.

1,000 free credits · No card required

How to connect ChatGPT Ads to Codex

  1. 1Sign in to ApexGenius and connect ChatGPT Ads
  2. 2Add the ApexGenius plugin to Codex
  3. 3Start using ChatGPT Ads in Codex
  1. 1ChatGPT Ads

    Connect ChatGPT Ads to ApexGenius

    Connect ChatGPT Ads

    Create an API key in ChatGPT Ads. You paste it into ApexGenius once.

  2. 2ApexGenius

     

    Paste it into ApexGenius

    Paste your ChatGPT Ads key into ApexGenius once.

  3. 3ApexGenius

    Connect ApexGenius to Codex

    Choose Codex

    Back on Start, pick Codex and copy the prompt.

  4. 4ApexGenius

     

    Approve access

    ApexGenius opens its approval page. Review the access, then approve.

Add the ApexGenius plugin to Codex

Codex stores MCP servers in ~/.codex/config.toml. The ChatGPT desktop app, the Codex CLI and the IDE extension share that file, so one setup covers all three on the same machine.

  1. In the ChatGPT desktop app, open Plugins and select an ApexGenius plugin shared with you or one you created. Connect it and authorize the app connections you intend to use.
  2. No plugin? Open Settings, then MCP servers, then Add server. Name it ApexGenius, choose Streamable HTTP and paste the MCP address.
  3. Save, select Restart, then Authenticate, and sign in to ApexGenius in your browser.
  4. Start a new Codex task.

The MCP address

https://server.autom8.pro/mcp

Check it. In the composer, type /mcp to view the connected servers.

Steps follow OpenAI documentation, Model Context Protocol for ChatGPT and Codex (opens in a new tab), read November 12, 2026.

Then ask Codex

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

Start free
Written setup, step by stepShow

Before you start

  • A ChatGPT Ads Manager account with access to the ad account you want to connect.
  • An Ads API key created in Ads Manager under Settings. Each key covers one ad account, and it is not the Conversions API key used by a website pixel.

1. Connect ChatGPT Ads to ApexGenius

  1. Create an Ads API key in Ads Manager. In ChatGPT Ads Manager open Settings, then General. Under API Keys choose Create New Key, name it, and copy the key once. It is the Ads Management key, not a conversion key.
    The full ChatGPT Ads Manager Settings page with account details and existing keys blurred, and a red box and arrow marking the Create New Key button.
    Settings, then General. Create New Key, marked in red, mints an Ads Management key for this ad account. Account details are blurred in this capture.Open full-size image (opens in a new tab)
    The Create New API Key dialog in ChatGPT Ads Manager with a Key Name field and a note that Ads Manager keys are separate from conversion keys.
    Name the key and choose Create. Copy it once; Ads Manager shows it masked afterwards. Conversion keys are managed separately.Open full-size image (opens in a new tab)
  2. Open ChatGPT Ads in Connections. Sign in to ApexGenius, open Connections, choose ChatGPT Ads, and select Connect.
  3. Enter the Ads API key. Paste the key from Ads Manager Settings. ApexGenius supplies the api.ads.openai.com address, checks the key against the ad account, and stores it encrypted.
    The Connect ChatGPT Ads dialog over the connection page in ApexGenius, with the ChatGPT Ads API key field and the Connect button.
    Paste the Ads API key into the ChatGPT Ads API key field, then choose Connect. The Conversions API key used by your website pixel is a different key.Open full-size image (opens in a new tab)
  4. Review the tools. Open Tools. Reads cover the account, campaigns, ad groups, ads and daily insights. Enabled pause and activate tools run when called. Activating starts spend.
  5. Verify the connected ad account. Use Test connection, then ask your AI the question below. Compare the account name and currency with Ads Manager and check Tool Activity.
Connect ChatGPT Ads →

2. Connect ApexGenius to Codex

The steps are above, under Add the ApexGenius plugin to Codex. These notes apply to Codex only.

  • From the terminal. The commands are under Manual setup for developers. codex mcp list shows the configured servers, and codex mcp login apexgenius runs the sign-in.
  • Without a local browser. Run codex mcp login apexgenius --no-browser, open the printed authorization URL on another machine, sign in, and paste the full redirect URL back into the terminal.
  • Asking before writes. In config.toml, default_tools_approval_mode = "writes" on the apexgenius server makes Codex ask before any tool that is not marked read-only.
  • ChatGPT on the web. ChatGPT on the web does not read local Codex configuration. It uses plugins.
  • Access. When ApexGenius asks what Codex may use, choose Read only for the first test, or Custom to limit it to the tools you need.

Watch the setup

Follow each step at your own pace.

Codex desktop app with Plugins selected and ApexGenius listed under Available to your account.
Open Codex in the ChatGPT desktop app, then Plugins, and find ApexGenius.Open full-size image (opens in a new tab)

The walkthrough uses the original ChatGPT web plugin captures. After connecting, open Codex in the desktop app and start a new task with ApexGenius. A ChatGPT web connection does not verify Codex access.

A public ApexGenius plugin listing is not verified. Use a plugin shared with you or one you created, subject to your account and workspace policy.

Create a personal plugin

Where Developer mode is available, open ChatGPT Settings, then Security and login, and enable it. In Plugins, select the plus button, enter ApexGenius and a description, then add this URL under Connection. Create the connection, complete OAuth, and review the tools. Return to Codex in the desktop app and start a new task with the plugin enabled.

https://server.autom8.pro/mcp
OpenAI custom connection guide (opens in a new tab)
No plugin available? Use desktop settings
  1. In the ChatGPT desktop app, open Settings, then MCP servers, then Add server.
  2. Name the server ApexGenius, choose Streamable HTTP, and paste the MCP address below.
  3. Save, select Restart, then Authenticate. Sign in to ApexGenius and authorize the intended connections and access.
  4. Start a new Codex task and ask one read-only question. Check the returned result and its matching successful read in Activity.
https://server.autom8.pro/mcp
OpenAI desktop MCP settings (opens in a new tab)
Manual setup for developers

Codex CLI is optional. Run these commands, complete browser authorization, then start a new session. Do not paste bearer tokens or static authorization headers.

Register the remote MCP server

codex mcp add apexgenius --url https://server.autom8.pro/mcp

Authorize in your browser

codex mcp login apexgenius

Inspect registered servers

codex mcp list

The desktop app, CLI, and IDE extension share MCP configuration on the same host. The IDE extension does not install plugins. ChatGPT web does not read local Codex configuration.

3. Verify one safe read

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

Confirm the account and campaign list match Ads Manager. Listing campaigns changes nothing and spends nothing; it does not test pause or activate.

Full guide: the ChatGPT Ads setup guide.

What it looks like in Codex

Illustration of a task, not a recorded customer result. Your answers come from the account and dates you choose.

How the route works
Codex
CodexApexGenius MCP route
Name the connected ChatGPT ad account, its currency and time zone.
ApexGenius
Working with ApexGenius3 reads
RequestConnected read
Account scopeAuthorized connections checked
Salesforceapex_call_read_toolsalesforce_read · Find matching recordsComplete
Salesforceapex_call_read_toolsalesforce_read · Read related activityComplete
n8napex_call_read_tooln8n_get_workflow · Check workflow statusComplete
Codex

Three safe example reads returned results. Nothing was changed.

Read-only route
Codex

Try asking

Name the connected ChatGPT ad account, its currency and time zone.

List my ChatGPT Ads campaigns with status and daily budget. Do not change anything.

Show spend, clicks and conversions per campaign for the last seven complete days.

Pause the campaign I name. Show me the campaign and its daily budget first.

What Codex can do in ChatGPT Ads

15 operations: 13 read, 2 write. Read looks things up and changes nothing. Writes change ChatGPT Ads and run only when you turn them on.

Account

2 read
  • get_ad_accountread
  • list_ad_accountsread

Campaigns

3 read
  • list_campaignsread
  • get_campaignread
  • get_campaign_insightsread

Ad groups and ads

6 read
  • list_ad_groupsread
  • get_ad_groupread
  • get_ad_group_insightsread
  • list_adsread
  • get_adread
  • get_ad_insightsread

Account insights and conversions

2 read
  • get_account_insightsread
  • list_conversion_event_settingsread

Campaign state

2 write
  • pause_campaignwrite
  • activate_campaignwrite

You choose the access. When you approve Codex, pick Full access, Read only, or Custom.

An Ads API key is scoped to one ad account. Connect again for a second account.

Reads never change anything. Pause and activate are the only writes, both run when enabled, and activating starts spend at the campaign budget.

Archive, budget changes, spend limits, key creation and image uploads are not exposed. Image changes happen in Ads Manager.

Disconnecting stops future gateway access. It does not undo a pause or activate that already ran.

Start free

Questions about connecting Codex to ChatGPT Ads

Updated November 12, 2026.

How do I connect Codex to ChatGPT Ads?

Sign in to ApexGenius and connect ChatGPT Ads. In the ChatGPT desktop app, open Plugins and connect an ApexGenius plugin, or open Settings, then MCP servers, then Add server, and add the ApexGenius MCP address as a Streamable HTTP server. Then ask Codex: “List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.” Start with a read, so nothing changes.

How do I check that Codex can use ChatGPT Ads?

In the Codex composer, type /mcp to view the connected servers. ApexGenius should be listed. If it asks for sign-in, open Settings, then MCP servers, and select Authenticate. Start a new task, then ask: “List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.”

Can my AI read spend and conversions?

Yes. Daily insights return spend, impressions, clicks and conversions by campaign, ad group or ad. Conversions count only the events attached to a campaign in Ads Manager.

Can my AI turn a campaign on or off?

It can pause or activate when the tool is enabled. Activating starts spend until someone pauses the campaign again.

Can it create ads or change budgets?

No. Creating campaigns or ads, editing budgets, spend limits, archiving and image uploads are not exposed through ApexGenius. Use Ads Manager for those.

Is this the same key as my website pixel?

No. The Conversions API key belongs to your site. The Ads API key is created separately in Ads Manager Settings and covers one ad account.

Connect ChatGPT Ads to Codex today

Start free

1,000 free credits. No card required. Disconnect any time.