Skip to main content
Glama

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
-
license - not tested
-
quality - not tested

Related MCP Servers

  • A
    security
    -
    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
    2
    21
    MIT License
    • Apple
  • -
    security
    -
    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
  • -
    security
    -
    license
    -
    quality
    A Model Context Protocol server that enables AI agents to interact with Twitter without direct API access, supporting tweet operations, user interactions, and Grok AI integration.
    Last updated -
    11
    17
    MIT License
    • Apple
  • -
    security
    -
    license
    -
    quality
    A Model Context Protocol server that enables AI assistants to interact with Twitter functionality using cookie-based authentication, allowing for timeline access, tweet management, user information retrieval, and search capabilities.
    Last updated -
    10

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/0xhijo/mcp_twitter'

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