Codex + Mastodon
Post to Mastodon from Codex
Ask Codex to write and schedule your Mastodon posts. BrokenPost connects the two, follows Mastodon's rules and posts at the time you pick.
How to connect Codex to Mastodon
- 1
Connect Mastodon in BrokenPost. Sign in with your Mastodon account.
- 2
In BrokenPost, open Plugins and copy your MCP URL.
- 3
Add the lines below to ~/.codex/config.toml.
- 4
Run codex mcp login brokenpost and sign in.
- 5
Ask Codex to schedule a post.
# ~/.codex/config.toml
[mcp_servers.brokenpost]
url = "<MCP_URL>"Prefer another way? See every way to connect Codex.
What to ask Codex
Type these in Codex. Change the details to fit your posts.
- “Post our release notes on Mastodon tomorrow at 10am as a short thread.”
- “Share this screenshot on Mastodon this afternoon.”
- “Schedule this post on Mastodon, Bluesky and X for Monday morning.”
- “Read the commits since the last tag and turn them into a short Mastodon post. Schedule it for 10am tomorrow.”
- “What Mastodon posts do I have scheduled for next week?”
What happens next
- 1
You ask in Codex, in plain words.
- 2
Codex lists the channels you connected in BrokenPost and picks your Mastodon account.
- 3
It reads Mastodon's rules and settings from BrokenPost, so the post fits Mastodon's limits before it is written.
- 4
If you shared a picture, a video or a link to one, it uploads it to your media library.
- 5
It creates the post as scheduled, as a draft, or to go out now, and gives you a preview link.
- 6
At the set time BrokenPost publishes it to Mastodon and it shows on your calendar.
Mastodon limits Codex follows
Codex reads these rules from BrokenPost before it writes, so the post fits the first time.
| Characters | 500 characters |
|---|---|
| Media | Pictures or video |
| Threads | Yes, as replies |
If Mastodon rejects a post
Codex sees the same message and can fix the post for you.
| What you see | How to fix it |
|---|---|
| The media was still processing when the post was published, please try again | Big videos need time on Mastodon. Retry the post a few minutes later. |
| Your login is currently disabled | Your Mastodon server disabled the account. Sign in on Mastodon to sort it out, then reconnect. |
Good to know
- Each part can have up to 500 characters.
- Big videos take Mastodon a while to process, so upload them well before the post time.
- Codex only posts when you ask. Ask for a draft to check the post in BrokenPost first.
Questions people ask
Can Codex post to Mastodon directly?
Yes, through BrokenPost. Connect Mastodon in BrokenPost, connect BrokenPost to Codex, and Codex can schedule, draft or publish Mastodon posts.
Does Codex know the Mastodon limits?
Yes. Codex reads Mastodon's rules from BrokenPost before it writes: 500 characters and pictures or video. BrokenPost checks again before it posts.
Can Codex schedule Mastodon posts for later?
Yes. Give a day and time, like "Friday at 6pm", and the post goes out then. Ask for a draft if you want to check it first.
Is it free?
Codex with BrokenPost works on every plan. The Free plan includes 1 account on every app and 20 posts a month. Paid plans start at $19 a month with unlimited posts.
Can Codex post a Mastodon thread or comments?
Yes. Ask for a thread or a first comment and BrokenPost posts each part as a reply, right after the first one.
More apps with Codex
Post to Mastodon with other AI
Write once. Post everywhere.
Start free with BrokenPost. Connect your apps and your AI in a few minutes.