Post to X from Claude Code
Connect Claude Code to X with the Postbase MCP server and schedule tweets and threads from your terminal. No API key, and every post lands on a calendar you can check.
Cancel anytime · or self-host for free
Connect Claude Code from the Developers page
Use your API key to automate Postbase — hook up an AI agent over MCP, script it from the CLI, or call the REST API directly.
API keys
A key authenticates the MCP server, the REST API, and the CLI. Shown once — store it safely.
pb_live_…9c1eMCP client configuration
Connect the Postbase MCP server to your AI tool so it can schedule and publish for you.
Authentication
No key to manage — your tool signs in through Postbase.
Client
Run this — Claude Code opens a browser for you to sign in to Postbase.
claude mcp add --transport http postbase https://mcp.postbase.so/mcpCopyConnected apps
Tools you've signed in to Postbase from. Revoking cuts off their access immediately.
Set up in three steps
- 1
Connect X to Postbase
Open Channels in Postbase, pick X and approve access on X's own sign-in screen. Postbase never sees your password.
- 2
Add the server
Run the command in your terminal. Claude Code registers Postbase as a remote MCP server over HTTP.
- 3
Ask for tweets and threads
Tell Claude Code what to post on X and when. Everything it schedules shows up in your Postbase calendar.
claude mcp add --transport http postbase https://mcp.postbase.so/mcpWhat to ask Claude Code
A few X requests that work well.
“Read CHANGELOG.md and write an X thread for the v2.3 release. Schedule it for 10am tomorrow.”
“Summarise the commits since the last tag as one X post and save it as a draft.”
“Post a short 'we're live' note to X as soon as this deploy finishes.”
How Claude Code's posts work on X
- Length
- 280 characters per post. Links count as 23 and emoji as 2, so ask for a little under the limit.
- Threads
- Ask for a thread and the agent sends the posts as one list. Postbase publishes them as a chain of replies, up to 25.
- Timing
- Give a time and it's scheduled; leave it out and it's saved as a draft.
Tips for better X posts
- Ask for the hook first: "make the first post work on its own".
- Put links in the last post of a thread, not the first.
- Say how many posts you want. "A 4-post thread" beats "a thread".
Frequently asked questions
Can it post a thread on X?
Yes. Ask for a thread and the agent sends the posts together. Postbase publishes the first at the scheduled time and each following post as a reply to the one before.
Can it attach images to a tweet?
Not through the agent yet. Ask it to save a draft, then add the image in the Postbase composer and schedule it from there.
Does Claude Code need my X password?
No. You connect X to Postbase once, and Claude Code signs in to Postbase, not to X. You can revoke Claude Code's access from the Developers page at any time.
Can Claude Code delete my X posts?
No. It can list channels, create drafts and scheduled posts, list the queue and cancel a scheduled post. There's no tool for deleting anything.
Related
- Claude Code + LinkedIn
Post to LinkedIn from Claude Code.
- Claude Code + Bluesky
Post to Bluesky from Claude Code.
- Claude Code + Mastodon
Post to Mastodon from Claude Code.
- Claude + X
Post to X from Claude.
- Cursor + X
Post to X from Cursor.
- X (Twitter) scheduler
Tweets and threads up to 25 posts, with images and video.
Ready to get started?
Connect Claude Code in a minute. It writes and schedules your X posts, and you see every one in your calendar.
Cancel anytime · or self-host for free
Copy your key now — you won't see it again.
pb_live_Qm7xT2vLr9KcH0sWbN8y…4f2aCopyAuthentication
Client