Back to MCP Catalog

X/Twitter Integration MCP Server

CommunicationPython
Create, manage, and publish X/Twitter posts directly through Claude
Available Tools

createTweet

Create a new tweet or thread on X/Twitter

showDrafts

Display all draft tweets that haven't been published yet

publishDraft

Publish a draft tweet to your X/Twitter account

deleteDraft

Delete a draft tweet that hasn't been published

The X/Twitter Integration MCP server enables seamless interaction with your X/Twitter account directly from Claude. Create and publish tweets, compose thread sequences, manage draft posts, and handle your Twitter presence without leaving your AI assistant. This integration provides a streamlined workflow for social media management, allowing you to draft content with Claude's help and publish it directly to your X/Twitter account. The server handles all the authentication and API interactions, making it simple to maintain your social media presence.

Overview

The X/Twitter Integration MCP server allows you to manage your X/Twitter account directly through Claude. You can create tweets, compose threads, manage drafts, and publish content without switching between applications.

Installation

Option 1: Installing via Smithery (Recommended)

The easiest way to install the X/Twitter Integration is through Smithery:

npx -y @smithery/cli install x-mcp --client claude

This will automatically set up the server with the correct configuration.

Option 2: Manual Installation

  1. Clone the repository:
git clone https://github.com/vidhupv/x-mcp.git
  1. Install UV globally using Homebrew:
brew install uv
  1. Create a configuration file for Claude Desktop:

    • For MacOS: Create claude_desktop_config.json in ~/Library/Application Support/Claude/
    • For Windows: Create claude_desktop_config.json in %APPDATA%/Claude/
  2. Add the following configuration to the file, replacing the placeholders with your actual values:

{
  "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"
      }
    }
  }
}

X/Twitter API Credentials

To use this integration, you'll need to obtain API credentials from X/Twitter:

  1. Go to the X API Developer Portal
  2. Create a new project
  3. In User Authentication Settings:
    • Set up with Read and Write permissions
    • Select Web App type
    • Set Callback URL to http://localhost/
    • Set Website URL to http://example.com/
  4. Generate and copy all keys and tokens from the Keys and Tokens section
  5. Add these credentials to your configuration file

Usage

After installation, restart Claude completely. You can then interact with your X/Twitter account using natural language commands:

  • Create a single tweet: "Tweet 'Just learned how to tweet through AI - mind blown! 🤖✨'"
  • Create a thread: "Create a thread about the history of pizza"
  • Manage drafts: "Show me my draft tweets"
  • Publish content: "Publish this draft!"
  • Delete drafts: "Delete that draft"

Troubleshooting

If you encounter issues:

  • Verify UV is installed correctly. If not, uninstall with pip uninstall uv and reinstall with brew install uv
  • If UV isn't in your PATH, find its location with which uv and replace "command": "uv" with the full path
  • Double-check all X/Twitter API credentials
  • Ensure the path to the x-mcp repository in your configuration is correct
  • Restart Claude completely after making configuration changes

Related MCPs

YouTube Transcript
CommunicationTypeScript

Retrieve transcripts from YouTube videos

iMessage Query
CommunicationPython

Access and analyze your iMessage conversations through a secure MCP server

Slack Integration
CommunicationTypeScript

Enables AI assistants to interact with Slack workspaces

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.