twitterapis
This MCP server provides programmatic access to Twitter/X data and actions through 40 tools (29 reads + 11 writes), enabling AI agents to search, retrieve, and manage tweets, user profiles, and direct messages.
Search & Discovery
Advanced tweet search using X operators (
from:,min_faves:,since:,filter:links, etc.) with ranking modes (Top, Latest, Media, People)User account search by name, keyword, or topic
User Profiles & Relationships
Get full user profiles by handle (
twitter_user_info) or numeric ID (twitter_user_info_by_id)Get structured About panel data (category, professional labels, joined date)
List affiliated accounts of an organization profile
Check follow relationships between two users
List followers and following (standard and v2 variants), verified followers only, and mutual followers ("Followers you know")
Tweets & Timelines
Get a user's original tweets, full activity timeline (tweets + replies), complete tweet history (auto-paginated), media posts, mentions, and liked tweets
Fetch single tweet details, replies, full threads, and retweeters
View your home timeline (requires authenticated session)
Lists, Bookmarks & DMs (session required)
List members of a Twitter/X List by list ID
View and search your bookmarks
List DM conversations and read messages within a specific conversation
Write Actions (require authenticated session)
Post new tweets (including replies and quote-tweets), delete your own tweets
Like/unlike, retweet/unretweet, bookmark/unbookmark tweets
Follow/unfollow users by numeric ID
Send Direct Messages
Key Features
Requires an API key (
TWITTERAPIS_KEY) for all operationsSupports pagination via cursors for all list-type endpoints
Supports per-call inline credentials (
auth_token+ct0) to act as different accounts under a single API keySupports
proxy_urlfor write actions to avoid datacenter IP soft-blocksSome endpoints (e.g.,
twitter_user_likes,twitter_user_tweets_complete) strictly requireuser_idrather than usernameDestructive actions (delete tweet, unfollow, etc.) are annotated with
destructiveHint: trueso MCP clients can prompt before executing
Provides Windsurf (by Codeium) with tools to access Twitter/X data such as tweets, user info, lists, and advanced search.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@twitterapisget the last 5 tweets from @openai"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@twitterapis/mcp
Official Model Context Protocol server for twitterapis.com, the Twitter / X API as native tools for Claude, Cursor, Windsurf, and any MCP client. Reads (search, profiles, timelines, followers, DMs) plus write actions (post, like, retweet, follow).
Ask your agent to search tweets, pull a user's profile or timeline, list followers/following, fetch thread context, or enumerate list members and it calls the API directly. Every tool maps to a REST endpoint at https://api.twitterapis.com; the server holds no state and forwards your API key on each call.
Quick start
No install needed. Run with npx. You need one thing: an API key (free $0.50 in credits, no card required): twitterapis.com/signup.
Related MCP server: X API FastMCP Server
Setup
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"twitterapis": {
"command": "npx",
"args": ["-y", "@twitterapis/mcp@latest"],
"env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
}
}
}Restart Claude Desktop. The twitter_* tools appear in the tool picker.
Cursor
~/.cursor/mcp.json (or Settings → MCP → Add New Server):
{
"mcpServers": {
"twitterapis": {
"command": "npx",
"args": ["-y", "@twitterapis/mcp@latest"],
"env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
}
}
}Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"twitterapis": {
"command": "npx",
"args": ["-y", "@twitterapis/mcp@latest"],
"env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
}
}
}VS Code (Copilot / agent mode)
.vscode/mcp.json in your workspace, or the user-level MCP settings:
{
"servers": {
"twitterapis": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@twitterapis/mcp@latest"],
"env": { "TWITTERAPIS_KEY": "YOUR_API_KEY" }
}
}
}Configuration
Env var | Required | Default | Purpose |
| Yes | (none) | API key from dashboard |
| No |
| Override the API host |
| No |
| Per-request timeout in milliseconds |
Tools
40 tools: 29 reads and 11 write actions. Most user endpoints accept username (handle without @) or user_id (twitter_user_likes and twitter_user_tweets_complete require user_id); tweet endpoints accept id or url; paginated endpoints return a cursor you pass back to get the next page.
Public reads (search, profiles, tweets, followers, likes) work with just your API key. The account-only reads (bookmarks, DMs, home timeline, followers-you-know) and all write actions act AS an authenticated X account, so they need a session linked to your key first (returns HTTP 409 until then). Alternatively, pass per-call inline credentials on any of those tools (auth_token + ct0, with optional proxy_url / user_agent) to act AS that account for a single call without pre-registering a session, so one API key can act as many accounts. For write actions, set proxy_url to a residential proxy, since X soft-blocks writes that egress from datacenter IPs. Each write tool is annotated readOnlyHint: false; reversing actions (delete, unfollow, unlike, unretweet, unbookmark) are annotated destructiveHint: true so MCP clients can prompt before running them.
Reads
Tool | What it does |
| Search tweets with X operators ( |
| Find user accounts by name or keyword |
| Full profile by handle (bio, counts, verification, location) |
| Full profile by numeric user id |
| A user's structured About panel (category, professional labels, joined date) |
| Accounts affiliated with an organization profile |
| Follow relationship between two user ids (who follows whom) |
| A user's recent original tweets (replies excluded) |
| A user's full timeline (tweets + replies) |
| A user's near-complete tweet history in one auto-paginated call |
| Images and videos a user has posted |
| Recent public tweets mentioning a user |
| Tweets a user has liked (public Likes tab) |
| Accounts that follow a user |
| Accounts a user follows |
| Followers with the v2 response shape (richer fields, deeper cursoring) |
| Following with the v2 response shape (richer fields, deeper cursoring) |
| A user's verified followers only |
| Followers of a target that your authenticated account also follows |
| Single tweet: text, author, metrics, media, quoted/reply context |
| Replies to a tweet |
| Full author thread (connected tweet chain by same author) |
| Accounts that retweeted a tweet |
| Members of a Twitter/X List |
| Your authenticated account's Home timeline (session) |
| Your authenticated account's bookmarks (session) |
| Full-text search within your bookmarks (session) |
| Your DM conversations (inbox), read-only (session) |
| Messages in one DM conversation, read-only (session) |
Write actions (require a linked X session)
Tool | What it does |
| Post a tweet; set |
| Delete one of your tweets (irreversible) |
| Like / unlike a tweet |
| Retweet / undo retweet |
| Bookmark / remove bookmark |
| Follow / unfollow a user by id |
| Send a Direct Message to a user by their numeric |
Usage examples
Search for trending AI tweets
"Find the most popular tweets about AI agents posted this week"
The agent calls twitter_advanced_search with:
query: "AI agents min_faves:200 since:2024-01-01"
product: "Top"
count: 20Pull a user's recent posts
"Get the last 10 tweets from @sama"
The agent calls twitter_user_tweets with:
username: "sama"
count: 10Read a full thread
"Get the full thread for this tweet: https://x.com/karpathy/status/1849....."
The agent calls twitter_tweet_thread with:
url: "https://x.com/karpathy/status/1849....."Paginate through followers
"List the first 100 followers of @openai, then the next 100"
First call, twitter_user_followers: { username: "openai", count: 100 }
Second call, pass back the cursor from the first response: { username: "openai", count: 100, cursor: "<cursor from response>" }
Monitor brand mentions
"Show me recent tweets mentioning @twitterapis"
The agent calls twitter_user_mentions with:
username: "twitterapis"
count: 50Troubleshooting
HTTP 401 (invalid or missing API key) Check that TWITTERAPIS_KEY is set correctly in your MCP client config and matches the key shown in your dashboard.
HTTP 402 (insufficient credits) Top up at twitterapis.com/dashboard. Your first $0.50 is free at signup.
HTTP 403 (access forbidden) The account or tweet may be private/protected, or your plan does not include this endpoint.
HTTP 404 (not found) The user, tweet, or list may have been deleted, suspended, or the id/handle is wrong.
HTTP 429 (rate limited) Wait a few seconds and retry. If you hit this frequently, add "TWITTERAPIS_TIMEOUT_MS": "60000" to your env config and space out bulk requests.
Request failed: timed out after 30000ms The default timeout is 30 s. For large paginated fetches set TWITTERAPIS_TIMEOUT_MS to a higher value (e.g. 60000).
Tools do not appear in Claude / Cursor Ensure npx is on your PATH and Node.js 18+ is installed (node --version). Check MCP client logs for startup errors.
Pricing
Calls are billed to your twitterapis.com account. Almost every endpoint is $0.0008/call: all reads (search, profiles, tweets, followers, likes) plus the simple write actions (like, retweet, bookmark, follow and their undos, delete). At the read rate that works out to $0.04 per 1,000 tweets, since each call returns about 20 tweets. The premium endpoints cost a little more: tweet creation, sending a DM (twitter_dm_send), and DM reads (twitter_dm_list, twitter_dm_conversation) at $0.0016/call, full tweet history (twitter_user_tweets_complete) at $0.0024/call, and a full tweet thread (twitter_tweet_thread) at $0.004/call. Your first $0.50 is free. See twitterapis.com/pricing.
Links
Docs: docs.twitterapis.com
Dashboard / API keys: twitterapis.com/dashboard
Pricing: twitterapis.com/pricing
REST API base URL (call it directly, without MCP):
https://api.twitterapis.com
FAQ
Do I need an X (Twitter) developer account? No. Get an API key at twitterapis.com/signup; there is no application or approval step.
Is it read-only? No. 29 read tools work with just your API key; 11 write actions (post, like, retweet, follow, DM) act as a linked X account or per-call inline credentials.
Which clients are supported? Claude Desktop, Cursor, Windsurf, and VS Code (Copilot agent mode), or any Model Context Protocol client.
How is it billed? Per request. New keys start with $0.50 in free credits, no card required. See pricing.
Does it store my key or data? No. The server holds no state and forwards your API key on each call.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TwitterAPIs/twitterapis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server