Post to X from
OpenAI Codex
Add the OpenTweet MCP server to your Codex config.toml and Codex can post, schedule, thread, and publish articles on X. One entry, one key. No X developer account, no OAuth, no per-post billing.
7-day free trial. No X developer account needed.
What Codex can do on X
The OpenTweet MCP server gives Codex the full posting surface, not just a single tweet call.
Post now
Ask Codex to publish and create_tweet sends it live.
Schedule
schedule_tweet and batch_schedule queue posts for later.
Threads
create_thread publishes a connected thread in one call.
Articles
create_article publishes long-form X Articles from markdown.
Analytics
Analytics tools let Codex read results and adjust.
No X API
No developer account, no OAuth, no token refresh to build.
Add it to config.toml
Codex reads MCP servers from config.toml, by default at ~/.codex/config.toml. A Streamable HTTP server needs a URL and a bearer token env var. Drop in this table and Codex picks up the tools on its next run.
# ~/.codex/config.toml
[mcp_servers.opentweet]
url = "https://mcp.opentweet.io/mcp"
bearer_token_env_var = "OPENTWEET_API_KEY"
startup_timeout_sec = 30Prefer to scope it to one project? Put the same table in a trusted .codex/config.toml at the repo root.
Or add it from the CLI
Run the interactive command, choose Streamable HTTP, and point it at the OpenTweet endpoint. Export your key and start asking Codex to post.
# Interactive setup, then choose "Streamable HTTP"
codex mcp add
# Export your OpenTweet key so Codex can read it
export OPENTWEET_API_KEY=ot_your_api_key
# Then just ask Codex, inside a session:
# "Draft a 3-tweet thread from CHANGELOG.md and schedule it for 9am UTC tomorrow."Full tool list and payloads are in the MCP docs.
Perfect for
Ship-and-announce loops
Codex closes out a task, then drafts and schedules the release note from your changelog without leaving the terminal.
Dev-rel from the CLI
Turn a commit range or a fixed issue into a thread and queue it for the morning.
Repo-aware posting
Codex reads your code and docs, so the tweets it drafts actually describe what changed.
Hands-off scheduling
Ask once for a week of posts and batch_schedule lays them out across your best times.
Using a different agent? The same hosted MCP server works with Claude Code, Cursor, and Google ADK.
Frequently asked questions
How do I let OpenAI Codex post to Twitter?
Add the hosted OpenTweet MCP server to your Codex config. Put a mcp_servers table in ~/.codex/config.toml with the OpenTweet URL and your API key, or run codex mcp add and choose Streamable HTTP. Codex then gets tools to post, schedule, and thread on X.
Where does the MCP config live for Codex?
Codex reads MCP servers from config.toml, by default ~/.codex/config.toml. You can also scope a server to a trusted project with a local .codex/config.toml. A Streamable HTTP server needs a url and, for authenticated servers like OpenTweet, a bearer_token_env_var.
Do I need an X (Twitter) developer account?
No. OpenTweet handles the X connection, OAuth, and token refresh for you. Codex talks to OpenTweet with one ot_ key, and OpenTweet posts to X. You never touch the pay-per-use X API or a developer application.
What can Codex do on X through OpenTweet?
The MCP server exposes 36 tools including create_tweet, create_thread, schedule_tweet, batch_schedule, create_article, evergreen queue tools, and analytics. Codex can post now, schedule for later, publish a full thread, or read how earlier posts performed.
Can Codex schedule instead of posting immediately?
Yes. Ask Codex to schedule and it calls schedule_tweet or batch_schedule with an ISO 8601 time. The same key and server handle immediate posts, scheduled posts, threads, and articles.
What does it cost?
OpenTweet plans start at $11.99/month with a 7-day free trial. There is no per-post charge at normal volumes, unlike the pay-per-use X API. See the pricing page for current plans.
Wire any agent or framework to X
Codex is one of many. Post to X from any MCP client, IDE, or AI agent.
OpenTweet vs the X API
Post, schedule, and automate X without a developer account or the $200/mo minimum.
Post to X without an API
The clean, account-safe way to post to X from your code or an AI agent.
Twitter MCP Server
Give Claude, Cursor, and OpenClaw the ability to post to X. 36 tools included.
Developer docs
Quickstart, API keys, MCP setup, and the REST reference for posting to X from code or an agent.
XMCP vs OpenTweet
X's official MCP server bills per API call and cannot schedule. Compare it with the flat-fee hosted MCP.
MCP for AI agents
Connect your AI client to X in under two minutes, no X developer account.
Developer API and keys
REST endpoints, one bearer key, and usage tracking. Build on OpenTweet.
OpenTweet for AI agents
The posting layer for autonomous agents and automations that live on X.
Build an AI Twitter persona
Give your AI agent its own X account. Setup, cadence, and the rules that keep it safe.
Let Codex post to X
Connect X, copy your key, and add the server to config.toml today.
Start your 7-day free trial