You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x-mcp 1.0.0 An MCP server for X (Twitter), built for AI agents: 10 grouped tools with 69 actions. ### Highlights - Posts and threads — publish, reply, quote, create threads, search recent/full archive, counts, conversations, likers/reposters/quotes, hide replies. - Timelines and users — home/user timelines, mentions, likes, bookmarks, profiles, followers, follows, mutes, blocks. - Lists, Spaces, trends and DMs — manage Lists, read Spaces, location/personalized trends, send and read Direct Messages. - Media — upload with the v2 chunked flow (v1.1 fallback for OAuth 1.0a), check processing, and view media: photos are returned as MCP image content; videos are sampled into frames when ffmpeg is installed. - Authentication — OAuth 2.0 PKCE with automatic refresh, OAuth 1.0a, and app-only bearer tokens. - Performance — keep-alive HTTP, batched reads, TTL cache with request coalescing, per-endpoint rate-limit tracking, compact normalised payloads. - Safety — read-only and dry-run modes, SSRF-safe media downloads, upload roots and extension allowlists, HTTP bearer auth, structured errors with recovery hints. - MCP-native — tools, resources (x://me, post/user/list templates), prompts, progress notifications, stdio and Streamable HTTP transports. ### Requirements Node.js 22.18+. ffmpeg is optional and only needed to extract video frames. ### Quick start bash npm install npm run build # public reads export X_BEARER_TOKEN="..." # user context: posting, DMs, bookmarks node dist/index.mjs auth --client-id YOUR_OAUTH2_CLIENT_ID node dist/index.mjs ### Add to an MCP client json { "mcpServers": { "x": { "command": "node", "args": ["/absolute/path/to/x-mcp/dist/index.mjs"], "env": { "X_BEARER_TOKEN": "..." } } } } The npm package is published as @el4cteo/x-mcp. ### Tool interface Ten domain tools each take an action plus its parameters: json { "action": "search", "query": "mcp -is:retweet", "max_results": 20 } Full documentation, tool/action catalogue and configuration reference are in the README.