mcp-x-publisher
mcp-x-publisher
MCP (Model Context Protocol) server for posting single tweets, threads, and saving drafts to X (Twitter) automatically using Playwright.
Installation / Usage with MCP Clients
Add the following JSON configuration to your MCP client (Claude Desktop, Cursor, Kiro, Claude Code, etc.):
{
"mcpServers": {
"x-publisher": {
"command": "npx",
"args": ["-y", "mcp-x-publisher"],
"env": {
"X_AUTH_TOKEN": "YOUR_AUTH_TOKEN_HERE",
"X_CT0": "YOUR_CT0_HERE"
}
}
}
}Features
x_publish_post: Publish single post to X (text and optional image).x_publish_thread: Publish multi-tweet thread to X sequentially.x_save_draft: Save a tweet to X online draft box.
Authentication
Authentication cookies can be provided via environment variables:
X_AUTH_TOKEN:auth_tokencookie value from your X login session.X_CT0:ct0cookie value from your X login session.
Alternatively, if no environment variables are specified, it will attempt to load saved cookies from ~/.config/baoyu-skills/x-to-markdown/cookies.json (Linux/macOS) or %APPDATA%\baoyu-skills\x-to-markdown\cookies.json (Windows).
License
MIT