X (Twitter) MCP Server for Cloudflare Workers
63 tools available in the Twitter/X MCP server. Each tool can be called by AI assistants to perform specific actions.
twitter_pin_listPin a list.
Args:
Returns: Pin status.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_unpin_listUnpin a list.
Args:
Returns: Pin status.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_add_list_memberAdd a user to a list.
Args:
Returns: Membership status.
{
"type": "object",
"required": [
"listId",
"userId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
},
"userId": {
"type": "string",
"description": "User ID to add"
}
}
}twitter_remove_list_memberRemove a user from a list.
Args:
Returns: Membership status.
{
"type": "object",
"required": [
"listId",
"userId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
},
"userId": {
"type": "string",
"description": "User ID to remove"
}
}
}twitter_follow_listFollow a list.
Args:
Returns: Follow status.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_get_liked_tweetsGet tweets liked by a user.
Args:
Returns: List of liked tweets.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 5
},
"paginationToken": {
"type": "string"
}
}
}twitter_like_tweetLike a tweet.
Args:
Returns: Like status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to like"
}
}
}twitter_unlike_tweetUnlike a tweet.
Args:
Returns: Like status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to unlike"
}
}
}twitter_get_liking_usersGet users who liked a tweet.
Args:
Returns: List of users who liked the tweet.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"tweetId": {
"type": "string",
"description": "Tweet ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_retweetRetweet a tweet.
Args:
Returns: Retweet status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to retweet"
}
}
}twitter_undo_retweetUndo a retweet.
Args:
Returns: Retweet status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to unretweet"
}
}
}twitter_get_retweetersGet users who retweeted a tweet.
Args:
Returns: List of users who retweeted.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"tweetId": {
"type": "string",
"description": "Tweet ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_bookmark_tweetBookmark a tweet.
Args:
Returns: Bookmark status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to bookmark"
}
}
}twitter_remove_bookmarkRemove a bookmark from a tweet.
Args:
Returns: Bookmark status.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to unbookmark"
}
}
}twitter_get_bookmarksGet the authenticated user's bookmarked tweets.
Args:
Returns: List of bookmarked tweets.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_listGet a list by ID.
Args:
Returns: List details.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_get_owned_listsGet lists owned by a user.
Args:
Returns: User's owned lists.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_list_membershipsGet lists a user is a member of.
Args:
Returns: Lists the user is a member of.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_list_followersGet users following a list.
Args:
Returns: List followers.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"listId": {
"type": "string",
"description": "List ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_list_membersGet members of a list.
Args:
Returns: List members.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"listId": {
"type": "string",
"description": "List ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_list_tweetsGet tweets from a list's timeline.
Args:
Returns: Tweets from the list.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"listId": {
"type": "string",
"description": "List ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_create_listCreate a new list.
Args:
Returns: Created list.
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "List name"
},
"private": {
"type": "boolean",
"description": "Private list"
},
"description": {
"type": "string",
"description": "List description"
}
}
}twitter_update_listUpdate a list's metadata.
Args:
Returns: Updated list.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"name": {
"type": "string",
"description": "List name"
},
"listId": {
"type": "string",
"description": "List ID"
},
"private": {
"type": "boolean",
"description": "Private list"
},
"description": {
"type": "string",
"description": "List description"
}
}
}twitter_delete_listDelete a list.
Args:
Returns: Deletion confirmation.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_unfollow_listUnfollow a list.
Args:
Returns: Follow status.
{
"type": "object",
"required": [
"listId"
],
"properties": {
"listId": {
"type": "string",
"description": "List ID"
}
}
}twitter_get_dm_eventsGet the authenticated user's recent DM events (all conversations).
Args:
Returns: List of DM events.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_dm_conversationGet messages from a specific DM conversation.
Args:
Returns: Messages from the conversation.
{
"type": "object",
"required": [
"conversationId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"conversationId": {
"type": "string",
"description": "Conversation ID"
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_dm_conversation_with_userGet DM conversation with a specific user.
Args:
Returns: Messages from the 1-on-1 conversation.
{
"type": "object",
"required": [
"participantId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 100,
"minimum": 1
},
"participantId": {
"type": "string",
"description": "Other user\\'s ID"
},
"paginationToken": {
"type": "string"
}
}
}twitter_send_dmSend a direct message to an existing conversation.
Args:
Returns: The sent message.
{
"type": "object",
"required": [
"conversationId",
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Message text"
},
"conversationId": {
"type": "string",
"description": "Conversation ID"
}
}
}twitter_send_dm_to_userSend a direct message to a user (creates new conversation if needed).
Args:
Returns: The sent message.
{
"type": "object",
"required": [
"participantId",
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Message text"
},
"participantId": {
"type": "string",
"description": "Recipient user ID"
}
}
}twitter_create_group_dmCreate a new group DM conversation and send an initial message.
Args:
Returns: The created conversation and message IDs.
{
"type": "object",
"required": [
"participantIds",
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Initial message text"
},
"participantIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "User IDs to include"
}
}
}twitter_block_userBlock a user.
Args:
Returns: Block status.
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to block"
}
}
}twitter_unblock_userUnblock a user.
Args:
Returns: Block status.
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to unblock"
}
}
}twitter_get_blocked_usersGet the authenticated user's blocked users.
Args:
Returns: List of blocked users.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 1000,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_mute_userMute a user.
Args:
Returns: Mute status.
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to mute"
}
}
}twitter_unmute_userUnmute a user.
Args:
Returns: Mute status.
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to unmute"
}
}
}twitter_get_muted_usersGet the authenticated user's muted users.
Args:
Returns: List of muted users.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 1000,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_spaceGet a Space by ID.
Args:
Returns: Space details.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}twitter_get_spacesGet multiple Spaces by IDs.
Args:
Returns: Array of Spaces.
{
"type": "object",
"required": [
"spaceIds"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of Space IDs"
}
}
}twitter_get_spaces_by_creator_idsGet Spaces created by specific users.
Args:
Returns: Spaces created by the specified users.
{
"type": "object",
"required": [
"userIds"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of creator user IDs"
}
}
}twitter_search_spacesSearch for Spaces by query.
Args:
Returns: Matching Spaces.
{
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Search query"
},
"state": {
"enum": [
"live",
"scheduled",
"all"
],
"type": "string",
"default": "all",
"description": "Space state filter"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}twitter_get_space_buyersGet users who purchased tickets to a Space.
Args:
Returns: List of users who bought tickets.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}twitter_get_space_tweetsGet tweets shared in a Space.
Args:
Returns: Tweets shared in the Space.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}twitter_create_tweetCreate a new tweet/post.
Args:
Returns: The created tweet with ID and text.
{
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"description": "Tweet text content"
},
"mediaIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of media IDs to attach"
},
"quoteTweetId": {
"type": "string",
"description": "Tweet ID to quote"
},
"replyToTweetId": {
"type": "string",
"description": "Tweet ID to reply to"
}
}
}twitter_delete_tweetDelete a tweet by ID.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"tweetId": {
"type": "string",
"description": "Tweet ID to delete"
}
}
}twitter_get_tweetGet a single tweet by ID.
Args:
Returns: The tweet with all available fields.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"tweetId": {
"type": "string",
"description": "Tweet ID"
}
}
}twitter_get_tweetsGet multiple tweets by their IDs.
Args:
Returns: Array of tweets.
{
"type": "object",
"required": [
"tweetIds"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"tweetIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of tweet IDs"
}
}
}twitter_search_tweetsSearch for recent tweets matching a query.
Args:
Returns: Paginated list of matching tweets.
{
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Search query"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"endTime": {
"type": "string",
"description": "End time (ISO 8601)"
},
"nextToken": {
"type": "string",
"description": "Pagination token"
},
"startTime": {
"type": "string",
"description": "Start time (ISO 8601)"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 10
}
}
}twitter_get_user_tweetsGet tweets posted by a specific user.
Args:
Returns: User's tweets.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 5
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_user_mentionsGet tweets that mention a specific user.
Args:
Returns: Tweets mentioning the user.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 5
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_home_timelineGet the authenticated user's home timeline (reverse chronological).
Args:
Returns: Home timeline tweets.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_tweet_countsGet counts of tweets matching a query over time.
Args:
Returns: Tweet counts by time bucket.
{
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Search query"
},
"endTime": {
"type": "string"
},
"startTime": {
"type": "string"
},
"granularity": {
"enum": [
"minute",
"hour",
"day"
],
"type": "string",
"default": "hour"
}
}
}twitter_get_quote_tweetsGet tweets that quote a specific tweet.
Args:
Returns: Quote tweets.
{
"type": "object",
"required": [
"tweetId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"tweetId": {
"type": "string",
"description": "Tweet ID"
},
"maxResults": {
"type": "integer",
"default": 10,
"maximum": 100,
"minimum": 10
},
"paginationToken": {
"type": "string"
}
}
}twitter_hide_replyHide or unhide a reply to one of your tweets.
Args:
Returns: Updated hidden status.
{
"type": "object",
"required": [
"tweetId",
"hidden"
],
"properties": {
"hidden": {
"type": "boolean",
"description": "Hide (true) or unhide (false)"
},
"tweetId": {
"type": "string",
"description": "Reply tweet ID"
}
}
}twitter_get_userGet a user by their ID.
Args:
Returns: User profile information.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
}
}
}twitter_get_user_by_usernameGet a user by their username (handle).
Args:
Returns: User profile information.
{
"type": "object",
"required": [
"username"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"username": {
"type": "string",
"description": "Username without @"
}
}
}twitter_get_usersGet multiple users by their IDs.
Args:
Returns: Array of user profiles.
{
"type": "object",
"required": [
"userIds"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of user IDs"
}
}
}twitter_get_users_by_usernamesGet multiple users by their usernames.
Args:
Returns: Array of user profiles.
{
"type": "object",
"required": [
"usernames"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"usernames": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of usernames"
}
}
}twitter_get_meGet the authenticated user's profile.
Args:
Returns: Authenticated user's profile information.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}twitter_get_followersGet a user's followers.
Args:
Returns: List of followers.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 1000,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_get_followingGet users that a user is following.
Args:
Returns: List of users being followed.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"userId": {
"type": "string",
"description": "User ID"
},
"maxResults": {
"type": "integer",
"default": 100,
"maximum": 1000,
"minimum": 1
},
"paginationToken": {
"type": "string"
}
}
}twitter_follow_userFollow a user.
Args:
Returns: Follow status (following, pending).
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to follow"
}
}
}twitter_unfollow_userUnfollow a user.
Args:
Returns: Updated follow status.
{
"type": "object",
"required": [
"targetUserId"
],
"properties": {
"targetUserId": {
"type": "string",
"description": "User ID to unfollow"
}
}
}