Command line
One npm package, three doors: a CLI for shells, scripts and agents that have no MCP client; the local MCP server for a self-hosted instance or for uploading files from the machine it runs on; and the fallback the skill reaches for. Every command is one route of the public API, so guardrails, the approval queue, key scopes and rate limits apply unchanged — a post created here is submitted, not published.
Sign in
npx xpost login
Opens your browser on the xpost sign-in page; pick the project, press Allow. The grant is an ordinary agent key on Project → AI agent → Keys — Disconnect there ends it. On a machine with no browser, set XPOST_API_KEY instead; a self-hosted instance is --url or XPOST_URL.
Post
npx xpost accounts npx xpost rules <accountId> npx xpost upload ./launch.png --alt "The new dashboard" npx xpost posts create -c "Shipped it." -a x:yourhandle -a linkedin:yourname \ --media <mediaId> --at 2026-10-01T09:00:00+02:00 npx xpost posts list --status pending_approval npx xpost posts edit <postId> -c "Shipped it — and it is fast." npx xpost receipt <postId>
Output is the API's own JSON on stdout. A refusal prints the API's body and exits 1 — read error_code, not the sentence. posts create --json takes the raw request body when the flags run out.
As a local MCP server
claude mcp add xpost -- npx xpost mcp
Signed in through the CLI, so no key sits in the client's config. Most people do not need this: the hosted connector at https://xpost.to/api/mcp works from any MCP client with nothing installed. The local server is for a self-hosted instance and for a file the agent holds on this machine.
Where it lives
The package is xpost on npm; the skill and plugin manifests are github.com/xpost-to/xpost-agent.