Codex writes code. PostPlenty writes the post.
Add PostPlenty to Codex's config.toml and ask for posts from the CLI. PostPlenty writes them in your brand voice, makes the images and drafts them into your calendar.
Set up in a minute
Connect Codex to PostPlenty
- Create a key in PostPlenty under Settings → API keys.
- Export it before you start Codex: export PYLOT_API_KEY=pyl_live_…
- Run the command above. It appends a pylot table to ~/.codex/config.toml, and Codex sends the variable's value as the bearer token.
- Start Codex in a repo and ask for a post. Approve the PostPlenty tool calls when Codex asks.
cat >> ~/.codex/config.toml <<'EOF'
[mcp_servers.pylot]
url = "https://www.postplenty.com/api/mcp"
bearer_token_env_var = "PYLOT_API_KEY"
EOFTry asking
Ask for the post, not just the schedule
Codex works from a terminal inside your repo, so summarising a release, a diff or a docs change into a post is a natural first ask.
- Prompt 1
“Summarise this release from the git log into an X post and a LinkedIn post, make one brand image for both, and schedule them for Tuesday at 10am.”
- generate_captions in your voice
- generate_image your colours
- create_post draft or scheduled
- Prompt 2
“Create three Instagram posts with images for our hiring push next week and leave them as drafts.”
- Prompt 3
“Write a Facebook post about our new API docs with a square brand image, and schedule it for tomorrow at 2pm.”
Drafts unless you give a time
Images use 1 credit each, refunded if generation fails.
Good to know
Using Codex with PostPlenty
- The setting is bearer_token_env_var, which names the variable. Put the variable's name in config.toml, not the key itself.
- config.toml is read when Codex starts. After editing it, restart Codex.
- Run the cat command once. Running it twice adds a duplicate [mcp_servers.pylot] table, which makes the file invalid.
Your agent's content team
Give Codex a brand to post with
PostPlenty learns your brand from your website. Start a trial, create a key, and Codex can post what it just built.
7 days free, then $29.99/month. Card required. Cancel any time in Settings.
Questions
PostPlenty for Codex, answered
How do I add PostPlenty to Codex?
Add an [mcp_servers.pylot] table to ~/.codex/config.toml with PostPlenty's MCP URL and bearer_token_env_var set to the variable holding your key. Codex sends it as the Authorization header.
Can I use a different config file for one project?
Keep PostPlenty in ~/.codex/config.toml, which Codex reads for every session. Check Codex's MCP docs for any project-level config your version supports before relying on one.
Why does Codex say it has no PostPlenty tools?
Usually the variable is not exported in the shell that started Codex, or the file has a duplicate table. Check PYLOT_API_KEY, check config.toml for one [mcp_servers.pylot] block, then restart Codex.
Can Codex schedule posts on its own?
It can create drafts and schedule posts when you ask for a time. It cannot publish immediately unless you ask for that and publish_post is called with confirm set to true.