x-use is an open-source Python Model Context Protocol (MCP) server and CLI tool for X (Twitter), used to connect AI clients to X platform research, inbox reading, and reviewed publishing workflows. It runs using the user's authenticated browser session, supports multiple accounts, and does not require official X API credentials.
Purpose x-use is primarily aimed at users who need to conduct research, replies, inbox management, and outreach work on X. It enables AI clients to search X, view profiles, read posts and limited thread context, and prepare relevant replies; at the same time, it can inspect visible conversations, unread messages, requests, and notifications, and prepare individual messages and supported conversation actions for review; it can also stage posts or multi-post threads, check the exact text, and approve drafts when ready. In addition, it supports maintaining leads, unsubscribes, and activity drafts locally, with per-account limits and delivery tracking.
Main capabilities x-use version 3.2.0 provides 82 tools, 7 prompts, 4 resource modes, and 7 built-in skills. 3.1.0 adds runtime diagnostics, activity previews, bookmarks, reviewed post editing/deletion, interaction undo, and inbox controls on top of the 70 tools in 3.0.0; 3.2.0 keeps the same tools on the MCP Python SDK v2 wire. The tools cover research, inbox management, reviewed publishing, and account operations. The AI client provides reasoning and text, and an optional OpenAI-compatible LLM configuration supports server-side generation, but ordinary explicit-text MCP workflows do not require that extra key.
Usage Requires Python 3.10+ and Chromium; the CI matrix covers Python 3.10–3.14 on Windows, macOS, and Linux. After installing the server and browser, choose a private data directory and initialize. Under Windows PowerShell, the wizard configures the account and imports the user's own X session cookies from a local JSON export. Cookies and the inbox PIN must be kept secret. Use the same absolute data directory in the client configuration; shell environment settings alone cannot configure a desktop client.
For clients that accept an mcpServers object (such as Claude Desktop), use the stdio configuration and replace both paths. On WindowsUse the installed x-use.exe path, using forward slashes in JSON, for example the data directory C:/Users/you/AppData/Local/x-use. You can locate the executable via PowerShell's Get-Command x-use or macOS/Linux's command -v x-use. Claude Code, Codex, Cursor, and Windsurf each have their own registration locations or commands, and you must follow the client setup instructions and reload the client if necessary. Before starting browser work, you can ask the client to call list_accounts.
First workflow example: With draft mode enabled, ask the client to check account health, research the specified profile and summarize its recent visible posts, prepare a relevant reply draft and display its ID and exact text, and wait for approval before publishing. The flow is get_account_health → get_profile_context → prepare_reply → reply_to_tweet → get_draft. Under the default policy, the reply tool stages a draft; prepare_reply provides context. Use approve_draft only when authorization is granted.
On Windows, you can use py -3 scripts/setup_uv.py --dev; on macOS/Linux, use python3 if necessary. The installation script installs uv if it is missing, syncs the locked dependencies to .venv, installs the matching Chromium, creates any missing example configuration, and runs diagnostics. Activate the environment or use its executable directly, then initialize the account. For auxiliary installation, you can use the setup prompts or install the root setup skill. The Claude Code plugin includes bundled skills and MCP configuration guidance.
For uvx clients, use uvx x-use-mcp or pin the version via uvx x-use-mcp==3.2.0. The x-use-mcp executable starts MCP without arguments; the existing x-use mcp command is still supported. Clients pinned to 3.0.0 must use uvx --from x-use-mcp==3.0.0 x-use mcp.
Execution mechanism The current MCP runtime uses asynchronous Patchright Chromium, and use separate contexts for different accounts. Configuration, cookies, drafts, queues, and operation logs are located under X_USE_HOME. Data processing by the AI client and optional model providers depends on the selected client and provider. The protocol implementation uses the MCP Python SDK v2 line (mcp>=2.3,<3), and negotiates handshake protocol versions from 2024-11-05 to 2025-11-25 with existing clients.
Regular posting enables draft mode by default. Messages, follows, and thread starts require draft approval. Direct posting mode, explicit queue processing, optional auto-draining, and the legacy batch runner each have their own execution paths. Review the configuration reference before changing these settings. A development checkout allows one MCP server process per X_USE_HOME, preventing concurrent servers from using stale draft and queue state. Close existing connections before opening the same data directory in another client.
Use cases x-use is suitable for users who need to conduct profile research, reply preparation, inbox triage, outreach management, and reviewed publishing on X, especially those who want to combine an AI client with a local browser session and avoid using official X API keys. It supports multi-account management, where accounts have independent cookies, browser contexts, and policy settings, with optional proxy routing. Browser capacity is limited and depends on the host and configuration.
Limitations Browser reading is limited to visible X content. Followers, inboxes, and threads are not complete exports; unavailable evidence remains unknown. Opening conversations or notifications may change their native read state. Encrypted inboxes may require the account owner's PIN after a browser context restart. Analytics currently report availability and observed Premium thresholds, and do not provide a full analytics dashboard. X layout changes, session expiration, account challenges, and platform limits may interrupt work. Local control does not guarantee protection from account restrictions. The legacy Selenium batch engine (x-use run / run_cycle) executes separately from MCP draft review. Community posting is currently unverified in the async runtime.
FAQ x-use does not require X API keys; it operates on visible X pages through browser actions authenticated with session cookies, and does not need official X API credentials; optional server-side text generation may require an LLM provider key. Any client that can start a local stdio MCP server can use x-use; setup examples cover Claude Desktop, Claude Code, Codex, Cursor, and Windsurf, and client-specific discovery and reload behavior varies. x-use does not automatically send every draft message; message drafts require separate approval; other write behaviors depend on draft mode, queue execution, and the legacy runner, so check the configuration policy before requesting actions. Multiple X accounts can be managed, with accounts having independent cookies, browser contexts, and policy settings, plus optional proxy routing. 3.1.0 adds reviewed editing and deletion of your own posts, bookmarks, unfollowing, and supported conversation requests, mute/unmute, and delete operations; X determines edit eligibility. Inbox history is partial; per-message editing/deletion, attachment sending, and group management are not implemented. The project is MIT licensed with no project license fees; AI client subscriptions, optional model providers, proxies, and hosting may incur their own costs. x-use is not affiliated with X and is an independent community project. The project was renamed from twitter-automation-ai to x-use upon its v2 re-release.
Documentation and community Start with the documentation index, which links to setup, workflows, tools, configuration, presets, architecture, and troubleshooting. X-Use is maintained by Huzaifa Shoukat and welcomes community contributions. You can report reproducible issues, start discussions, or contribute clearer setup instructions, mock browser fixtures, platform fixes, and example presets.