How to post to a Facebook Page from OpenAI Codex
codex mcp add postwire --url https://postwire.io/api/mcp and codex mcp login postwire, tick your Facebook Page once on Facebook's own screen, and ask "post the release notes from CHANGELOG.md to our Facebook Page". Codex writes the post with generate_posts (short, with the hook in the first 125 characters), shows it to you, and publishes it with post_to_social or queues it with schedule_post, up to 365 days ahead, as text, a photo or a video. You create no Meta developer app and hold no Page token: PostWire posts through Facebook's Graph API with its own app. The free plan includes Facebook Pages: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.The entry lands in ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app share, so one setup covers all three. A scheduled post goes out from PostWire's servers with Codex closed.
Updated . Written from PostWire's own code; vendor prices read on Nov 4, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Set it up and post, step by step
Prompt to copy once your Page is connected: Read CHANGELOG.md, write a Facebook post for the v3.1 release in plain words for our customers, show it to me, and schedule it for Thursday at 10am with ./assets/v3.1.png.
- Add PostWire to Codex
In your terminal run
codex mcp add postwire --url https://postwire.io/api/mcp, thencodex mcp login postwire. The browser opens PostWire's sign-in, which asks for your email and a 6-digit code and also creates a free PostWire account if you have none: no password and no card.codex mcp list, or/mcpinside Codex, shows postwire with its tools. In the IDE extension, the gear menu's MCP servers lists the same entry. - On a server without a browser, sign in another way
codex mcp login postwire --no-browsergives you a sign-in link to open on any device. In CI, give Codex your key instead: copy it in the dashboard under API & MCP, setPOSTWIRE_API_KEY, and put the variable's name in~/.codex/config.toml, never the key itself:[mcp_servers.postwire] url = "https://postwire.io/api/mcp" bearer_token_env_var = "POSTWIRE_API_KEY" - Connect your Facebook Page
Ask "connect my Facebook Page". Codex calls
create_connect_linkand prints a one-hour link; open it and choose Facebook. Facebook shows "Continue as <your name>", then asks which Pages PostWire may use: tick the Page and press Save. Pages you manage directly and Pages inside a Business Portfolio both appear. PostWire never sees your Facebook password. - Ask for the post
"Write the Facebook post for the release."
generate_postsreturns a draft and publishes nothing. It is written for Facebook: 40 to 80 characters when the idea allows and under 250 otherwise, the hook in the first 125 characters (where the mobile feed cuts), 1 to 3 hashtags, and a link can stay in the body. Ask for the LinkedIn or Instagram version in the same sentence and each comes back written for its own network. - Attach a photo or a video, if you want one
Facebook fetches media from a link, so a file on your disk goes through an upload page: Codex asks for one (
create_upload_link, valid 24 hours, up to 100 MB on the free plan and 1 GB on paid plans), you pick the file there, andget_uploaded_filehands Codex its link. A file that is already online goes as its public https link inphoto_urlorvideo_url. - Post now, or schedule it
Say "post it" and Codex calls
post_to_social. Say "schedule it for Thursday at 10am" and it callsschedule_post, up to 365 days ahead, or withrun_at: "next_slot"for your next free posting hour. This is the call:{ "name": "schedule_post", "arguments": { "platforms": ["facebook"], "per_platform": { "facebook": { "text": "v3.1 is out: invoices export to CSV, and search is twice as fast. What should we fix next? #productupdate" } }, "photo_url": "https://postwire.io/m/…/v3.1.png", "run_at": "2026-11-12T10:00:00-05:00" } } - Check that it went out
The result lists Facebook with
ok, the Page it went to and the post's link (https://facebook.com/…). If Facebook refuses it, the result says what happened and how to fix it. "What's scheduled on Facebook?" callslist_scheduled_postsand "cancel Thursday's post" callscancel_scheduled_post.
Reels and Stories go through the REST API today, which Codex can call from the terminal with your key: POST /api/post with "options": {"facebook": {"post_type": "reel"}} or "story". Prefer to set it up by hand? Open the dashboard, connect your Page under Accounts and copy your key under API & MCP.
Ways to post to Facebook from Codex, side by side
How each service plugs into Codex and reaches Facebook, and what it costs to start, read on its own Codex, MCP and pricing pages on Nov 4, 2026.
| Service | How it plugs into Codex | Sign-in | Facebook on the free start | Cheapest paid plan |
|---|---|---|---|---|
| PostWire | codex mcp add postwire --url https://postwire.io/api/mcp | OAuth (email and a 6-digit code), or an API key in bearer_token_env_var | Yes — free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card | $19/mo — 3 businesses, every network in each post |
| Postiz | codex mcp add postiz --url mcp.postiz.com/mcp-oauth-dynamic, or the Postiz skill | OAuth, or POSTIZ_API_KEY for the skill | 7-day free trial | $29/mo — 5 channels |
| Blotato | codex mcp add Blotato --url https://mcp.blotato.com/mcp | OAuth | No — "API and MCP access require a paid Blotato plan" | $29/mo |
| Upload-Post | Its MCP server mcp.upload-post.com/mcp; no Codex setup listed | An API key in an Authorization header | Free plan of 10 uploads a month, no card | $24/mo — 5 profiles |
Checked on Nov 4, 2026 (2026-11-04) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.
Where PostWire is ahead
- A free plan with no time limit: 10 posts a month, no card, MCP included. Postiz starts with a 7-day trial, and Blotato's MCP access needs a paid plan.
- The cheapest paid plan here: $19 a month for 3 businesses, $15.20 billed yearly. Upload-Post $24 ($16 yearly), Postiz and Blotato $29.
- No key to copy to start:
codex mcp login postwiresigns you in with your email and a 6-digit code, and creates the free account too. A key is there for CI. - The post is written for Facebook:
generate_postswrites the short Page post with its hook in the first 125 characters and, from the same release, the LinkedIn post and the Instagram caption in one call. - Recurring posts from the terminal:
create_recurring_postsets a weekly or monthly Page post, 25 on Starter. - A person approves what Codex queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
- Postiz — Post to Facebook from Codex (codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic and codex mcp login postiz, OAuth with no API key; or npx skills add gitroomhq/postiz-agent with POSTIZ_API_KEY; "Postiz publishes to Facebook Pages you connected, not to personal profiles"): postiz.com/codex/facebook
- Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels): postiz.com/pricing
- Blotato + OpenAI Codex (codex mcp add Blotato --url https://mcp.blotato.com/mcp, codex mcp login Blotato --scopes email,offline_access; "API and MCP access require a paid Blotato plan"): www.blotato.com/codex
- Blotato pricing (Starter $29 a month; the 7-day free trial covers all features "except the API and MCP server"): www.blotato.com/pricing
- Upload-Post — Facebook MCP server (https://mcp.upload-post.com/mcp with an "Authorization: ApiKey" header; "Start free, no card"; Page posts, comments, scheduled posts): www.upload-post.com/mcp/facebook/
- Upload-Post llms-full.txt (Free 10 uploads a month, "no credit card required", Facebook on the free plan; Basic $24 a month, $16 billed yearly, 5 profiles): www.upload-post.com/llms-full.txt
- OpenAI — Codex MCP docs (~/.codex/config.toml shared by the ChatGPT desktop app, the Codex CLI and the IDE extension; codex mcp add <name> --url; codex mcp login <name>, with --no-browser for a terminal without a browser; bearer_token_env_var; /mcp in the TUI): developers.openai.com/codex/mcp
What to say in Codex, and what your Page receives
| You say | Codex calls | Your Page receives |
|---|---|---|
| "Post the release notes to our Facebook Page" | generate_posts, then post_to_social | A short text post, link in the body |
| "Post ./assets/v3.1.png with it" | create_upload_link, then post_to_social with photo_url | A photo post with its caption |
| "Post the demo video" | post_to_social with video_url | A video on the Page |
| "Schedule it for Thursday at 10am" | schedule_post with run_at | The same post, at that time |
| "Post our opening hours every Monday at 9" | create_recurring_post (paid plans) | The post, every Monday at 9 |
| "What do I have scheduled?" | list_scheduled_posts | Nothing — it reads your queue |
Source: PostWire's MCP server and Facebook publisher, and OpenAI's Codex MCP docs, read Nov 4, 2026. Every Facebook tool and limit: Facebook MCP server.
Why post to Facebook from Codex
- The facts are already in the repo: Codex reads the changelog, the release notes or the event sheet and writes the Page's post from what actually shipped, with the version and the date right.
- One release, every network: "announce it on Facebook and LinkedIn" sends one request with a version written for each. On the free plan one post reaches 2 networks; paid plans (from $19 a month) add Instagram, Bluesky, X and the rest in the same request.
- The same post from a script: once you know what you want, Codex can write it into your release job as one REST call,
POST /api/postwith{"platforms": ["facebook"], "text": "…"}and your key. - A person can have the last word: on paid plans, a brand's approval rules hold what Codex queues until you approve it from an emailed link.
What Starter adds to posting on Facebook from Codex
A Page that posts three times a week needs about 13 posts a month, past the free plan's 10 and its 3 waiting posts. Starter is $19 a month, or $15.20 a month billed yearly:
- An unlimited queue and 1,000 posts a month, so a whole month of Page posts can wait in line.
- 25 recurring posts (
create_recurring_post, or Automate → Recurring), for the weekly opening hours or the Monday update. - 3 businesses, each with its own Facebook Page and other connections, plus every network in each post.
- Approvals: what Codex queues waits until you approve it from an emailed link.
Facebook's rules Codex works within
- Pages, not personal profiles: Facebook lets no app post to a personal profile, so Codex posts to a Page you manage. No Page yet? Create one at facebook.com/pages/create, then connect it.
- What a post can be: text alone, one photo with its caption, or one video with its description, up to 2,000 characters in PostWire's Facebook writer.
- Reels and Stories go through PostWire's REST API with
options.facebook.post_typeset to"reel"or"story", with the same connected Page: see network options. A Reel is sent, then published when Facebook finishes processing it. - What Facebook asks you to allow: listing your Pages, creating posts on them and reading their engagement (
pages_show_list,pages_manage_posts,pages_read_engagement), plusbusiness_managementso a Page inside a Business Portfolio can be found.
What it does not do
Codex with PostWire publishes and schedules posts on your Facebook Page. It does not post to personal profiles or Groups, it does not post several photos in one Facebook post, it does not read or answer comments or Messenger conversations, and it does not create or manage ads. Reels and Stories are a REST option today, not a field of the MCP tools.
Questions people ask
Can Codex post to Facebook?
Yes, with an MCP server. Codex has no Facebook access of its own; with PostWire added (codex mcp add postwire --url https://postwire.io/api/mcp, then codex mcp login postwire) and your Page ticked once on Facebook's screen, it writes the post and publishes or schedules it on your Facebook Page when you ask.
Do I need a Meta developer app or a Page access token?
No. You approve PostWire's app on Facebook's own screen and tick the Page it may use. There is no developer app to create, no App Review and no token to copy or refresh.
Can Codex schedule Facebook posts?
Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes it at that time with Codex closed. The free plan keeps 3 posts waiting at once; paid plans have no such limit.
Can it post to my personal profile or a Facebook Group?
No. Facebook lets no app post to a personal profile, and PostWire does not post to Groups. Codex posts to a Facebook Page you manage.
Where does Codex keep the PostWire config?
In ~/.codex/config.toml, as a [mcp_servers.postwire] table with url = "https://postwire.io/api/mcp". The Codex CLI, the IDE extension and the ChatGPT desktop app read the same file. A trusted project can have its own .codex/config.toml instead.
Can Codex post a photo or a video from my repo?
Yes. Facebook fetches media from a link, so Codex asks for an upload page with create_upload_link; you pick the file there and Codex gets its link for photo_url or video_url. A Reel or a Story is a REST option (options.facebook.post_type).
How much does it cost?
The free plan includes Facebook Pages and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses and Pro $29 for 10, with every network in each post; nothing is charged from Codex.
Try it on one business, free.
The free plan is 1 business, 10 posts a month, 5 AI drafts a day (about 20 a month) and 2 networks per post — every network connects free, no card, no time limit. Paid plans start at $19 a month and have a 14-day refund; Pro can be tried free for 7 days and Agency for 14, with a card at checkout and nothing charged that day.