Skip to content

X MCP in Claude Code: Threads From Release Notes

Use Claude Code with the TimeToPost MCP server to turn release notes into an X thread at your own best time: thread rules, tool calls and the 280 limit.

Connect Claude Code to TimeToPost

Set up TimeToPost in Claude Code

  1. Register the hosted server once for every project with the command below.
  2. Run claude mcp login timetopost (or open /mcp in a session) and finish the browser sign in.
  3. Ask Claude Code to call whoami and check that the workspace is yours.
  4. For unattended runs, sign in interactively first: a claude -p run has no /mcp panel, so it reuses the stored login.
terminal
claude mcp add --transport http --scope user timetopost https://api.timetopost.co/mcp
claude mcp login timetopost
headless run, drafts only
claude -p "Read CHANGELOG.md and file one draft per network with create_drafts" \
  --allowedTools "Read,mcp__timetopost__create_drafts"

OAuth in the browser through /mcp or claude mcp login; no API key is stored in the config.

A release thread timed from your own X data

A changelog splits naturally into a thread: one tweet for the headline change, one per notable fix. Claude Code can read CHANGELOG.md, cut it into tweets of 280 characters or less and count them before sending, which matters because a URL counts at full length in TimeToPost’s check.

Ask it to call get_optimal_times with platform twitter first. The answer comes from your own posts; with fewer than 10 measured posts it returns a starting window instead. Then a single schedule_post call carries the first tweet in content and the rest in thread, with accountIds when more than one X account is connected.

Example prompt and the tool calls it makes

Prompt: “Turn the 2.4.0 section of CHANGELOG.md into an X thread of at most 6 tweets, check get_optimal_times for twitter, and schedule it in the best slot this week on my main account.”

1. get_optimal_times

Read from the workspace’s own engagement history.

input
{"platform":"twitter"}

2. list_integrations

Needed when several X accounts are connected: the id goes in accountIds.

input
{}

3. schedule_post

content is tweet 1, thread holds tweets 2 to N; media can only ride on the first tweet.

input
{"platforms":["twitter"],"accountIds":["<x account id>"],"content":"2.4.0 is out: approvals by link for clients.","thread":["CSV import now takes 500 rows.","Telegram albums keep the caption on the first item."],"scheduledAt":"2026-12-09T15:00:00+01:00"}

X rules the server enforces

RuleX
Text280 characters per tweet; URLs count at full length
ThreadsUp to 24 tweets, each up to 280 characters; posted as replies 1.1 seconds apart; media only on the first tweet
ImagesUp to 4 per post: JPEG, PNG, GIF or WebP, up to 5 MB each
VideoOne MP4 or MOV per post, up to 512 MB, never mixed with images
Token lifeAbout 2 hours by design; refreshed at publish, so an old expiry date is normal
  • Approval queue: create_drafts accepts X.
  • Numbers back: get_post_metrics returns X results.
  • The provider key is twitter. A draft with two or more segments becomes a thread.

Limits and gotchas

  • A thread is capped at 24 tweets, each checked against 280 characters before anything is saved.
  • publish_thread cannot pick an account; with several X accounts use schedule_post with thread and accountIds.
  • For a headless run, sign in first in an interactive session; claude -p cannot finish the OAuth step.
  • A claude -p run cannot complete an OAuth sign in, so the first login has to happen in an interactive session.

Related pages

Claude Code setup checked on 2026-12-02 against Claude Code MCP docs, Claude Code headless docs. X rules read from the TimeToPost server code on 2026-11-07.

Frequently asked questions

Can Claude Code check how the thread did a week later?

Yes. get_post_metrics returns impressions, likes, replies, reposts, bookmarks and link clicks for X posts under about 30 days old. Pass the post id from list_posts.

What happens if one tweet in the thread is too long?

The call is refused before anything is saved, with the path of the long tweet, for example thread.1, so Claude Code can shorten that one tweet and resend.

Can it reply to other people on X from the terminal?

No. The tools post your own tweets and threads; they do not reply to, quote or like other accounts.

Can Claude Code post on a schedule without me?

Yes, through claude -p from cron or CI after one interactive login. Allow only the tools the job needs, for example --allowedTools "mcp__timetopost__create_drafts", so the run files drafts and a person still approves them.

I build TimeToPost.

Connect Claude Code to X through TimeToPost. The MCP server and its 126 tools are on every plan, from $12 a month.