Codex + Mastodon
Post to Mastodon from Codex
Through iHatePosting, Codex can publish posts with pictures or video to your Mastodon account. Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login, then ask it for the post you want.
Setup takes about a minute. A post can hold up to 500 characters.
Posting to Mastodon from Codex
Add iHatePosting to Codex once, connect Mastodon, and then describe the post. Setup takes about a minute.
Add iHatePosting to Codex once
Add the iHatePosting entry to Codex's config.toml and sign in with codex mcp login. Then connect Mastodon in iHatePosting if you have not already.
Add to the end of ~/.codex/config.toml, then run the login command.
[mcp_servers.ihateposting]
url = "https://app.ihateposting.com/mcp/oauth"
# then, in a terminal:
codex mcp login ihatepostingAsk for the Mastodon post
Describe the post in plain language. Codex writes it, applies the settings and schedules it.
> Post a short note about the new release on Mastodon tomorrow at 9:00.
Codex: Done. Scheduled on Mastodon.What Codex can do on Mastodon
On Mastodon, Codex can publish posts with pictures or video to your Mastodon account.
Posts
Publish text posts to your account on mastodon.social, the server iHatePosting connects to.
Threads
Ask for a thread and the text is split into connected posts.
Media
Attach pictures or video from your media library.
Scheduling
Choose a date and time for the post.
How Codex gets a post onto Mastodon
You say what you want and Codex makes the calls. A typical conversation goes like this.
Find your Mastodon channel
Which Mastodon accounts do I have in iHatePosting?
What happens
- Codex lists your channels and finds Mastodon
- It also reads the channel's rules and settings
Compose your content
Split this article summary into a Mastodon thread and schedule it for Friday at 11:00.
What happens
- Codex drafts the text for Mastodon
- It uploads any media you mention
Schedule and publish
Yes, schedule it for tomorrow at 9:00.
What happens
- Codex schedules the post in iHatePosting
- iHatePosting publishes it to Mastodon at that time
Mastodon settings reference
Mastodon needs nothing beyond the text, the media and the time.
| Field | Type | Required | Description |
|---|---|---|---|
| (none) | - | No | No extra settings: Codex sends the text, the media and the time |
What is Codex?
Codex is OpenAI's coding agent. The command line, the IDE extension and the ChatGPT desktop app all read the same config.toml, so one entry connects every one of them.
It can read a repository, write the announcement for a change and schedule it in iHatePosting.
How iHatePosting works with Codex
Once connected, iHatePosting hands Codex its tools: your channels, posts, media and each channel's settings (14 tools in all). Codex calls them while you describe what you want.
- iHatePosting MCP server (sign in): Entry in
~/.codex/config.toml, thencodex mcp login - iHatePosting MCP server (API key): Entry in
~/.codex/config.tomlthat names the variable holding your key - iHatePosting skill (command line): npx skills add
iHatePostingOrg/iHatePosting-Agent
# iHatePosting MCP server (sign in)
[mcp_servers.ihateposting]
url = "https://app.ihateposting.com/mcp/oauth"
# then, in a terminal:
codex mcp login ihatepostingMastodon and the other platforms Codex reaches
Ask for Mastodon and other channels in a single message; every channel still applies its own settings.
Mastodon requests to try in Codex
A post
Post a short note about the new release on Mastodon tomorrow at 9:00.
A thread
Split this article summary into a Mastodon thread and schedule it for Friday at 11:00.
A picture
Post diagram.png on Mastodon with a one-sentence explanation.
Mastodon limits and gotchas to know
A few of Mastodon's rules shape how Codex writes your request, so it helps to know them.
- A post can hold up to 500 characters.
- The channel has no extra settings to choose.
Frequently asked questions
Start free for 30 daysAdd the iHatePosting entry to Codex's config.toml and sign in with codex mcp login, connect Mastodon in iHatePosting, then ask Codex for the post in plain language. It schedules the post and iHatePosting publishes it at the time you set.
A post can hold up to 500 characters.
Mastodon has no extra settings to choose, so Codex only needs the text, the media and the time.
No. The first route opens an iHatePosting sign-in in your browser, and no key changes hands. The route that takes a key uses one from Settings → Agents / Dev in iHatePosting. The command line signs in with ihateposting auth:login.
Yes. Name a day and a time and iHatePosting publishes the post then, whether or not Codex is still open.