Skip to content

Post to Facebook from Codex

Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal, as an IDE extension and inside the ChatGPT desktop app, and all three can use MCP servers. A video posted as a Reel on your Facebook Page, or a text-only Page post.

Updated November 2026

Connect Codex to Kreatix

Sign in with Kreatix

No key to copy: paste the address, sign in to Kreatix and press Allow.

  1. Run once in a terminal: codex mcp add kreatix --url https://api.kreatix.cc/mcp
  2. Run codex mcp login kreatix, sign in to Kreatix in the browser and press Allow.
  3. Start codex and type /mcp to check that kreatix is listed.
codex mcp add kreatix --url https://api.kreatix.cc/mcp

With a key

For setups without sign-in. The key works like a password, so keep it to yourself.

  1. In Kreatix, open Settings > AI agent and create a key. It is shown once.
  2. Add the [mcp_servers.kreatix] table from the snippet to the end of ~/.codex/config.toml.
  3. To keep the key out of the file instead, run export KREATIX_API_KEY=YOUR_KEY in your shell and then codex mcp add kreatix --url https://api.kreatix.cc/mcp --bearer-token-env-var KREATIX_API_KEY.
  4. Check with codex mcp list, or with /mcp inside codex.
[mcp_servers.kreatix]
url = "https://api.kreatix.cc/mcp"
http_headers = { "Authorization" = "Bearer YOUR_KEY" }

What Codex can do on Facebook

A video posted as a Reel on your Facebook Page, or a text-only Page post.

SettingValuesNeededWhat it does
media_urlURLNoThe video, posted as a Reel: a link from your Kreatix library or a public YouTube, TikTok, Instagram or Facebook post. Leave it out for a text-only post.
captionstring (max 5000)NoThe Reel's description, or the whole post when there is no video. A text-only post needs it.
cover_urlURLNoSet as the Reel's cover once Facebook has finished processing the video. If that takes too long, the cover is skipped.

Ask in plain words

Ask inside the codex terminal app, or one-off from a script: codex exec "Which of my Kreatix pages got the most views this week?"

  • codex exec "Post this on my Facebook page tomorrow at 9:00: We're open this Sunday from 10:00 to 18:00."
  • codex exec "Share this Instagram Reel link on all my Facebook pages tonight at 20:00."
  • codex exec "Cancel the Facebook post planned for Friday."

Facebook rules to know

  • Videos go out as Facebook Reels.
  • A text-only post needs a caption.
  • The cover is added after Facebook finishes processing the video; if that takes too long, it is skipped.
  • When Facebook blocks a post as spam (code 368) or hits a rate limit, Kreatix does not retry: retrying makes the block worse.
  • Kreatix posts to the Facebook Pages you manage.

Tips for Codex

  • Add default_tools_approval_mode = "writes" to [mcp_servers.kreatix]. Codex then asks before schedule_post, reschedule_post and cancel_post, and runs the reading tools straight away.
  • Set it up once: the Codex CLI, the IDE extension and Codex in the ChatGPT desktop app share ~/.codex/config.toml.
  • In the IDE extension you can skip the terminal: gear menu > MCP servers > Add server, choose Streamable HTTP, enter the address, save, select Restart extension, then Authenticate.
  • The agent checks the pages, caption and time with you before it posts. It cannot delete pages, read messages or change your account, and you can remove it any time in Settings > AI agent.

Questions

How do I post to Facebook from Codex?

Connect Codex to Kreatix once, as shown above. Then ask it to post: name your Facebook pages or a page group, the video or text and the time. Codex shows you the plan and posts after you say yes.

Can the agent post text without a video to Facebook?

Yes. Leave media_url out and the caption goes out as a Page post. Facebook, LinkedIn and X are the networks that take text-only posts.

Does a Facebook video go out as a Reel or a regular video?

As a Reel. Kreatix uploads it through Facebook's Reels flow and, if you gave a cover, sets it once Facebook has finished processing the video.

What if Facebook blocks the post as spam?

Kreatix does not send it again on its own, because repeating is what Facebook's block (code 368) punishes. The post shows as failed with Facebook's reason, and the fix is to wait.

Can my agent post to 20 Facebook Pages at once?

Yes: up to 50 pages in one schedule_post call, or a whole group with group_id. Each page counts as one post toward the key's hourly limit, 100 an hour by default.

Can I sign in on a machine without a browser?

Yes. Run codex mcp login kreatix --no-browser, open the printed link on another device, sign in and press Allow, then paste the full redirect URL back into the terminal.

Does the config go in my home folder or the project?

~/.codex/config.toml works everywhere. A project's .codex/config.toml also works, but only in projects you trust.

Kreatix schedules one video to every page you run, each with its own platform settings.

Start free, then connect Codex

Codex with other platforms

Facebook from other agents