Skip to main content
Codex is OpenAI’s coding agent, available as a CLI, an IDE extension, in the ChatGPT desktop app and in the cloud. Add PostQueen once and Codex can write posts from your commits, schedule them and report how your published posts did.
A sample Codex terminal session with PostQueen connected: a request for posts, the PostQueen tools it used, and the reply

Before you start

  • Plans: every ChatGPT plan includes Codex: Free and Go (in the desktop app, as it rolls out), Plus, Pro, Business, Enterprise and Edu. Weekly limits may apply.
  • Platforms: the CLI, the IDE extension and the ChatGPT desktop app, which share one config, plus Codex on the web.
  • A PostQueen API key. A workspace admin copies it, or the ready-made address, from Connections.
Where the API key is: in the app, open Connections > API Keys. Only a workspace Admin or Super Admin can reveal or rotate it; other members see it masked. A workspace has one key, and each agent card on Connections shows your MCP address with the key already filled in.

Connect Codex

1

Add PostQueen

Run this in your terminal, with your key in place of YOUR_API_KEY:
Codex saves it in ~/.codex/config.toml, which the CLI, the IDE extension and the ChatGPT desktop app all read.
2

Check the server

Run codex mcp list, or type /mcp inside Codex.
3

Restart the app you use

In the IDE extension, choose Restart extension. In the ChatGPT desktop app, restart it. In the CLI, start a new session.
Prefer a form? In the IDE extension, open the gear menu, then MCP servers > Add server > Streamable HTTP, paste the address, save and choose Restart extension. In the ChatGPT desktop app, open Settings > MCP servers > Add server, then restart.

Check that it works

Ask Codex: “List my PostQueen channels.” It calls PostQueen and answers with the channels you connected.

Good to know

  • Use MCP rather than the PostQueen CLI in Codex. The default workspace-write sandbox has network access off, so every CLI call asks for approval and unattended runs fail.
  • Codex will not connect PostQueen on its own. It offers to guide you and asks for the address; the reliable step is the codex mcp add command.
  • For one project only, put the server in .codex/config.toml inside a trusted project. Codex reads that file too.
  • ChatGPT on the web does not read this config. Add PostQueen to ChatGPT on its own; see ChatGPT.
  • Ask for drafts when you want to check first. A draft waits on your PostQueen calendar, and nothing publishes until you schedule it.
  • What it cannot do over MCP: delete a post, or change a post’s text or time. Do that on the calendar in the app. The MCP tools lists what it can do.

Other ways to connect

Codex reads the key from POSTQUEEN_API_KEY when it starts, so it stays out of config.toml:
codex mcp add has no header flag. Other headers go under http_headers in config.toml.

Try this first

The draft appears on your PostQueen calendar, ready for you to check and schedule. Prompts to try has more.

Run it on a schedule

codex exec runs Codex without a chat, from cron or a CI job. It reads the same config.toml, so the PostQueen tools come along:
Source: OpenAI, non-interactive mode.

Troubleshooting

More fixes are on Troubleshooting agents.

Is it the same as ChatGPT?

No. Codex lives in the ChatGPT desktop app, but ChatGPT on the web has its own setup: The MCP servers setting in the ChatGPT desktop app belongs to Codex, not to the web chat.

Next steps

Every agent

Which agents can post to PostQueen, and how each one connects.

The MCP tools

What each of the 22 tools does, and what an agent cannot do.

Prompts and tool calls

The order an agent calls the tools in, with prompts that work.

Troubleshooting agents

What to do when a connection or a command fails.
Last modified on September 24, 2026