getxapi-mcp
OfficialThis server provides comprehensive read and write access to the Twitter/X API. The main capabilities are:
Search & Discovery: Search tweets with advanced operators, search users by keyword/username/topic, and search your own bookmarks.
Tweet Operations: Get tweet details, threads, replies, and retweeters; post tweets (text, images, videos, reply, quote); like, retweet, bookmark/unbookmark; delete tweets.
User & Profile Operations: Get user info (profile, metadata, about, affiliates); get followers and following lists (standard, v2 with canDM, verified); get user tweets, tweets & replies, complete threads, media, mentions, likes; check follow relationships and mutual followers; follow/unfollow; update profile, avatar, and banner.
Articles (Long-form): Create, update, publish/unpublish, delete, list your articles (drafts or published), and get article content.
Direct Messages: List conversations (inbox, requests, spam), get DM conversation history, send direct messages.
Timeline & Bookmarks: Get the home timeline (For You/Following), list and search bookmarks.
Lists & Communities: Get members of a public list, join X communities.
Account & Authentication: Log into an X account (with optional 2FA) to enable write actions; upload media (image, video, GIF); get GetXAPI account info and payment/top-up history.
GetXAPI MCP: Twitter/X API for Claude, Cursor and any MCP client
The official GetXAPI MCP server. Give your AI assistant direct access to the Twitter/X API: search tweets, look up users, read replies and followers, and post tweets, send DMs, manage articles, and more, through one Model Context Protocol server.
Unlike read-only Twitter MCP servers, GetXAPI MCP can act: post tweets, reply, like, retweet, send DMs, and publish articles, not just read.
→ Get a free API key at getxapi.com · API docs · Pricing ($0.001/call, $0.05 per 1,000 tweets)
Install
Add it to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"getxapi": {
"command": "npx",
"args": ["-y", "@getxapi/mcp@latest"],
"env": {
"GETXAPI_KEY": "get-x-api-..."
}
}
}
}Get your GETXAPI_KEY from your GetXAPI dashboard. That's
all the read tools need.
Or via the Claude Code CLI:
claude mcp add getxapi -- npx -y @getxapi/mcp@latestRelated MCP server: x-mcp
What you can do
Once installed, just ask your assistant naturally:
"Find Elon Musk's latest tweets" "Search tweets about OpenAI from the last week" "Who are @vercel's verified followers?" "Get the replies to this tweet: 1799…" "Post 'shipping 🚀' to my X account" (requires X auth, see below)
Read vs. write tools
Needs | Examples | |
Read |
| search tweets, user info, followers/following, replies, mentions, user tweets, lists |
Write / private |
| post / reply / like / retweet / bookmark / delete tweet, send DM, read DMs/timeline/bookmarks, publish articles, update profile |
Enabling write tools
Write and private tools act on a real X account, so they need that account's auth. Two ways to provide it:
Option A, log in through the assistant (convenient):
"Log in to my X account"
The assistant calls the x_login tool with your credentials and keeps the
session for write tools.
⚠️ Your X password is passed as tool arguments, so it transits the AI model's
context. For sensitive accounts, prefer Option B.
Option B, set credentials in config (recommended for sensitive accounts):
{
"mcpServers": {
"getxapi": {
"command": "npx",
"args": ["-y", "@getxapi/mcp@latest"],
"env": {
"GETXAPI_KEY": "get-x-api-...",
"X_AUTH_TOKEN": "...",
"X_CT0": "...",
"X_TWID": "...",
"X_PROXY": "http://user:pass@host:port"
}
}
}
}X_CT0, X_TWID, and X_PROXY are optional. X_AUTH_TOKEN alone is enough
for most write tools; the others improve reliability on some accounts.
Your X password never touches the model. The credential fields are never shown to the AI. The server injects them only into the calls that need them.
How billing works
Every tool call is a normal GetXAPI API call authenticated with your
GETXAPI_KEY, metered exactly like direct API usage. No separate MCP billing.
See pricing.
Related repositories
twitter-api-alternatives: all 73 endpoints, per-1,000-tweet cost math and the X API v2 migration map
getxapi-examples: runnable samples in curl, Python, Node.js, Go, Rust, PHP, Ruby and Java
Links
🌐 Website: getxapi.com
📈 Status: getxapi.com/status
📚 API docs: docs.getxapi.com
💳 Pricing: getxapi.com/pricing
🔑 Get an API key: getxapi.com
GetXAPI is an independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by X Corp.
License
MIT
Available Tools
53 toolsadvanced_search_tweetsBRead-only
Search tweets with advanced operators using GetXAPI
Inputs: q (required), cursor, product.
bookmark_tweetC
Bookmark a tweet programmatically via API
Inputs: tweet_id (required).
check_follow_relationshipBRead-only
Check if one Twitter user follows another via API
Inputs: source_user_name (required), target_user_name (required).
create_articleB
Create (and optionally publish) a long-form Twitter/X article in one call
Inputs: title (required), content (required), publish, cover_media_id, +2 more.
create_tweetB
Post tweets with text, images, and videos via API
Inputs: text (required), media, media_ids, media_urls, +5 more.
delete_articleBDestructive
Permanently delete a Twitter/X article entity (draft or published)
Inputs: article_id (required).
delete_tweetADestructive
Permanently delete a tweet owned by the auth_token's account
Inputs: tweet_id (required).
favorite_tweetB
Like (favorite) a tweet programmatically via API
Inputs: tweet_id (required).
follow_userC
Follow a user on X programmatically via API
Inputs: user_id, username.
get_account_infoARead-only
Get your GetXAPI account details, credit balance, and usage summary via API
Inputs: no named parameters.
get_articleBRead-only
Fetch full Twitter/X article and note content
Inputs: id, article_id.
get_direct_message_conversationARead-only
Fetch the full message history of one Twitter DM conversation, newest first with cursor pagination
Inputs: conversation_id (required), count, cursor.
get_followers_you_knowCRead-only
Get mutual followers between two Twitter accounts via API
Inputs: cursor, user_id, user_name.
get_home_timelineARead-only
Fetch your Twitter home timeline feed via API. Default is the 'For You' feed (algorithmic, includes recommended posts from accounts you don't follow); set following=true for the 'Following' feed (reverse-chronological, only accounts you follow).
Inputs: cursor, following.
get_list_membersBRead-only
Get all members of a public Twitter/X list via API
Inputs: listId (required), cursor.
get_payment_historyBRead-only
Get your GetXAPI payment and top-up history via API
Inputs: no named parameters.
get_tweet_detailARead-only
Get a single tweet with full author, media, and engagement data via API
Inputs: id (required).
get_tweet_repliesBRead-only
Fetch all replies to a tweet via API
Inputs: id (required), cursor.
get_tweet_retweetersARead-only
Fetch the list of users who reposted (retweeted) a given tweet
Inputs: id (required), cursor.
get_tweet_threadARead-only
Resolve a linear self-thread from any tweet in the thread
Inputs: id (required).
get_user_aboutBRead-only
Get Twitter account metadata including creation location and username history via API
Inputs: userName (required).
get_user_affiliatesBRead-only
Get affiliated accounts of a verified Twitter/X organization via API
Inputs: userName (required), cursor.
get_user_followersARead-only
Get a Twitter user's followers list with profile details via API
Inputs: userName (required), cursor.
get_user_followers_v2ARead-only
Get a Twitter user's followers list with ~70 results per page and canDm field
Inputs: userName (required), cursor.
get_user_followingBRead-only
Get accounts a Twitter user is following via API
Inputs: userName (required), cursor.
get_user_following_v2ARead-only
Get accounts a Twitter user is following with ~70 results per page and canDm field
Inputs: userName (required), cursor.
get_user_infoARead-only
Get Twitter user profiles, followers, verified status via API
Inputs: userName (required).
get_user_info_by_idARead-only
Look up Twitter user profiles by numeric ID via API
Inputs: userId (required).
get_user_likesCRead-only
Fetch a Twitter user's liked tweets via API
Inputs: cursor.
get_user_mediaARead-only
Fetch tweets containing images and videos from a Twitter user via API
Inputs: userName (required), cursor.
get_user_mentionsARead-only
Fetch recent tweets that mention a Twitter user via API
Inputs: userName (required), cursor.
get_user_tweetsBRead-only
Fetch all tweets posted by a Twitter user via API
Inputs: cursor, userId, userName.
get_user_tweets_and_repliesCRead-only
Fetch tweets and replies posted by a Twitter user via API
Inputs: userName (required), cursor.
get_user_tweets_completeARead-only
Fetch tweets and replies posted by a Twitter user with self-thread expansion
Inputs: userName (required), cursor.
get_verified_followersARead-only
Get a user's verified (blue check) followers via API
Inputs: userName (required), cursor.
join_communityB
Join an X (Twitter) community by its numeric community ID
Inputs: community_id (required).
list_articlesARead-only
Paginated list of the auth_token user's own Twitter/X articles (drafts or published)
Inputs: count, cursor, lifecycle.
list_bookmarksCRead-only
List all of a user's Twitter bookmarks via API
Inputs: cursor.
list_direct_messagesBRead-only
Fetch Twitter direct messages via API
Inputs: tab, count, cursor.
publish_articleB
Publish an existing draft Twitter/X article to the timeline
Inputs: article_id (required).
retweet_tweetC
Retweet a tweet programmatically via API
Inputs: tweet_id (required).
search_bookmarksCRead-only
Search inside a user's Twitter bookmarks via API
Inputs: q (required), cursor.
search_usersBRead-only
Search for Twitter/X users by keyword, username, or topic
Inputs: q (required), cursor.
send_direct_messageB
Send Twitter direct messages programmatically via API
Inputs: text (required), recipient_id, recipient_username.
unbookmark_tweetA
Remove a tweet from your bookmarks programmatically via API
Inputs: tweet_id (required).
unfollow_userB
Unfollow a user on X programmatically via API
Inputs: user_id, username.
unpublish_articleBDestructive
Move a published Twitter/X article back to draft and remove the wrapper tweet
Inputs: article_id (required).
update_articleA
Partial-update an existing Twitter/X article — title, body markdown, or cover image
Inputs: article_id (required), title, content, cover_media_id, +2 more.
update_avatarB
Update a Twitter user's profile picture programmatically via API
Inputs: image_url, image_base64.
update_bannerB
Update a Twitter user's profile banner programmatically via API
Inputs: image_url, image_base64.
update_profileB
Update Twitter profile fields (name, bio, location, URL, color, birthdate) programmatically via API
Inputs: url, name, location, description, +5 more.
upload_mediaC
Uploads media to Twitter via the 3-step INIT/APPEND/FINALIZE flow
Inputs: media_url, media_data, media_type.
x_loginA
Log into an X account with username/password (and email or TOTP if challenged) to enable write/private tools for this session. SECURITY: your X password is passed as tool arguments, so it transits the AI model's context and your model provider. For sensitive accounts, instead set X_AUTH_TOKEN in your MCP config and skip this tool.
Inputs: password (required), username (required), email, totp_secret.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 53 tools
Most tools have clearly distinct purposes, but there are overlapping pairs like get_user_followers/get_user_followers_v2 and multiple get_user_info variants that could cause confusion. Descriptions help differentiate, but the duplication reduces clarity.
The majority of tools follow a consistent verb_noun naming pattern in snake_case. However, 'x_login' breaks the pattern and v2 suffixes (get_user_followers_v2) are slightly inconsistent with the base tools.
53 tools is excessive for a single server, especially when many functionality clusters (e.g., followers have multiple variants) could be consolidated. This heavy surface makes selection harder for agents.
The tool set covers a broad spectrum of Twitter operations: tweets, users, followers, DMs, articles, bookmarks, communities, and profile management. Minor gaps exist (e.g., no list creation or DM deletion), but overall it's comprehensive.
Maintenance
Related MCP Connectors
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
Hosted MCP server from TwitterAPI.io that gives AI agents read-only access to Twitter/X data. 12 tools: tweet search with X operators, user profiles, a user's latest tweets, followers and followings, replies, quotes, retweeters, mentions and trends. Connect at https://mcp.twitterapi.io/mcp with a TwitterAPI.io API key or account sign-in; usage is paid per result returned. Separately, TwitterAPI.io also offers x402 pay-per-call HTTP endpoints (tweet search, user info, a user's latest tweets) paid in USDC on Base or Solana with no account or API key; see https://docs.twitterapi.io/x402-pay-per-call. The MCP server itself uses an API key or sign-in.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.11MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides AI agents with full access to the X (Twitter) API for posting, searching, and managing engagement through natural language. It supports comprehensive tools for tweet management, media uploads, and account analytics across multiple MCP-compatible clients.1563MIT
- AlicenseAqualityCmaintenanceMCP server for Twitter/X enabling AI agents to search, post, reply, and engage with tweets.147 npm2MIT
- AlicenseBqualityDmaintenanceMCP server for interacting with the X platform (Twitter) via MCP clients like Claude, Cursor AI, and Windsurf AI.206MIT