Postbase is open source.Star us on GitHub
Claude Code + X

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

Developers
New post

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.

Docs
Generate key
Zapier workflowpb_live_…9c1e
Created 02 Sep 2026 · last used 22 Sep 2026
RotateRevoke

MCP client configuration

Connect the Postbase MCP server to your AI tool so it can schedule and publish for you.

Docs

Authentication

Sign in with PostbaseAPI key

No key to manage — your tool signs in through Postbase.

Client

Claude DesktopClaude CodeCursorVS CodeWindsurfGemini CLI

Run this — Claude Code opens a browser for you to sign in to Postbase.

claude mcp add --transport http postbase https://mcp.postbase.so/mcpCopy

Connected apps

Tools you've signed in to Postbase from. Revoking cuts off their access immediately.

Cursor
Halden Coffee · connected 14 Sep 2026 · last used 22 Sep 2026
Revoke

Set up in three steps

  1. 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. 2

    Add the server

    Run the command in your terminal. Claude Code registers Postbase as a remote MCP server over HTTP.

  3. 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.

Run this — Claude Code opens a browser for you to sign in to Postbase.
bash
claude mcp add --transport http postbase https://mcp.postbase.so/mcp

What 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

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

Postbase

Copy your key now — you won't see it again.

pb_live_Qm7xT2vLr9KcH0sWbN8y…4f2aCopy
MCP client configuration

Authentication

Sign in with PostbaseAPI key

Client

Claude DesktopCursorVS Code
Connected apps
Claude
Halden Coffee · connected just now
Revoke
Cursor
Halden Coffee · connected 14 Sep 2026
Revoke
✓Claude connected to Halden Coffee