X (Twitter) MCP server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TWITTER_API_KEYYesYour Twitter API key from the Twitter Developer Portal
PYTHONUNBUFFEREDNoEnsures output is unbuffered for better logging in Claude1
TWITTER_API_SECRETYesYour Twitter API secret from the Twitter Developer Portal
TWITTER_ACCESS_TOKENYesYour Twitter access token from the Twitter Developer Portal
TWITTER_BEARER_TOKENYesYour Twitter bearer token from the Twitter Developer Portal
TWITTER_ACCESS_TOKEN_SECRETYesYour Twitter access token secret from the Twitter Developer Portal

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
get_user_profile

Get detailed profile information for a user

get_user_by_screen_name

Fetches a user by screen name

get_user_by_id

Fetches a user by ID

get_user_followers

Retrieves a list of followers for a given user

get_user_following

Retrieves users the given user is following

get_user_followers_you_know

Retrieves a list of common followers

get_user_subscriptions

Retrieves a list of users to which the specified user is subscribed

post_tweet

Post a tweet with optional media, reply, and tags

delete_tweet

Delete a tweet by its ID

get_tweet_details

Get detailed information about a specific tweet

create_poll_tweet

Create a tweet with a poll

vote_on_poll

Vote on a poll

favorite_tweet

Favorites a tweet

unfavorite_tweet

Unfavorites a tweet

bookmark_tweet

Adds the tweet to bookmarks

delete_bookmark

Removes the tweet from bookmarks

delete_all_bookmarks

Deletes all bookmarks

get_timeline

Get tweets from your home timeline (For You)

get_latest_timeline

Get tweets from your home timeline (Following)

search_twitter

Search Twitter with a query

get_trends

Retrieves trending topics on Twitter

get_highlights_tweets

Retrieves highlighted tweets from a user’s timeline

get_user_mentions

Get tweets mentioning a specific user

ID: 7w9byzj3wm