A repository for the Twitter MCP server
claude mcp add --transport stdio taazkareem-twitter-mcp-server node /path/to/twitter-mcp-server/build/index.js \ --env TWITTER_EMAIL="your_email" \ --env TWITTER_API_KEY="your_api_key" \ --env TWITTER_PASSWORD="your_password" \ --env TWITTER_USERNAME="your_username" \ --env TWITTER_ACCESS_TOKEN="your_access_token" \ --env TWITTER_API_SECRET_KEY="your_api_secret_key" \ --env TWITTER_ACCESS_TOKEN_SECRET="your_access_token_secret"
How to use
This Twitter MCP Server exposes a set of MCP tools that wrap Twitter functionality for AI agents and MCP-compatible clients. It provides reading capabilities such as get_tweets, get_profile, search_tweets, and get_trends, along with timeline access (home, following, user timelines) and list-tweet retrieval. Interaction tools allow liking/unliking tweets, retweeting, posting tweets with optional media, and creating threads. Additional capabilities include managing user relationships (followers/following) and following/unfollowing users, plus media handling for image and video uploads with alt text support. Use these tools through the MCP protocol to integrate Twitter features into your agent workflows, enabling structured requests and consistent responses across tools.
How to install
Prerequisites:
- Node.js installed (npx/node available on PATH)
- Access to Twitter credentials and optional API keys/tokens
- Install dependencies
npm install
- Build the server
npm run build
- Configure environment variables (example)
# Required: Twitter account credentials
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
TWITTER_EMAIL=your_email
# Twitter API authentication (optional but recommended)
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
- Run the MCP server (as configured in mcp_config)
# Ensure your mcp_config points to the correct node entry file
node /path/to/twitter-mcp-server/build/index.js
- Add server to your MCP client configuration with the appropriate server name, e.g. twitter-mcp-server.
Additional notes
Tips:
- Ensure Twitter API credentials align with the required access level for the features you intend to use (read vs write access).
- The server enforces rate limiting to protect quotas; plan request batches accordingly.
- For debugging, MCP Inspector and the server's logging output can help diagnose parameter validation and network issues.
- If you update environment variables, restart the server to apply changes.
- The config example uses a Node server entry at build/index.js; adjust paths as needed for your deployment setup.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.