MCP server · CLI · Claude Code plugin

Your X account,
from the terminal.

Post, thread, upload media, read timelines and DMs, manage bookmarks and lists, and check analytics — through one typed operation registry that powers a CLI, an MCP server and agent plugins.

npm install -g x-mcp-automation
zsh — xctl
$ npm install -g x-mcp-automation
added 3 packages in 1s

$ xctl setup
Signing in to X (a browser window will open)...
ok  oauth        expires 2026-10-21T22:40:00Z, refreshable
ok  claude       plugin (global) installed
ok  codex        plugin (global) installed
ok  opencode     global mcp C:\Users\you\.config\opencode\opencode.json
Next: restart your agent and run /mcp.

$ xctl posts create --text "hello from the terminal" --dry-run
{"id":null,"text":"hello from the terminal","cost_usd":0.015,"dry_run":true}

One registry, every surface

Every operation is defined once with a zod schema. The CLI, the MCP server and the SDK are projections of the same definition.

Posts and threads

Create, edit, delete, thread, poll, quote reads, hide replies, repost. Media upload with alt text and chunked video.

Reads and analytics

Home, user and mention timelines, recent and full-archive search, post metrics, engagement summaries, usage and credits.

DMs and bookmarks

Send and read direct messages, list conversations, manage bookmarks, lists, members, blocks and mutes.

Long-form and discovery

Articles draft and publish, trending topics, Spaces and Communities reads, X News, liked and quote-post reads.

Works with your agent

Claude Code plugin with a skill and slash commands, plus installers for Codex, opencode and Google Antigravity.

Built for restraint

Spend caps, a 30-second duplicate guard, header-seeded rate buckets and no batch or engagement-farming verbs.

Official first. Honest about the rest.

X removed a lot in 2026. The project does not pretend otherwise.

CapabilityOfficial APIIn xctl
Post, thread, poll, media, edit, deleteWorksOfficial
DMs, bookmarks, lists, reads, analyticsWorksOfficial
ReplySummoned onlySubmits; X may return 403
Quote postEnterpriseUnofficial, opt-in
Like / followRemovedUnofficial, one target, opt-in
Profile edit, avatar, banner, pinned postNo endpointUnofficial, opt-in

The unofficial transport uses your logged-in browser session against private endpoints. X prohibits this and may permanently suspend the account. It is off by default and every action requires an explicit confirmation.

Install in one command

Node.js 24 or newer. The npm package bundles every JavaScript dependency.

npm

npm install -g x-mcp-automation
xctl setup

Bins: xctl, xctl-mcp, and the aliases x, x-mcp.

npx, no global install

npx -y x-mcp-automation setup

The Claude Code plugin ships its own server bundle.

PyPI / pipx

pipx install x-mcp-automation
xctl setup

A launcher; Node.js 24 is still required.

Agents and scopes

Install for every agent found on PATH, or choose targets and a scope.

xctl install all
xctl install all --scope project
xctl install codex opencode
xctl uninstall all

Claude Code and Codex support global and project scopes. opencode writes JSON config. Antigravity is global only.

Guardrails, not promises