OpenAI Codex

Zernio for OpenAI Codex

Add the server

Writes the entry to ~/.codex/config.toml.

then sign in

Run X from Codex

Run X Ads campaigns, send conversions to the X Conversions API, answer DMs, reply to comments, read analytics and publish posts on X, from Codex. Codex can run the same prompt as a scripted codex exec job, so a daily platform check asks the same question and answers in the same shape every time.

  • X Ads
  • Conversions
  • Inbox
  • Analytics
  • Publishing

Join 200,000+ of the world's most ambitious developers and builders

Warner Music Group
Runable
ClickUp
MoFlo
RE/MAX
Readdy
Write the prompt once, run it on a schedule

A morning X Ads check from codex exec with Codex

Codex runs from the CLI, the IDE extension or a codex exec job with no screen. Put a platform check in a script and cron or CI runs it every morning; when a run turns up something, pick the thread up in the IDE.

  1. 01

    Save the prompt in your repo: "list X Ads ad sets that spent yesterday with zero results, as JSON".

  2. 02

    A cron job or CI step runs codex exec with it each morning; Codex reads the ad sets through Zernio.

  3. 03

    codex exec prints the final answer to stdout, so the script saves it or posts it wherever your team looks.

  4. 04

    When the list is long, open the session in the Codex IDE extension and decide what to pause there.

X DMs and comments counted by a script, answered by you

  1. 01

    Save the prompt: "count X DMs and comments waiting more than 24 hours and draft replies to out/drafts.md without sending".

  2. 02

    A scheduled codex exec run reads the conversations through Zernio and writes the counts and drafts.

  3. 03

    You read out/drafts.md, edit what needs it, and ask Codex in the CLI to send the approved ones.

Use cases

How people run X from Codex

Daily X Ads spend check in CI

A CI job runs codex exec each morning with a saved prompt. Codex lists X Ads ad sets that spent with no results and prints them, so the team sees waste before the budget does.

Script finds it, the IDE finishes it

When the morning run flags one of the X threads, open Codex in your editor, read the conversation through Zernio and write the reply there. Same config file, same server, no second setup.

Event check before a launch

Before a campaign goes live, a codex exec step sends one test event per event name to the X Conversions API and fails the job if any is rejected.

Setup

Codex and X in 4 steps

Codex reaches X through the Zernio MCP server. No Zernio server to host and no X developer app of your own.

01

Connect X

Sign up free and connect an X account (free or Premium) in Zernio.

Connect X

02

Add the server

Writes the entry to ~/.codex/config.toml, which the Codex CLI and IDE extension share.

03

Sign in

Approve the connection in the browser window Codex opens.

04

Check it works

Run codex mcp list and confirm zernio is listed and connected.

Good to know in Codex

  • codex mcp add writes zernio to ~/.codex/config.toml, which the CLI, the IDE extension and codex exec runs all read.
  • codex exec prints only the final message to stdout, and -o saves it to a file, so a script can keep or forward the answer.
  • Codex asks before tool calls according to its approval settings; for unattended runs, write prompts that draft and report rather than send.
What it can do

What Codex can do on X

Codex can run the same prompt as a scripted codex exec job, so a daily platform check asks the same question and answers in the same shape every time.

Ads

Lists X Ads ad sets with spend and no results every morning, and pauses the ones you name in a later run.

Campaigns and boosted posts on X Ads, from a separately connected ad account.

X Ads with Zernio

Conversions

Sends a test event per event name to the X Conversions API from a CI step and reports which were accepted.

X Conversions API: each event sent server-side to its own X Pixel event.

Conversions API docs

Inbox

Counts X DMs and comments waiting too long in a scheduled run and drafts replies to a file, sending only after you say so.

  • Start and continue DMs with images and videos up to 25 MB.
  • List, post, reply to, like, hide and delete replies to your posts.

Analytics

Writes X numbers to dated files in the repo, so each run can be compared with git diff.

Impressions, likes, comments, shares, clicks and bookmarks per post, plus media views on posts with a video or GIF.

Publishing

Queues the X announcement once a release tag lands, last in the run after the checks.

  • Text posts, with up to 20 images, 1 GIF or 1 video
  • Threads, with media on any post in the thread
Prompts

Ask in plain words. Codex picks the tools.

Written for how Codex works. Copy one, change the details.

Write the prompt once, run it on a schedule, in Codex

Limits

X rules the agent runs into

Set by X's API or by Zernio, whichever agent you use. Checked against the Zernio X docs on December 4, 2026.

  • X bills every API call; Zernio passes the cost through with no markup, so a card on file or a funded prepaid balance is required.
  • X rejects a post whose text matches one it already has.

Connecting Codex is free. Its calls bill like the API requests behind them.

Each X account counts as one connected account. The first 2 connected accounts are free, then $6 per account a month, falling to $1 as you add more.

Frequently Asked Questions

Connect an X account (free or Premium) in Zernio first. Then, in Codex: add the server and sign in. Run codex mcp list and confirm zernio is listed and connected.

In ~/.codex/config.toml, which codex mcp add writes. The CLI, the IDE extension and codex exec all read it, so one setup covers all three.

Yes, with codex exec. It runs a prompt without the interactive screen, prints only the final message to stdout, and -o writes that message to a file. It expects a Git repository unless you pass --skip-git-repo-check.

codex exec --json streams events as JSON Lines, and --output-schema holds the final answer to a JSON Schema you supply, so counts and lists arrive in fixed fields.

Codex follows its approval settings for tool calls. For unattended runs, write the prompt to draft and report, then send from an interactive session after you have read the drafts.

Yes. codex exec resume --last, or resume with a session id, picks up a previous run with its context, so you can ask follow-up questions about what it found.

Impressions, likes, comments, shares, clicks and bookmarks for every post. Views are reported only for posts with a video or GIF. On usage-based plans, X analytics must be turned on per account first.

Give Codex your X account

Connect an X account (free or Premium), add Zernio to Codex, and ask.

  • X Ads
  • Conversions
  • Inbox
  • Analytics
  • Publishing