How to Connect OpenAI Codex to Threads with Threadify (MCP Guide)
Connect OpenAI Codex to your Threads account with Threadify's MCP server. Add the endpoint, set your token, and draft, schedule, and publish Threads posts from your terminal.
If you run OpenAI Codex in your terminal, you already have an AI agent that can read, write, and reason right where you work. The one thing it can't do out of the box is run your Threads account. That's the gap I built Threadify to close.
Connect Codex to Threadify's MCP server and your terminal agent can draft Threads posts, schedule them, publish them, manage your calendar, and pull your analytics β without you opening a browser tab. This guide shows exactly how to set it up, what Codex can do once connected, and how the free and paid tiers work.
What you can do once Codex is connected to Threads
- Draft posts and threads β written by Codex, or generated in your own voice from your Threadify "Brain."
- Schedule and publish to Threads, with auto-plug follow-ups and auto-reposts.
- Run your content calendar β list, reschedule, edit, duplicate, or cancel scheduled posts.
- Draft and send replies to comments, or enable auto-reply.
- Read your analytics β top posts, follower growth, the best time to post, and per-post engagement.
- Generate and edit images for your posts.
All from a single codex session, in plain language.
Before you start
- A Threadify account. Create one free if you don't have one.
- A connected Threads account inside Threadify β the connector has nowhere to post without it.
- Codex CLI installed and working in your terminal.
How the connection works
Threadify runs a remote MCP server (Model Context Protocol, the open standard for connecting AI agents to tools). Codex talks to it over the public internet at:
https://www.threadify.app/api/mcp/threadify
Unlike a browser-based assistant, Codex authenticates with a personal connection token you generate in Threadify and pass as a bearer token. Think of it as a scoped key for your terminal agent β you can revoke it anytime.
Step 1 β Create your connection token in Threadify
- In Threadify, connect your Threads account first if you haven't.
- Go to Settings β Agent Connections (the card titled "Connect Codex, Claude, or another MCP client").
- Pick the Threads account, name the connection (e.g. "Codex CLI"), and click Create connection.
- Threadify shows you a bearer token (it starts with
tf_mcp_) and the endpoint URL. Copy the token now β it's shown once for security.
Step 2 β Add Threadify to your Codex config
Set the token as an environment variable so it isn't hard-coded in your config:
export THREADIFY_TOKEN="tf_mcp_your_token_here"
Then add Threadify to ~/.codex/config.toml:
Run Threads from your terminal
Threadify is the creator workspace for Threads. Draft in your voice, score posts before you publish, and schedule your best work to auto-publish β now from your Codex session.
[mcp_servers.threadify]
url = "https://www.threadify.app/api/mcp/threadify"
bearer_token_env_var = "THREADIFY_TOKEN"
bearer_token_env_var tells Codex which environment variable holds your token; Codex sends it as an Authorization: Bearer header on every request.
Tip: Add the
exportline to your shell profile (~/.zshrcor~/.bashrc) so the token is available every time you launch Codex. If Codex starts without the variable set, the connection will fail to authenticate.
Step 3 β Verify the connection
Start Codex and run the MCP command in the TUI:
/mcp
You should see threadify listed as connected, along with its tools. If it's there, you're ready to go.
Your first commands
Just talk to Codex:
- "What can you do with my Threads account?"
- "Draft a thread about [your topic] and show me before scheduling."
- "Schedule that for 9am tomorrow."
- "What were my top 5 posts last month?"
- "Draft replies to my recent comments for me to review."
Threadify reads your timezone, connected account, and saved preferences first, so you don't have to repeat context. When something important is ambiguous β the post format or the time β it asks one quick question instead of guessing.
What Codex can do once it's connected
Threadify exposes a focused toolset, grouped by job:
When you ask Codex toβ¦ β¦it uses Threadify tools like Write a post or threadgenerate_content (your Brain) β or Codex drafts it itself
Manage drafts
list_drafts, get_draft, edit_draft, duplicate_draft, delete_draft
Add images
generate_image, edit_image, upload_media
Schedule & publish
validate_post, schedule_post, publish_now (with auto-plug & auto-repost)
Run your calendar
list_scheduled_posts, reschedule_post, edit_scheduled_post, cancel_schedule, duplicate_schedule
Stay organized
projects & chats: list_projects, create_project, move_chat_to_project, rename_chat
Handle replies
generate_replies, send_reply, enable_auto_reply
Read analytics
read_post_performance, greatest_hits, get_growth_trajectory, best_time_to_post, get_threads_profile
Use your memory/Brain
query_brain, remember, correct_memory
You never call these directly β you describe what you want, and Codex picks the right tool.
Free vs paid: what's included
- Free β bring your own AI. Codex drafts the post itself, and Threadify schedules, publishes, and manages it on Threads. Reading your drafts, calendar, projects, and analytics is included, and scheduling and publishing aren't metered.
- Paid or trial β Threadify Brain + AI features. Generating posts in your voice from your Brain, AI-drafted replies, AI image generation and editing, deep Brain memory queries, and power features like duplicating a whole day's calendar. On a free plan these return a clear "upgrade" message.
So you can connect, schedule, and publish for free with Codex doing the writing β and upgrade when you want Threadify's Brain and AI features.
Is it safe?
- Scoped, revocable token. Your
tf_mcp_token authorizes only this connection. Keep it in an environment variable, not in version control. - You control public actions. By default Threadify runs in "reviewed" mode β it confirms the exact text (and resolved time, for scheduling) before anything goes public. Switch to autonomous mode if you want hands-off operation.
- Revoke anytime. In Threadify β Settings β Agent Connections, revoke or delete the connection and the token stops working immediately.
Troubleshooting
/mcpdoesn't list threadify. The most common cause is the token env var not being set when Codex launched. Confirmecho $THREADIFY_TOKENprints your token, then restart Codex.- Authentication fails. Re-check the endpoint URL and that the token is current (regenerate it in Threadify if needed). A regenerated token replaces the old one.
- "Connect a Threads account first." Link a Threads account in Threadify, then retry.
- "This needs a paid plan" (a 402 message). You asked for a Brain or AI feature (in-voice generation, AI replies, image generation) on a free plan. Let Codex draft it itself, or upgrade/start a trial.
Final thought
Threadify is about scaling the work, not the worry. Wiring up Codex turns your terminal agent into a full Threads operator that knows your voice, your calendar, and your numbers. Set it up once β then just talk.
Run Threads from your terminal
Threadify is the creator workspace for Threads. Draft in your voice, score posts before you publish, and schedule your best work to auto-publish β now from your Codex session.