SSyncDev

X Twitter MCP Server

A Model Context Protocol (MCP) server for interacting with Twitter (X) via AI tools. This server allows you to fetch tweets, post tweets, search

Local serverstdioPython

What is the X Twitter MCP Server?

A Model Context Protocol (MCP) server for interacting with Twitter (X) via AI tools. This server allows you to fetch tweets, post tweets, search Twitter, manage

The short version

  • Fetch user profiles, followers, and following lists
  • Post, delete, and favorite tweets
  • Search Twitter for tweets and trends
  • Manage bookmarks and timelines
  • Built-in rate limit handling for the Twitter API
  • Uses Twitter API v2 with proper authentication (API keys and tokens), avoiding the username/password hack to minimize the risk of account suspensions

What it needs from you

  • Python 3.10 or higher: Ensure Python is installed on your system. - Twitter Developer Account: You need API credentials (API Key, API Secret, Access Token, Access Token Secret, and Bearer Token) from the Twitter Developer Portal. - Optional: Claude Desktop: Download and install the Claude Desktop app from the [Anthropic

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_user_profile
get_user_by_screen_name
get_user_by_id
get_user_followers
get_user_following
get_user_followers_you_know
get_user_subscriptions
post_tweet
delete_tweet
get_tweet_details
create_poll_tweet
vote_on_poll
favorite_tweet
unfavorite_tweet
bookmark_tweet
delete_bookmark
delete_all_bookmarks
get_bookmarks
get_timeline
get_latest_timeline
search_twitter
get_trends
get_highlights_tweets
get_user_mentions

How to install the X Twitter MCP Server

{
  "mcpServers": {
    "x-twitter-mcp": {
      "command": "x-twitter-mcp-server",
      "args": [],
      "env": {
        "PYTHONUNBUFFERED": "1",
        "TWITTER_API_KEY": "YOUR_TWITTER_API_KEY",
        "TWITTER_API_SECRET": "YOUR_TWITTER_API_SECRET",
        "TWITTER_ACCESS_TOKEN": "YOUR_TWITTER_ACCESS_TOKEN",
        "TWITTER_ACCESS_TOKEN_SECRET": "YOUR_TWITTER_ACCESS_TOKEN_SECRET",
        "TWITTER_BEARER_TOKEN": "YOUR_TWITTER_BEARER_TOKEN",
        "TWITTER_OAUTH2_USER_ACCESS_TOKEN": "YOUR_TWITTER_OAUTH2_USER_ACCESS_TOKEN"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Python 3.10 or higher: Ensure Python is installed on your system. - Twitter Developer Account: You need API credentials (API Key, API Secret, Access Token, Access Token Secret, and Bearer Token) from the Twitter Developer Portal. - Optional: Claude Desktop: Download and install the Claude Desktop app from the [Anthropic
VariableDescriptionRequired
PYTHONUNBUFFEREDDeclared in the maintainer’s client configuration.Check documentation
TWITTER_API_KEYDeclared in the maintainer’s client configuration.Check documentation
TWITTER_API_SECRETDeclared in the maintainer’s client configuration.Check documentation
TWITTER_ACCESS_TOKENDeclared in the maintainer’s client configuration.Check documentation
TWITTER_ACCESS_TOKEN_SECRETDeclared in the maintainer’s client configuration.Check documentation
TWITTER_BEARER_TOKENDeclared in the maintainer’s client configuration.Check documentation
TWITTER_OAUTH2_USER_ACCESS_TOKENDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use X Twitter to Steps.”
  • “Use X Twitter to get user profile.”
  • “Use X Twitter to get user by screen name.”

Frequently asked questions

A Model Context Protocol (MCP) server for interacting with Twitter (X) via AI tools. This server allows you to fetch tweets, post tweets, search Twitter, manage Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.