Twitter MCP Server
The server can post tweets and search Twitter according to its schema; the README also documents home-timeline retrieval, though that tool is missing from the provided schema.
Post tweets: Create a tweet with required
text(max 280 chars), optionally as a reply usingreply_to_tweet_id. README also mentions up to 4 local images, but the schema omitsmedia_paths.Search tweets: Search Twitter by required
query, returning 10–100 results viacount.README-only capability:
get_home_timelinereturns recent home timeline tweets with optionalcount,since_days, orstart_time; not present in the provided schema and requires a paid X API tier.
Click on "Deploy 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., "@Twitter MCP Server post a tweet about my new blog post on AI ethics"
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.
Twitter MCP Server
This MCP server allows Clients to interact with Twitter, enabling posting tweets, searching Twitter and reading your home timeline.
Quick Start
Create a Twitter Developer account and get your API keys from Twitter Developer Portal
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": ["-y", "@enescinar/twitter-mcp"],
"env": {
"API_KEY": "your_api_key_here",
"API_SECRET_KEY": "your_api_secret_key_here",
"ACCESS_TOKEN": "your_access_token_here",
"ACCESS_TOKEN_SECRET": "your_access_token_secret_here"
}
}
}
}Restart Claude Desktop
That's it! Claude can now interact with Twitter through three tools:
post_tweet: Post a new tweet, optionally as a reply (reply_to_tweet_id) or with up to 4 images (media_paths: local JPG, PNG, GIF or WEBP files)search_tweets: Search for tweetsget_home_timeline: Get recent tweets from accounts you follow
get_home_timeline
Returns your reverse-chronological home timeline (tweets from you and the accounts you follow), newest first. All parameters are optional:
count: number of tweets to return (1-100)since_days: only return tweets from the last N days, e.g.1,3or7(max 30)start_time: only return tweets created after this ISO 8601 UTC timestamp, e.g.2024-01-01T00:00:00Z
Use either since_days or start_time, not both.
Note: The home timeline endpoint (
GET /2/users/:id/timelines/reverse_chronological) is not available on the Free X API tier. You need a paid tier (Basic or higher); on the Free tier this tool returns a Twitter API error.
Related MCP server: twitter-mcp
Example Usage
Try asking Claude:
"Can you post a tweet saying 'Hello from Claude!'"
"Can you post a tweet saying 'New logo!' with the image /Users/me/Pictures/logo.png"
"Can you search for tweets about Claude AI?"
"What have the accounts I follow posted in the last 3 days?"
Troubleshooting
Logs can be found at:
Windows:
%APPDATA%\Claude\logs\mcp-server-twitter.logmacOS:
~/Library/Logs/Claude/mcp-server-twitter.log
Development
If you want to contribute or run from source:
Clone the repository:
git clone https://github.com/EnesCinr/twitter-mcp.git
cd twitter-mcpInstall dependencies:
npm installBuild:
npm run buildRun:
npm startRunning evals
The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.tsLicense
MIT
Available Tools
3 toolsget_home_timelineA
Get recent tweets from accounts you follow (your home timeline), newest first. Requires a paid X API tier (Basic or higher).
Inputs: count, since_days, start_time.
post_tweetB
Post a new tweet to Twitter, optionally with up to 4 images
Inputs: text (required), media_paths, reply_to_tweet_id.
search_tweetsC
Search for tweets on Twitter
Inputs: count (required), query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool maps to a distinct action: writing a tweet, reading the followed-accounts feed, and keyword search. The two read tools could be marginally confused, but the descriptions (home timeline vs. search) make the boundary clear.
All three names follow a consistent verb_noun snake_case pattern: post_tweet, get_home_timeline, search_tweets. No mixing of conventions or vague verbs.
Three tools is thin for a Twitter/X integration, covering only post and two read paths. It is a reasonable minimal surface but leaves the server feeling under-built for its scope.
The surface is essentially write-once plus two read paths: there is no delete_tweet, no reply/thread support, no user lookup, mentions, likes, or retweet operations. Agents attempting common Twitter workflows (replying, deleting, checking a user's profile) will hit dead ends.
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
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.
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that allows Claude to create, manage and publish X/Twitter posts directly through the chat interface.561MIT
- FlicenseNot gradedqualityCmaintenanceA lightweight Twitter MCP server for Claude Code with 17 tools for reading and writing tweets, including search, user profiles, and media uploads, using a hybrid API approach.2-
- AlicenseAqualityFmaintenanceA Model Context Protocol (MCP) server that provides access to Twitter data through the TwitterAPI.io service, enabling Claude and other MCP clients to interact with Twitter's ecosystem without requiring Twitter developer account approval.1111 npm4MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables posting tweets, reading timelines, searching posts, and interacting with X (Twitter) API.17 npm2MIT