MCP Twitter

Integrations

  • Supports configuration through environment variables stored in a .env file, allowing users to securely provide Twitter authentication credentials.

  • Enables installation via cloning the GitHub repository, with the source code hosted at github.com/0xhijo/mcp_twitter.

  • Provides installation and execution through NPX, allowing users to run the server without explicit installation.

MCPツイッター

説明

MCP Twitterは、モデルコンテキストプロトコル(Model Context Protocol)をベースとしたサーバーで、Twitter/Xとの直接的なやり取りを可能にします。標準化されたツールセットを通じて様々なTwitter API機能を公開し、AIモデルやアプリケーションがTwitter上でアクションを実行できるようにします。

特徴

この MCP サーバーは次のアクションを提供します。

  • create_twitter_post : 新しいX/Twitter投稿を作成する
  • reply_twitter_tweet : IDで特定のX/Twitter投稿に返信する
  • get_last_tweet : 指定したX/Twitterアカウントから最新の投稿を取得する
  • get_last_tweets_options : 検索クエリに一致する投稿を指定された数だけ取得する
  • create_and_post_twitter_thread : X/Twitter スレッドを作成して公開する
  • follow_twitter_from_username : ユーザー名でX/Twitterユーザーをフォローする
  • get_twitter_profile_from_username : ユーザー名で完全なX/Twitterプロフィールデータを取得する
  • get_twitter_user_id_from_username : ユーザー名からX/TwitterユーザーIDを取得する
  • get_last_tweet_and_replies_from_user : ユーザーからの最近のX/Twitterの投稿と返信を取得する
  • get_last_tweet_from_user : ユーザーの最近のX/Twitter投稿を取得する
  • get_own_twitter_account_info : 現在のアカウントのプロフィールデータを取得する

インストールと使用方法

ローカルインストール

# Clone the repository git clone https://github.com/0xhijo/mcp_twitter.git # Install dependencies and build the project pnpm build # Launch the server node ./build/index.js

NPX経由のインストール

npx mcp_twitter

構成

Twitterスクレーパーによる設定

  1. .env ファイルを設定します。
TWITTER_AUTH_MODE = "CREDENTIALS" # Credentials mode # Your Twitter credentials TWITTER_USERNAME="YOUR_TWITTER_USERNAME" TWITTER_PASSWORD="YOUR_TWITTER_PASSWORD" TWITTER_EMAIL="YOUR_TWITTER_EMAIL"

.envファイルを作成するか、環境に変数を直接追加して、Twitter 認証を構成する必要があります。

Twitter API経由の設定

  1. 開発者アカウントを作成します:

Twitterアカウントを持っていることを確認してください。開発者プラットフォームにアクセスしてください。API認証情報を取得してください。開発者アカウントの作成についてサポートが必要な場合は、このガイドに従ってください。

  1. .envファイルを設定する
TWITTER_AUTH_MODE = "API" # API mode # Your CREDENTIALS obtained from the Developer Platform TWITTER_API="YOUR_TWITTER_API" TWITTER_API_SECRET="YOUR_TWITTER_API_SECRET" TWITTER_ACCESS_TOKEN="YOUR_TWITTER_ACCESS_TOKEN" TWITTER_ACCESS_TOKEN_SECRET="YOUR_TWITTER_ACCESS_TOKEN_SECRET"

クロードとの統合

ClaudeでMCP Twitterを使用するには、 claude_mcp_config.jsonファイルに追加する必要があります。これにより、ClaudeはMCPサーバーを介してTwitterとやり取りできるようになります。

クロードのMCP構成への追加

claude_mcp_config.jsonファイルに次のエントリを追加します。

"mcp_twitter": { "command": "npx", "args": ["mcp_twitter"], "env": { "TWITTER_AUTH_MODE": "CREDENTIALS", "TWITTER_USERNAME": "YOUR_TWITTER_USERNAME", "TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD", "TWITTER_EMAIL": "YOUR_TWITTER_EMAIL" } }

プレースホルダーの認証情報を実際のTwitterアカウント情報に置き換えてください。この設定により、クロードがTwitterとやり取りする必要があるときに、npxを使用してMCP Twitterサーバーが起動されます。

クロードとの使用

設定が完了すると、ClaudeはMCPサーバーが提供するすべてのTwitter機能(投稿の作成、ツイートの取得など)を利用できるようになります。ClaudeにTwitterアクションの実行を指示するだけで、MCPサーバーを利用してアクションが実行されます。

重要な注意事項

  • ニーズに応じて認証モード(APIまたは認証情報)を選択します
  • .env ファイルで資格情報が正しく設定されていることを確認します
  • APIの制限の詳細については公式ドキュメントを確認してください。
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

AI モデルとアプリケーションが Twitter/X と直接対話できるようにし、投稿の作成、ツイートへの返信、ユーザー データの取得、アカウント アクションの管理などの機能を提供するモデル コンテキスト プロトコル サーバーです。

  1. Description
    1. Features
      1. Installation and Usage
        1. Local Installation
        2. Installation via NPX
      2. Configuration
        1. Configuration via Twitter Scraper
        2. Configuration via Twitter API
      3. Integrating with Claude
        1. Adding to Claude's MCP Configuration
        2. Usage with Claude
      4. Important Notes

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables AI assistants like Claude to browse and analyze Reddit content, including searching subreddits, retrieving post details with comments, and viewing trending posts.
          Last updated -
          1
          Python
          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 -
          4
          1
          JavaScript
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables AI to interact with Twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.
          Last updated -
          MIT License
        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol server that enables AI assistants to interact with Bluesky/ATProtocol, providing authentication, timeline access, post creation, and social features like likes and follows.
          Last updated -
          18
          10
          TypeScript
          • Apple
          • Linux

        View all related MCP servers

        ID: l6x7np7rv6