Post to X from Claude Code
You just shipped something in Claude Code. Ask it to announce it: Octopost gives Claude Code an MCP server that writes the post, splits it into a thread if it runs long, and publishes it to X now, at a set time, or after you approve it.
Why this is annoying without it
Posting to X from a script means an X developer app, OAuth 2.0 with PKCE, token refresh every two hours, media upload endpoints and reply chaining for threads. None of that is the thing you were building.
With Octopost you connect your X account once in the dashboard. Claude Code talks to one MCP endpoint with your Octopost key. Token refresh, media uploads and reply chains are handled on our side.
Set it up in one command
Copy your API key from the Octopost dashboard, connect your X account, then run:
Terminal
claude mcp add --transport http octopost https://octopost.ink/mcp \
--header "Authorization: Bearer YOUR_API_KEY"Then ask Claude Code
Write a short X thread announcing what we shipped today, based on the last
5 commits. Put the link to the release notes in the last reply.
Queue it for my approval instead of posting it.Claude Code calls get_guide to learn X's limits, then queue_post with needs_approval. You approve it in the dashboard, or tell Claude Code to call approve_queued_post. Other clients (Cursor, Codex CLI, Gemini CLI, Windsurf) are in the MCP docs.
Limits worth knowing
- X posts are metered in units because X bills Octopost per post: a plain post is 1 unit, a post containing a link is 13. Basic includes 500 units a month, Premium 1,500, Business 4,000, and the $1 trial 40.
- Posts must fit 280 characters per tweet (links count as 23). Longer text goes out as a thread of up to 25 posts.
- X Premium long posts (over 280 characters) are not supported.
- The MCP server uses header auth, so it works in Claude Code, Cursor, Codex CLI, Gemini CLI and Windsurf. It does not work as a claude.ai or ChatGPT web connector yet.
- No analytics: Octopost publishes and reports success or failure per network, it does not track likes or impressions.
Questions
Do I need my own X developer account?
No. You sign in to X through Octopost once and Octopost posts on your behalf with its own X app.
Can Claude Code post without me seeing it?
Only if you ask it to use create_post. Ask it to queue posts with approval required and nothing goes out until you approve.
Can it post a thread?
Yes. Threads are posted as a native reply chain on X, up to 24 replies after the first post.
What happens if a post fails?
The post is marked failed with the reason from X, and Claude Code can call retry_failed after you fix the cause, for example a reconnected account.
Start for $1
Every plan includes the MCP server and the REST API. Basic is $29 a month for 3 accounts, Premium $79 for 10, Business $199 for unlimited. The first 7 days cost $1, then the plan renews monthly unless you cancel.
Try it 7 days for $1