How to post to X (Twitter) from Claude Code
claude mcp add --transport http postwire https://postwire.io/api/mcp, sign in with your email, connect your X account once on X's own screen, and ask "write a thread about what shipped in CHANGELOG.md and post it to X". Claude Code writes the post with generate_posts, shows it to you, and publishes it with post_to_social or queues it with schedule_post: a tweet, a thread of up to 26 posts, up to 4 images or a video. You need no X developer account and no API key: PostWire posts through the official X API and pays X for each call. X is on PostWire's paid plans, from $9 a month with 30 X credits included every month: 1 X credit is 1 plain post, a post with a link uses 10, and each image or video adds 1.The same works without the MCP server: PostWire's schedule-posts skill calls the REST API with your key. Either way Claude Code can ask what a post will use before it posts, and a scheduled tweet goes out from PostWire's servers with your terminal closed.
Updated . Written from PostWire's own code; vendor prices read on Oct 20, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Set it up and post, step by step
Prompt to copy once X is connected: Read CHANGELOG.md, write an X thread of 4 posts about v2.4 with the link in a reply under it, tell me how many X credits it uses, and schedule it for Thursday at 10am.
- Add PostWire to Claude Code
In your terminal run
claude mcp add --transport http postwire https://postwire.io/api/mcp(add--scope userto have it in every project), then type/mcpin Claude Code and pick postwire to sign in. The sign-in asks for your email and a 6-digit code, which also creates a free PostWire account if you have none: no password and no card. - Or install the skill instead
npx skills add https://postwire.io --skill schedule-postsadds PostWire's scheduling skill to Claude Code (and to the other agents on the machine). It uses your key from the environment: copy it in the dashboard under API & MCP and setPOSTWIRE_API_KEY. The skill is a plain file you can read first: schedule-posts/SKILL.md. - Connect your X account
Ask "connect my X account". Claude Code calls
create_connect_linkand prints a one-hour link that opens X's own sign-in. X shows "Sensitive permissions requested · This app is not affiliated with X", as it does for every outside app: tick I trust this app, then Authorize app. The permission covers posting and uploading media. X needs a paid PostWire plan, and reading your @handle right after connecting uses 1 credit. - Ask for the post
"Write an X post about the new CSV import."
generate_postsreturns a draft and publishes nothing: one post within 280 characters as X counts them, a first line that stands alone as the hook, one to three short lines of substance, no hashtags and, by default, no link. It writes a thread when you ask for one, and the LinkedIn or Bluesky version of the same news in the same call. - Check what it will use
"How many X credits will that use?" calls
get_x_creditswith the post's text and thread: it returns the credits for the post or the whole chain, what the plan has left this month and the X posts made today. A post the account cannot cover is not sent. - Post now, or schedule it
Say "post it" and Claude Code calls
post_to_social; say "schedule it for Thursday at 10am" and it callsschedule_post, up to 365 days ahead, or withrun_at: "next_slot".threadholds the posts after the first, andreplyis one more post under the last one, the usual place for the link. This is the call:{ "name": "schedule_post", "arguments": { "platforms": ["x"], "per_platform": { "x": { "text": "v2.4 took 6 weeks and cut our sync time in half. What changed:", "thread": [ "We stopped syncing on every keystroke. Saves now batch every 2 seconds.", "Conflicts get a side-by-side view instead of a silent overwrite.", "Dark mode, because you asked 41 times." ], "reply": "Release notes: https://example.com/changelog/2-4" } }, "run_at": "2026-10-22T10:00:00-05:00" } } - Open the post
The result carries the post's link (
https://x.com/i/web/status/…) and, for a thread, every post's id. If X refuses a later post of a thread, the earlier ones stay up, the result sayspending, and PostWire posts the rest by itself without posting anything twice.
"What's scheduled on X?" calls list_scheduled_posts and "cancel Thursday's thread" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page. Prefer to set it up by hand first? Open the dashboard, connect the account under Accounts and copy your key under API & MCP.
Ways to post to X from Claude Code, side by side
How each service plugs into Claude Code, what it posts to X and what its paid plans start at, read on its own Claude Code and pricing pages on Oct 20, 2026.
| Service | How it plugs into Claude Code | What it posts to X | Cheapest paid plan |
|---|---|---|---|
| PostWire | claude mcp add with https://postwire.io/api/mcp, or the schedule-posts skill | Tweets, threads of up to 26 posts with a reply under them, up to 4 images or a video | $9/mo — 3 businesses, 30 X credits a month included |
| Postiz | claude mcp add with mcp.postiz.com/mcp-oauth-dynamic, or the Postiz skill | Single tweets, ordered threads, media posts | $29/mo — 5 channels |
| Upload-Post | npx skills add Upload-Post/upload-post-skill | Text and up to 4 images; long text split into a numbered thread | $24/mo — 5 profiles |
Checked on Oct 20, 2026 (2026-10-20) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.
Where PostWire is ahead
- The cheapest paid plan here: $9 a month for 3 businesses, with 30 X credits included. Upload-Post $24, Postiz $29.
- Links in X posts with no add-on: a post with a link uses 10 of the plan's X credits. Upload-Post lists link posts on X as a $19 a month add-on, up to 50 a month.
- Claude Code knows what a post uses before it posts:
get_x_creditswith the text returns the credits for the tweet or the whole thread. - The post is written for X:
generate_postswrites a tweet with a hook that stands alone and, from the same news, the LinkedIn and Bluesky posts in one call. - A thread never stops halfway: the whole chain's credits are set aside first, and if X refuses a later post PostWire finishes it by itself.
- A person approves what Claude Code queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
- Postiz — Post to X from Claude Code (claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic, or npx skills add gitroomhq/postiz-agent with POSTIZ_API_KEY; single tweets, ordered threads, media posts): postiz.com/claude-code/x
- Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels; "RSS auto-post" on every plan; "Every plan includes the MCP server, CLI and API"): postiz.com/pricing
- Upload-Post — Claude Code + X (npx skills add Upload-Post/upload-post-skill; free API key, no card; up to 4 images; text over 280 characters split into a numbered thread): www.upload-post.com/skills/claude-code/x/
- Upload-Post pricing ("Post links on X / Twitter + $19 / mo", up to 50 link-posts a month): www.upload-post.com/pricing/
- Upload-Post plans (llms-full.txt: Basic $24 a month, 5 profiles): www.upload-post.com/llms-full.txt
Why post to X from Claude Code
- The facts are already in your repo: Claude Code reads the changelog, the commit log or the release notes and writes the thread from what actually shipped, with the numbers right.
- One release, every network: "announce v2.4 on X, LinkedIn and Bluesky" sends one request with a version written for each network.
- From a script or CI:
claude -p "post a thread about today's release from CHANGELOG.md to X" --allowedTools "mcp__postwire__*"runs it without a chat. Without Claude Code, the same post isPOST /api/postwith{"platforms": ["x"], "text": "…"}and your key. - A person can have the last word: on paid plans, a brand's approval rules hold what Claude Code queues until you approve it from an emailed link.
Source: PostWire's MCP server, X integration and plans, read Oct 20, 2026.
What a post to X uses
X bills every post made through its API, so PostWire counts your X posts in credits: 1 X credit is 1 plain post, a post with a link uses 10, and each image or video adds 1. Each post of a thread, and the reply under it, counts by the same rule.
| What Claude Code posts | X credits |
|---|---|
| A plain tweet | 1 |
| A tweet with one image | 2 |
| A tweet with a link in its text | 10 |
| A thread of 4 plain posts, with the link in a reply under it | 14 |
- Included every month: 30 X credits on Starter ($9 a month, up to 5 X posts a day) and 150 on Pro ($29, up to 20 a day). Top-up credits (80 credits for $5, 340 credits for $20) do not expire.
- No bill after the fact: the credits for a whole thread are set aside before the first post goes out, and credits for a post that never went out come back.
X's rules Claude Code works within
- 280 characters as X counts them: a link counts 23 whatever its length, and an emoji counts 2. A single post that runs long is shortened at the end of a sentence; a thread post that runs long is refused before anything goes out.
- Up to 4 images of up to 5 MB each, or one video of up to 512 MB. A file on your computer goes through
create_upload_link, a page where you pick it. - Threads of up to 26 posts: the first post plus 25 more, each a reply to the one before. The media stays on the first post.
- X refuses a duplicate of a recent post from the same account; the result says so in those words.
More on X itself: X (Twitter) MCP server.
What it does not do
Claude Code with PostWire writes, publishes and schedules your own posts on X. It does not read your timeline or search X, it does not like, repost, follow or send direct messages, it does not post polls, and it does not report an X post's views or likes. X is on paid plans; the free plan publishes to the other nine networks.
Questions people ask
Can Claude Code post to X (Twitter)?
Yes, with an MCP server or a skill. Claude Code has no X access of its own; with PostWire added (claude mcp add --transport http postwire https://postwire.io/api/mcp) and your X account connected once on X's own screen, it writes tweets and threads and publishes or schedules them when you ask.
Do I need an X developer account or an X API key?
No. You connect your X account on X's own sign-in screen and PostWire posts through the official X API with its own developer app. PostWire pays X for each call and counts your posts in X credits.
Can Claude Code post a thread to X?
Yes. The posts after the first go in thread (up to 25), each within 280 characters as X counts them, and an optional reply goes under the last one for the link. The credits for the whole thread are set aside before the first post goes out.
How much does it cost to post to X from Claude Code?
X is on PostWire's paid plans: Starter is $9 a month with 30 X credits a month and Pro $29 with 150. 1 X credit is 1 plain post, a post with a link uses 10, and each image or video adds 1. Top-up credits (80 credits for $5, 340 credits for $20) do not expire.
Can Claude Code schedule tweets?
Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes it at that time with Claude Code closed.
Can it post images or a video from my computer?
Yes. A tweet takes up to 4 images of up to 5 MB each or one video of up to 512 MB. A file on your computer gets a link through create_upload_link, a page where you pick the file; a file already online goes as its public https link.
Why does a tweet with a link use more credits?
X bills a post that contains a link at a higher rate than a plain post, so it uses 10 credits instead of 1. That is why generate_posts writes X posts without a link unless the idea is the link, and why the link usually goes in a reply.
Try it on one business, free.
The free plan is 1 business, 10 posts a month, 5 AI drafts a day (about 20 a month) and 2 networks per post — every network connects free, no card, no time limit. Paid plans start at $9 a month and have a 14-day refund; Pro can be tried free for 7 days and Agency for 14, with a card at checkout and nothing charged that day.