Codex + Discord

Post to Discord from Codex

Ask Codex to write and schedule your Discord messages. BrokenPost connects the two, follows Discord's rules and posts at the time you pick.

How to connect Codex to Discord

  1. 1

    Connect Discord in BrokenPost. Add the BrokenPost bot to your Discord server, then pick a channel for each post.

  2. 2

    In BrokenPost, open Plugins and copy your MCP URL.

  3. 3

    Add the lines below to ~/.codex/config.toml.

  4. 4

    Run codex mcp login brokenpost and sign in.

  5. 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 messages.

What happens next

  1. 1

    You ask in Codex, in plain words.

  2. 2

    Codex lists the channels you connected in BrokenPost and picks your Discord account.

  3. 3

    It reads Discord's rules and settings from BrokenPost, so the message fits Discord's limits before it is written.

  4. 4

    If you shared a picture, a video or a link to one, it uploads it to your media library.

  5. 5

    It creates the message as scheduled, as a draft, or to go out now, and gives you a preview link.

  6. 6

    At the set time BrokenPost publishes it to Discord and it shows on your calendar.

Discord limits Codex follows

Codex reads these rules from BrokenPost before it writes, so the message fits the first time.

Characters1,980 characters (a little under Discord's 2,000, to leave room for formatting)
MediaPictures, videos and files as attachments
FormattingMarkdown
ChannelPick one per post
RepliesYes

Discord settings you can ask for

Say them in plain words, like "channel", and Codex sets them on the message.

If Discord rejects a message

Codex sees the same message and can fix the message for you.

What you seeHow to fix it
Bot lacks permission to send messages in this channelGive the BrokenPost bot the Send Messages permission in that channel.
Channel no longer existsPick another channel in the Discord settings of the post.
Rate limited by DiscordDiscord slowed the bot down. The post retries, or retry it from the calendar.

Good to know

Questions people ask

Can Codex post to Discord directly?

Yes, through BrokenPost. Connect Discord in BrokenPost, connect BrokenPost to Codex, and Codex can schedule, draft or publish Discord messages.

Does Codex know the Discord limits?

Yes. Codex reads Discord's rules from BrokenPost before it writes: 1,980 characters (a little under discord's 2,000, to leave room for formatting) and pictures, videos and files as attachments. BrokenPost checks again before it posts.

Can Codex schedule Discord messages for later?

Yes. Give a day and time, like "Friday at 6pm", and the message 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.

Which Discord settings can Codex set?

Channel.

Can Codex post a Discord 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.

Can I post to different Discord channels?

Yes. Each post has its own channel setting, so one post goes to #announcements and another to #general.

More apps with Codex

Post to Discord with other AI

All about scheduling Discord messages

Write once. Post everywhere.

Start free with BrokenPost. Connect your apps and your AI in a few minutes.