mcpField
T
Twitter Cookie mcpServer

Twitter Cookie mcpServer

Local
github.com/dewkiksSocial Media1Updated 65w ago

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

  1. 01Post, like, retweet, and search tweets
  2. 02Retrieve user profiles and timelines
  3. 03Send and manage direct messages
  4. 04View tweet replies and trending topics

Use cases

  1. 01Search Twitter for posts on a topic
  2. 02Post or retweet through an assistant
  3. 03Check a user profile or timeline
  4. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Twitter MCP Server

smithery badge

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
  1. Install
git clone <repository-url>
cd twitter-mcp
pip install -r requirements.txt
  1. 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)
  2. 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 tweet
  • like_tweet - Like a tweet by ID
  • retweet - Retweet by ID
  • search_tweets - Search for tweets
User Operations
  • get_user_info - Get user profile info
  • get_timeline - Get your timeline
Direct Messages
  • send_dm - Send direct message to username
  • get_dm_history - Get DM history with user
  • add_reaction_to_message - React with emoji
  • delete_dm - Delete a message
Other
  • get_tweet_replies - Get replies to a tweet
  • get_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

Markdown supported

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.