X (Twitter) MCP by usefulapi
v1.3.1Look up users, search and read posts, and publish or delete your own posts in X.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
twitterx_get_user_by_username Get a user by username
Look up an X user by username and return the user object (id, name, description, public metrics). Use this first to get the numeric user id the other tools need. X API: GET /2/users/by/username/{username}.
| Parameter | Type | Description |
|---|---|---|
username * | string | X username, with or without the leading @. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_user Get a user by id
Get one X user by numeric id, with the requested user fields. X API: GET /2/users/{id}.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_me Get the authenticated user
Return the X account that owns the token. Needs the X sign-in (user context); an app-only Bearer Token gets an error. X API: GET /2/users/me.
| Parameter | Type | Description |
|---|---|---|
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_followers List followers
List the followers of a user, one page at a time (up to 1000 per page). Follow meta.next_token for more. X API: GET /2/users/{id}/followers.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
max_results | integer | Users per page, 1-1000. |
pagination_token | string | Pagination token from meta.next_token of the previous page. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_following List accounts a user follows
List the accounts one user follows, one page at a time (up to 1000 per page). X API: GET /2/users/{id}/following.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
max_results | integer | Users per page, 1-1000. |
pagination_token | string | Pagination token from meta.next_token of the previous page. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_post Get a post by id
Get one X post by numeric id, with the requested post fields and expansions. X API: GET /2/tweets/{id}.
| Parameter | Type | Description |
|---|---|---|
post_id * | string | Numeric X id. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_posts Get several posts by id
Get up to 100 X posts in one call from a comma list of numeric ids. X API: GET /2/tweets?ids=.
| Parameter | Type | Description |
|---|---|---|
post_ids * | string | Comma-separated numeric post ids, up to 100. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_search_recent_posts Search recent posts
Search X posts from the last 7 days with the X query language (operators such as from:, to:, lang:, -is:retweet). Returns up to 100 posts per page. X API: GET /2/tweets/search/recent.
| Parameter | Type | Description |
|---|---|---|
query * | string | X search query, for example "mcp server lang:en -is:retweet". |
end_time | string | ISO 8601 end time, e.g. 2026-11-20T00:00:00Z. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
max_results | integer | Posts per page, 10-100. |
next_token | string | Pagination token from meta.next_token. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
sort_order | string | Result order. |
start_time | string | ISO 8601 start time, e.g. 2026-11-01T00:00:00Z. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_user_posts List a user's posts
List the posts of one user, newest first, one page at a time. Replies and retweets can be excluded. X API: GET /2/users/{id}/tweets.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
end_time | string | ISO 8601 end time, e.g. 2026-11-20T00:00:00Z. |
exclude | string | Comma list to exclude: retweets, replies. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
max_results | integer | Posts per page, 5-100. |
pagination_token | string | Pagination token from meta.next_token of the previous page. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
start_time | string | ISO 8601 start time, e.g. 2026-11-01T00:00:00Z. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_user_mentions List posts that mention a user
List posts that mention one user, one page at a time. X API: GET /2/users/{id}/mentions.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
end_time | string | ISO 8601 end time, e.g. 2026-11-20T00:00:00Z. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
max_results | integer | Posts per page, 5-100. |
pagination_token | string | Pagination token from meta.next_token of the previous page. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
start_time | string | ISO 8601 start time, e.g. 2026-11-01T00:00:00Z. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_get_liked_posts List posts a user liked
List the posts one user liked, one page at a time. X API: GET /2/users/{id}/liked_tweets.
| Parameter | Type | Description |
|---|---|---|
user_id * | string | Numeric X id. |
expansions | string | Comma list of expansions, e.g. author_id,attachments.media_keys. |
max_results | integer | Posts per page, 1-100. |
pagination_token | string | Pagination token from meta.next_token of the previous page. |
post_fields | string | Comma list of post fields, e.g. created_at,public_metrics,author_id. |
user_fields | string | Comma list of user fields, e.g. description,public_metrics,verified. |
twitterx_create_post Create a post
Publish one post from the authenticated account, only when the user asks for it. Needs a user-context access token and uses pay-per-usage credits. Set reply_to_post_id to reply to a post. X API: POST /2/tweets.
| Parameter | Type | Description |
|---|---|---|
text * | string | Post text, up to 280 characters. |
reply_to_post_id | string | Post id to reply to, if any. |
twitterx_delete_post Delete a post
Delete one post from the authenticated account, only when the user asks for it. This cannot be undone. Needs a user-context access token. X API: DELETE /2/tweets/{id}.
| Parameter | Type | Description |
|---|---|---|
post_id * | string | Numeric X id. |