# Post to X From Claude Code With Kalen

> How to post to X from Claude Code: add Kalen as an MCP server with one command, connect X, then plan, score and schedule a week from the terminal.

Canonical: https://kalen.si/blog/post-to-x-from-claude-code

[Kalen guides](https://kalen.si/blog/category/kalen-guides)

Kalen · October 16, 2026 · 5 min read

To post to X from Claude Code, add Kalen as a remote MCP server with one `claude mcp add` command and your Kalen key. Connect your X account through X’s own sign-in, then ask Claude Code to plan your posts. Kalen gives it a briefing on your niche and your open slots, scores the drafts it writes, and schedules them after you approve. Posts go out through the official X API at their times, whether your terminal is open or not.

## Why post from the terminal?

If you spend the day in Claude Code, switching to a browser to write posts is the moment the habit breaks. You just shipped something worth posting about, the context is right there in the repo, and the X tab is one more thing to open. Posting from where you work means the update about today’s release gets written while you still remember the details, because the changelog and the code are right there. [What an X MCP server does](https://kalen.si/x-mcp) explains how the pieces connect.

## What you need

- A Kalen account at [kalen.si](https://kalen.si/signup).
- Claude Code installed.
- An X account.
- A plan to schedule posts; without one you can still connect X, set your profile and score drafts. See [pricing](https://kalen.si/#pricing).

## Step 1: Create a key

Sign in to Kalen and open the **Connect** page in your account. Create a key; it starts with `kln_live_`. Copy it now: Kalen shows it only once. You can create one key per machine and revoke any of them later.

## Step 2: Add Kalen to Claude Code

Run once:

```
claude mcp add --transport http kalen https://kalen.si/mcp --header "Authorization: Bearer kln_live_…"
```

Paste your key in place of `kln_live_…`. Start a new Claude Code session so it picks up the server. Running `/mcp` inside Claude Code lists connected servers; Kalen should be there.

## Step 3: Connect X and set your profile

In Claude Code, ask:

> Set me up on Kalen. Connect my X account, then ask me for my niche, keywords, reference accounts, time zone and posting window.

Claude Code gives you a link to X’s own sign-in screen. Open it in your browser and approve; Kalen never sees your X password. Then Claude Code saves your profile with Kalen: niche and up to 8 keywords, up to 10 reference accounts, your time zone, a posting window and a note on your tone.

## Step 4: Plan your first week

Ask:

> Plan my X posts for next week with Kalen.

What happens next:

1. Claude Code calls Kalen for a **briefing**: today’s top posts in your niche, trends, your reference accounts’ best posts, your own best posts, and patterns such as typical length and format mix.
2. It asks for your **open slots** across the week, spread through your posting window.
3. It **writes the drafts.** No writing model runs on Kalen’s side; Claude does the writing.
4. Kalen **scores** each draft from 0 to 100. Drafts below the pass mark come back with a reason, and Claude rewrites them, up to three rounds.
5. Claude shows you the week. Change anything you want.
6. When you say yes, Kalen **schedules** the posts. Nothing is scheduled without that confirmation.

## Step 5: Post about what you just shipped

The terminal advantage is context. After a release, try:

> Read the changelog for today’s release and write two X posts about it with Kalen: one how-to, one build update. Put the docs link in a first reply. Schedule them for this afternoon.

Kalen’s “moment” posts, the ones tied to today, can be scheduled within the next 48 hours. Links go in the first reply when you add one, and count toward your daily link posts. [Putting your link in the first reply](https://kalen.si/blog/x-first-reply-link) explains why that’s often the better shape.

## Useful requests

| You ask | What Kalen does |
|---|---|
| “What’s scheduled this week?” | Lists your queue by day |
| “Move Thursday’s 10:00 post to Friday” | Updates the slot |
| “Cancel the post about pricing” | Asks you to confirm, then cancels |
| “What’s working in my niche today?” | Returns today’s briefing |
| “Score these three drafts” | Scores and gives a reason for each |
| “How many link posts do I have left today?” | Shows plan usage |

## Rules to know

Kalen checks every post on his side before it’s queued: 280 characters as X counts them, with links as 23 ([X’s character limit](https://kalen.si/blog/x-character-limit-how-urls-count)); no @mentions of other accounts, since X restricts automated mentions; one cashtag at most; up to 21 days ahead; and images or video within the size limits (JPG, PNG, WebP 5 MB; GIF 15 MB; MP4 50 MB).

## Using Cursor or VS Code instead?

The same key works there. Add this to `~/.cursor/mcp.json` for Cursor:

```
{ "mcpServers": { "kalen": { "url": "https://kalen.si/mcp", "headers": { "Authorization": "Bearer kln_live_…" } } } }
```

VS Code reads `.vscode/mcp.json` in its own format:

```
{ "servers": { "kalen": { "type": "http", "url": "https://kalen.si/mcp", "headers": { "Authorization": "Bearer kln_live_…" } } } }
```

Claude.ai and ChatGPT connect with a sign-in instead of a key. All of it is in [connect Kalen to Claude, ChatGPT and Cursor](https://kalen.si/blog/connect-kalen-to-claude-chatgpt-and-cursor).

If you rarely post, or you prefer writing in the X app, skip this setup: there’s no free plan that posts, because X charges per post. It pays off when you post most days and already live in the terminal.

## FAQ

**Does my terminal need to stay open for posts to go out?**
 No. Kalen publishes from his own servers at each scheduled time.

**Can Claude Code post immediately?**
 Kalen schedules posts at least a few minutes ahead. Ask for the next open slot.

**Is my key safe in Claude Code’s config?**
 Treat it like a password. Kalen stores only a digest of it, and you can revoke a key from the Connect page at any time.

**Can I use it in several repos?**
 Yes. Add `--scope user` to the `claude mcp add` command and Kalen is available in every project.

## Start now

Start now: create your key on the Connect page and run the command above.

**About this article.** Written by the team that builds Kalen, the X assistant that researches your niche, scores what your AI writes and publishes the posts you approve. Spotted something wrong or out of date? Write to [support@kalen.si](mailto:support@kalen.si).

## Your X assistant, inside Claude.

 [Get started](https://kalen.si/signup)

More in Kalen guides

[KALEN GUIDES](https://kalen.si/blog/category/kalen-guides) Dec 4, 2026 · 5 min

## [Postwise Alternative: Pricing and Options for X in 2026](https://kalen.si/blog/postwise-alternative)

Postwise is an AI post writer and scheduler for X, LinkedIn and Threads, from $37 a month as of November 2026. What it does well and the alternatives.

[KALEN GUIDES](https://kalen.si/blog/category/kalen-guides) Dec 3, 2026 · 5 min

## [BlackMagic Twitter: It Shut Down, What to Use Now](https://kalen.si/blog/blackmagic-twitter)

BlackMagic, the Twitter CRM and analytics extension, shut down on July 1, 2026. What happened, what it did, and the X tools that replace each part.

[KALEN GUIDES](https://kalen.si/blog/category/kalen-guides) Dec 1, 2026 · 6 min

## [Postiz Pricing 2026: Plans, Limits and Self-Hosting](https://kalen.si/blog/postiz-pricing)

Postiz pricing as of December 2026: Standard $29, Team $39, Pro $49 and Ultimate $99 a month. What each plan includes, the self-hosted option and who it fits.
