Post to X from Claude Code
Claude Code is Anthropic's coding agent. It runs in your terminal and in VS Code and JetBrains; developers use it to work on code and to call tools over MCP. A text-only post or a video with text, cut to X's 280-character count.
Connect Claude Code to Kreatix
Sign in with Kreatix
No key to copy: paste the address, sign in to Kreatix and press Allow.
- Run once in a terminal: claude mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcp
- Start claude and type /mcp. Finish the sign-in for kreatix in your browser: sign in to Kreatix and press Allow. From a plain shell, claude mcp login kreatix does the same.
- Check with claude mcp list: kreatix should show Connected.
claude mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcpWith a key
For setups without sign-in. The key works like a password, so keep it to yourself.
- In Kreatix, open Settings > AI agent and create a key. It is shown once.
- Run once in a terminal: claude mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcp --header "Authorization: Bearer YOUR_KEY"
- Check with claude mcp list: kreatix should show Connected.
claude mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcp --header "Authorization: Bearer YOUR_KEY"What Claude Code can do on X
A text-only post or a video with text, cut to X's 280-character count.
| Setting | Values | Needed | What it does |
|---|---|---|---|
caption | string (max 5000) | No | The post text. Only the first 280 go, counted X's way: a link is 23, an emoji 2. A text-only post needs it. |
media_url | URL | No | One video to attach: a link from your Kreatix library or a public YouTube, TikTok, Instagram or Facebook post. Leave it out for a text-only post. |
Ask in plain words
Ask inside a claude session, or as a one-liner from the terminal: claude -p "Which of my Kreatix pages got the most views this week?" --allowedTools "mcp__kreatix__get_stats"
claude -p "Post this on X tomorrow at 10:00: Our spring sale starts Monday, 30% off everything."claude -p "Share my newest video on X and LinkedIn tomorrow at 9:00 with the same caption."claude -p "What do I have planned on X this week?"
X rules to know
- Only the first 280 characters go to X, counted X's way: a link counts as 23 and an emoji as 2.
- A longer text is cut, not refused, and never in the middle of a link or an emoji.
- A text-only post needs a caption.
- get_stats has no numbers for X.
Tips for Claude Code
- --scope user makes Kreatix available in every project. Without it, the server is only added for the current project.
- claude -p can't ask for permission or open the sign-in. Sign in once with /mcp first, then allow the tools the run may use with --allowedTools, such as "mcp__kreatix__get_stats", or "mcp__kreatix__*" for all seven.
- Kreatix marks its reading tools (list_channels, list_groups, list_posts, get_stats) read-only, so Claude Code can run them in parallel, for example your stats and your queue at once.
- The agent checks the pages, caption and time with you before it posts. It cannot delete pages, read messages or change your account, and you can remove it any time in Settings > AI agent.
Questions
How do I post to X from Claude Code?
Connect Claude Code to Kreatix once, as shown above. Then ask it to post: name your X pages or a page group, the video or text and the time. Claude Code shows you the plan and posts after you say yes.
What happens to a caption longer than 280 characters?
Kreatix sends the longest start that fits in 280, counted the way X counts: a link is 23 and an emoji 2. It never cuts a link or an emoji in half.
Can I post text only, without a video?
Yes. X, LinkedIn and Facebook take text-only posts. Leave media_url out and give a caption.
Can my agent read how my X posts did?
No. get_stats measures Instagram, Facebook, TikTok and YouTube; X, LinkedIn and Pinterest have no numbers in Kreatix.
Can I share a TikTok or YouTube video on X?
Yes. Give the agent the public link: Kreatix imports the video into your library first, then attaches it to the X post with your text.
I already added Kreatix on claude.ai. Do I add it again?
Not if Claude Code is logged in with the same claude.ai account (not an API key). Connectors from claude.ai show up in /mcp on their own.
How do I remove Kreatix completely?
Run claude mcp remove kreatix, then delete the key Claude Code used in Kreatix under Settings > AI agent. Removing the server in Claude Code doesn't revoke the key on Kreatix's side.
Kreatix schedules one video to every page you run, each with its own platform settings.
Start free, then connect Claude Code