X (Twitter) is an MCP server that connects Claude Desktop directly to the X (formerly Twitter) platform to compose and publish content. Built for social media managers, developers, and content creators, the integration enables users to interact with X through natural language inside their conversational AI client. Instead of switching windows to manage a social profile, users can draft single tweets, generate multi-tweet threads, inspect saved drafts, and publish updates immediately via their X Developer account credentials. The server bridges the Model Context Protocol with the official X API, supporting standard read and write actions configured through personal API keys and tokens. By integrating post creation and thread drafting directly into the LLM interface, users can iterate on messaging, review tweet length and formatting, inspect previous drafts, and confirm publication without manual copy-pasting. The tool requires user-configured API credentials from the X Developer Portal with appropriate read and write permissions to safely authenticate and execute tweet operations on behalf of the connected user account.
Category: Communication & Messaging
Tags: posting, social-media, twitter, x
npx -y @smithery/cli install x-mcp --client claude 2. Alternatively, perform manual setup by cloning the repository: git clone https://github.com/yourusername/x-mcp.git 3. Install UV globally using Homebrew: brew install uv 4. Open your Claude configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows). 5. Add the server configuration to claude_desktop_config.json: json { "mcpServers": { "x_mcp": { "command": "uv", "args": [ "--directory", "/path/to/x-mcp", "run", "x-mcp" ], "env": { "TWITTER_API_KEY": "your_api_key", "TWITTER_API_SECRET": "your_api_secret", "TWITTER_ACCESS_TOKEN": "your_access_token", "TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret" } } } } 6. Obtain API credentials from the X API Developer Portal with Read and Write permissions. 7. Replace /path/to/x-mcp with your actual repository path, insert your credentials, save, and restart Claude.Part of MCP Servers
The X (Twitter) MCP server allows conversational AI models to manage and publish content on X. Users can instruct Claude to compose standard tweets, build multi-part threads, display currently drafted posts, publish confirmed drafts, or delete pending drafts without opening the web interface or external social media tools.
The server is designed and tested primarily for Claude Desktop on macOS and Windows. Any MCP-compatible client that supports standard Model Context Protocol servers communicating over local process execution using commands like uv can also register and run the server using the provided JSON configuration.
You can install the server automatically using the Smithery CLI with the command npx -y @smithery/cli install x-mcp --client claude. Alternatively, clone the repository manually from GitHub, install uv via Homebrew, obtain your X API keys from the Developer Portal, and configure claude_desktop_config.json.
You must set up an account in the X API Developer Portal and configure a project with Read and Write permissions. The integration requires four environment variables: TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN, and TWITTER_ACCESS_TOKEN_SECRET configured in your client JSON settings.