Skip to main content
Glama

Twitter MCP Tool

by jalaj-pandey

Twitter MCP Tool

This repository contains the Twitter MCP Tool, a tool designed to streamline social media tasks using Python. It includes features for tweeting, username change history, Fetch recent tweets, and Send a direct message to a user.

Features

1. Tweet Posting

Post tweets with or without images directly to Twitter.

2. Query Username Changes

Track the username change history of any Twitter account.

3. Fetch Recent Tweets

Retrieve the latest tweets from any public Twitter user's timeline.

4. Send a Direct Message (DM)

Send a private message directly to a Twitter user.

Installing Dependencies and Running

  1. Clone the repo using
    git clone https://github.com/jalaj-pandey/twitter-mcp-tool.git
  2. Install dependencies:
    uv venv .venv\Scripts\activate pip install -r requirements.txt mcp dev script.py
    And if you want to install it in the claude desktop then use
    pip install script.py
  3. Create a .env file with the following keys:
    X_api_key=<your_twitter_api_key> X_api_key_sec=<your_twitter_api_secret> X_access_token=<your_twitter_access_token> X_access_token_sec=<your_twitter_access_token_secret> X_bearer_token=<your_twitter_bearer_token> GEMINI_API_KEY=<your_gemini_api_key>

Usage

Open your claude desktop you will see the Twitter MCP Tool` is ready to use.

If not then Copy paste the config.json into your claude_desktop_config.json

Folder Structure

. ├── script.py # MCP core logic ├── .env # Environment variables ├── requirements.txt # Python dependencies ├── config.json # config file for claude desktop └── readme.md # Project documentation
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

사용자가 트윗을 게시하고, 사용자 이름 변경을 추적하고, 최근 트윗을 가져오고, Twitter에서 직접 메시지를 보낼 수 있도록 하여 소셜 미디어 작업을 간소화하는 Python 기반 도구입니다.

  1. 특징
    1. 1. 트윗 게시
    2. 2. 사용자 이름 변경 사항 쿼리
    3. 3. 최근 트윗 가져오기
    4. 4. DM(다이렉트 메시지) 보내기
  2. 종속성 설치 및 실행
    1. 용법
      1. 폴더 구조

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          Enables interaction with Twitter through a Model Context Protocol, allowing large language models to post tweets, search for tweets, and reply to tweets.
          Last updated -
          53
          6
          20
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          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.
          Last updated -
          1
          15
          • Apple
        • -
          security
          F
          license
          -
          quality
          Provides tools for interacting with Twitter to retrieve tweets by ID and post new tweets using the agent-twitter-client library.
          Last updated -
          1
          3
        • -
          security
          A
          license
          -
          quality
          Enables interaction with X (formerly Twitter), allowing for posting tweets, searching content, managing accounts, and organizing lists.
          Last updated -
          2
          3
          MIT License

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/jalaj-pandey/twitter-mcp-tool'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server