Twitter MCP Server
Provides AI agents with comprehensive Twitter functionality through the Model Context Protocol standard, enabling reading tweets, posting content, managing interactions, and accessing timeline data with robust error handling.
TaazKareem
README
Twitter MCP Server
A powerful Twitter integration for AI agents that leverages the Model Context Protocol (MCP) standard, providing a comprehensive set of Twitter functionality through a clean and consistent interface.
Overview
This server provides access to Twitter's features through MCP tools, allowing seamless integration with AI assistants and other MCP-compatible clients. It's built on top of the agent-twitter-client
library and provides robust error handling, rate limiting, and consistent response formatting.
Features
Basic Reading
- Get tweets from users with media support
- Fetch user profiles with detailed information
- Search tweets by hashtags or keywords
- Filter search results by latest/top
- Rate limiting (max 50 tweets per request)
User Interactions
- Like/Unlike tweets
- Retweet/Undo retweet
- Post tweets with:
- Text content
- Media attachments (images, videos)
- Reply functionality
- Quote tweet capability
Advanced Features
- Get user relationships (followers/following)
- Fetch trending topics
- Access different timeline types:
- Home timeline
- Following timeline
- User timeline
- List management (fetch list tweets)
Media & Advanced Interactions
- Media handling:
- Image upload (JPEG, PNG, GIF)
- Video upload (MP4)
- Alt text support
- Thread creation
- Follow/Unfollow users
Tools
Reading Tools
get_tweets
- Fetch recent tweets from a userget_profile
- Get a user's profile informationsearch_tweets
- Search for tweets by hashtag or keyword
Interaction Tools
like_tweet
- Like or unlike a tweetretweet
- Retweet or undo retweetpost_tweet
- Post a new tweet with optional mediacreate_thread
- Create a Twitter thread
Timeline Tools
get_timeline
- Get tweets from different timeline typesget_list_tweets
- Get tweets from a Twitter listget_trends
- Get current trending topics
User Management Tools
get_user_relationships
- Get followers or following listfollow_user
- Follow or unfollow a user
Installation
- Install dependencies:
npm install
- Build the server:
npm run build
- Configure environment variables:
# Required: Twitter Account Credentials (for user authentication)
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
TWITTER_EMAIL=your_email
# Twitter API Authentication (Optional)
TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET_KEY=your_api_secret_key
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret
- Add the server config to your MCP client:
On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"twitter-mcp-server": {
"command": "/path/to/twitter-mcp-server/build/index.js"
}
}
}
Development
For development with auto-rebuild:
npm run watch
Debugging
Since MCP servers communicate over stdio, you can use the MCP Inspector for debugging:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Error Handling
The server implements comprehensive error handling:
- Input validation for all parameters
- Rate limiting protection
- Detailed error messages
- Proper error propagation
- Logging for debugging
Response Format
All tools return responses in a consistent format:
{
content: [{
type: "text",
text: string // JSON stringified response or error message
}]
}
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Recommended Servers

@wopal/mcp-server-hotnews
A Model Context Protocol server that provides real-time hot trending topics from major Chinese social platforms and news sites.
actors-mcp-server
Use 3,000+ pre-built cloud tools from Apify, known as Actors, to extract data from websites, e-commerce, social media, search engines, maps, and more
mcp-maigret
MCP server for maigret, a powerful OSINT tool that collects user account information from various public sources. This server provides tools for searching usernames across social networks and analyzing URLs.
Instagram MCP Server
A server that allows fetching Instagram posts using Chrome's existing login session via Model Context Protocol (MCP).

X(Twitter) MCP Server
An MCP server that allows Claude to create, manage and publish X/Twitter posts directly through the chat interface.
LinkedIn MCP Server
A Model Context Protocol server that enables seamless interaction with LinkedIn for job applications, profile retrieval, feed browsing, and resume analysis through natural language commands.
Twitch MCP Server
Enables interaction with the Twitch API, allowing users to retrieve comprehensive information about channels, streams, games, and more, with additional support for searching and accessing chat elements like emotes and badges.

LinkedIn Browser MCP Server
A FastMCP-based server that enables programmatic LinkedIn automation and data extraction through browser automation, offering secure authentication and tools for profile operations and post interactions while respecting LinkedIn's rate limits.
Hive MCP Server
Enables AI assistants to interact with the Hive blockchain through the Model Context Protocol, allowing for account info retrieval, content reading/creation, cryptocurrency transfers, and cryptographic operations.
mcp-reddit
Read Reddit post and hot thread