About Twitter Cookie mcpServer
Twitter Cookie mcpServer connects AI assistants to Twitter using cookie-based authentication and the unofficial twikit API. It covers posting and finding tweets, user and timeline operations, direct messages, and trends; the README notes the integration may break or lead to account restrictions.
Key features
- 01Post, like, retweet, and search tweets
- 02Retrieve user profiles and timelines
- 03Send and manage direct messages
- 04View tweet replies and trending topics
Use cases
- 01Search Twitter for posts on a topic
- 02Post or retweet through an assistant
- 03Check a user profile or timeline
- 04Send a direct message or add a reaction
MCP support
Exposes Twitter operations as tools for MCP clients. Authentication uses the TWITTER_CT0 and TWITTER_AUTH_TOKEN cookies with an unofficial API.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMETwitter MCP Server
A Model Context Protocol (MCP) server for Twitter integration using cookie-based authentication. Allows AI assistants to interact with Twitter through a standardized protocol.
⚠️ Disclaimer
This uses an unofficial Twitter API via the twikit library. Not endorsed by Twitter/X and may break without notice. Use for educational/experimental purposes only. Account restrictions possible.
Quick Setup
Installing via Smithery
To install Twitter MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @dewkiks/twitter-mcp-server --client claude
Manual Installation
- Install
git clone <repository-url>
cd twitter-mcp
pip install -r requirements.txt
-
Get Twitter Cookies
- Open Twitter/X in browser and login
- Open Developer Tools (F12) → Application/Storage → Cookies → twitter.com
- Copy these values:
ct0(CSRF token)auth_token(Authentication token)
-
Configure Claude Desktop Add to your
claude_desktop_config.json:
{
"mcpServers": {
"twitter": {
"command": "./path/to/python.exe",
"args": ["./path/to/server.py"],
"env": {
"TWITTER_CT0": "your_ct0_here",
"TWITTER_AUTH_TOKEN": "your_auth_token_here"
}
}
}
}
Main Features
- Tweet Management: Post, like, retweet, search tweets
- User Operations: Get profiles, follow/unfollow users
- Timeline Access: Get your timeline and user timelines
- Direct Messages: Send DMs, get history, react to messages
- Trending Topics: Get trending topics by category
Key Tools
Tweet Operations
tweet- Post a new tweetlike_tweet- Like a tweet by IDretweet- Retweet by IDsearch_tweets- Search for tweets
User Operations
get_user_info- Get user profile infoget_timeline- Get your timeline
Direct Messages
send_dm- Send direct message to usernameget_dm_history- Get DM history with useradd_reaction_to_message- React with emojidelete_dm- Delete a message
Other
get_tweet_replies- Get replies to a tweetget_trends- Get trending topics
Example Usage
Post a tweet about AI developments
Search for tweets about "artificial intelligence" and show me the top 10
Send a DM to @username saying "Hello from MCP!"
Get my timeline with the latest 20 tweets
Like the tweet with ID 1234567890123456789
Get trending topics in sports
Show me replies to tweet ID 9876543210987654321
That's it! All tools require the cookies to be set in your environment variables.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.