twitter-mcp-server

gkydev/twitter-mcp-server

3.4

If you are the rightful owner of twitter-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Twitter MCP Server is a Model Context Protocol server that enables AI assistants to interact with Twitter using the `twikit` library, leveraging cookie-based authentication.

The Twitter MCP Server is designed to facilitate seamless interaction with Twitter through a standardized protocol, utilizing the `twikit` library. This server allows AI assistants to perform various Twitter operations by providing `ct0` and `auth_token` cookies directly in tool calls. The server supports a wide range of functionalities, including accessing timelines, retrieving user information, managing tweets, and handling direct messages. It also offers features like session caching for efficiency and authentication testing to ensure the validity of cookies before use. The server is built for educational and experimental purposes, using an unofficial API to interact with Twitter, and users should be aware of potential risks associated with its use. The server is easy to set up, requiring only the installation of dependencies and running the server script. It provides a comprehensive set of tools for managing Twitter interactions, making it a valuable resource for developers and researchers interested in exploring Twitter's capabilities programmatically.

Features

  • Cookie Authentication: LLM model provides `ct0` and `auth_token` cookies directly in tool calls.
  • Session Caching: Automatically caches authenticated sessions for efficiency.
  • Timeline Access: Get tweets from your timeline.
  • User Information: Retrieve user profiles and statistics.
  • Tweet Management: Post, like, and retweet tweets.

Tools

  1. authenticate

    Test authentication with cookies.

  2. tweet

    Post a new tweet.

  3. get_user_info

    Get information about a Twitter user.

  4. search_tweets

    Search for tweets.

  5. get_timeline

    Get tweets from your timeline.

  6. like_tweet

    Like a tweet by ID.

  7. retweet

    Retweet a tweet by ID.

  8. send_dm

    Send a direct message to a user.

  9. get_dm_history

    Get direct message history with a specific user.

  10. add_reaction_to_message

    Add an emoji reaction to a direct message.

  11. delete_dm

    Delete a direct message.

  12. get_tweet_replies

    Get replies to a specific tweet.

  13. get_trends

    Get trending topics on Twitter.