Skip to main content
Glama
0xGval

X Tools for Claude MCP

by 0xGval

Claude MCP 向け X ツール

ClaudeがTwitterを自然言語で効率的に検索し、ユーザーの意図に基づいた結果を表示できるようにする、軽量のオープンソースツールキットです。生データの表示とオプションの分析の両方に対応しています。

特徴

  • 自然言語検索: クロードに平易な英語でTwitterを検索するよう依頼する

  • Twitter 検索: 自然言語または高度な Twitter 構文を使用してツイートを検索します

  • プロフェッショナルなフォーマット: マークダウン形式のきれいなツイート表示

  • 柔軟な出力: 生のツイートを表示したり、要求に応じて分析を追加したりできます

  • 高度なフィルタリング: キーワード、ユーザー、日付、エンゲージメント指標などでツイートを検索

  • ページネーションのサポート: 必要に応じて、検索ごとにデフォルトの20件以上のツイートを取得できます。

Related MCP server: twitter-mcp

インストール

前提条件

  • Node.js v16+

  • デスクトップ版クロード

  • 「The Old Bird API」(Twitter154)エンドポイントにアクセスできる無料のRapidAPIキー

RapidAPIキーの設定

  1. RapidAPI の The Old Bird APIをご覧ください

  2. RapidAPIアカウントをお持ちでない場合は登録してください

  3. API をサブスクライブする (無料プランあり)

  4. 登録したら、ダッシュボードからRapidAPIキーをコピーします

セットアップ手順

  1. このリポジトリをクローンします:

    git clone https://github.com/0xGval/twitter-X-mcp-server
    cd twitter-X-mcp-tools
  2. 依存関係をインストールします:

    npm install
  3. 設定を作成します:

    • Claude Desktop ディレクトリのmcp.json.examplemcp.jsonにコピーします。

    • mcp.jsonを編集して、RapidAPI キーと正しいファイルパスを追加します。

    {
      "mcpServers": {
        "x-tools": {
          "command": "node",
          "args": ["YOUR_ABSOLUTE_PATH_TO/main.js"],
          "env": {
            "RAPIDAPI_KEY": "your_rapidapi_key"
          }
        }
      }
    }
  4. デスクトップ用にClaudeを構成する:

    • Windowsの場合: mcp.jsonファイルを%APPDATA%\Claude\に配置します。

    • macOSの場合: mcp.jsonファイルを~/Library/Application Support/Claude/に配置します。

    • claude-rules.mdknowledge/TwitterSearchSyntaxGuide.txtを Claude ナレッジ ベース ディレクトリにコピーします。

    • 変更を有効にするには、Claude Desktopを再起動してください。

利用可能なツール

Twitter検索

このツールは主に自然言語での使用を想定して設計されています。ClaudeにTwitterで何かを検索するように指示するだけで、リクエストを解釈してくれます。

searchTwitter(query: "keyword", section: "latest", limit: 20)

自然言語または高度な構文を使用して Twitter を検索します。

  • query : 検索クエリ(Twitterの高度な検索演算子をサポート)

  • section : 「最新」または「トップ」の結果 (デフォルト: 「最新」)

  • limit : 返されるツイートの数(デフォルト: 20)

自然言語の例

シンプルなクエリ

クロードに聞く:

Show me recent tweets about artificial intelligence

ユーザー中心のクエリ

クロードに聞く:

Find the latest tweets from Elon Musk that mention SpaceX

複雑な自然クエリ

クロードに聞く:

Search for tweets about climate change with at least 100 likes from the past month

分析依頼

クロードに聞く:

What's the sentiment around the new Bitcoin ETF based on recent tweets?

直接構文の例

直接的な構文を好む人向け:

from:elonmusk spacex since:2023-01-01
"artificial intelligence" filter:images min_faves:100
climate action min_retweets:50 -filter:retweets

必要なファイル

このツールには、適切に設定する必要があるいくつかの重要なファイルが含まれています。

  • main.js : メインアプリケーションファイル

  • tools/twitter.js : Twitter検索の実装

  • claude-rules.md : 検索結果を適切に表示するためのクロードへの指示

  • knowledge/TwitterSearchSyntaxGuide.txt : Twitter検索構文のリファレンスガイド

これらのファイルがすべて Claude セットアップ内の正しい場所に配置されていることを確認してください。

検索構文

このツールは、すべての標準的な Twitter 検索演算子をサポートしており、Claude はこれを自然言語から適用できます。

ユーザー

  • from:username - 特定のアカウントから送信されたツイート

  • to:username - 特定のアカウントに返信する

  • @username - アカウントをメンションするツイート

メディアとリンク

  • filter:media - 任意のメディアを含むツイート

  • filter:images - 画像付きのツイート

  • filter:native_video - 動画付きのツイート

  • filter:links - リンクを含むツイート

日付

  • since:YYYY-MM-DD - この日付以降のツイート

  • until:YYYY-MM-DD - この日付以前のツイート

婚約

  • min_retweets:n - n回以上リツイートされたツイート

  • min_faves:n - 少なくともn件のいいねを獲得したツイート

  • min_replies:n - 少なくともn件の返信があるツイート

トラブルシューティング

よくある問題:

  • APIキーが見つかりません: RapidAPIキーがmcp.jsonに正しく設定されていることを確認してください

  • パスエラー: Windows で適切なエスケープを使用した完全な絶対パスを使用していることを確認してください ( \\ )

  • 結果なし: 検索クエリが有効であり、制限が厳しすぎないことを確認してください

  • Claudeの動作の問題: 柔軟な出力指示を含むclaude-rules.mdの最新バージョンがあることを確認してください。

  • 不足しているファイル: claude-rules.mdTwitterSearchSyntaxGuide.txtが Claude ルールとナレッジベースに正しく追加されていることを確認してください

発達

ツールを変更するには:

  1. tools/ディレクトリ内のファイルを編集する

  2. 必要に応じてformatTwitterResults()関数のフォーマットを更新します

  3. 変更を確認するには、Claude for Desktopを再起動してください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています。

謝辞

  • Anthropicによるモデルコンテキストプロトコル(MCP)

  • ラピッドAPI Twitter154 API

  • アクシオス

  • ゾッド


: このツールは、Claude AI アシスタントと連携して、ユーザーの意図に基づいて柔軟な表示オプションを備えた Twitter 検索結果を提供するように設計されています。

F
license - not found
D
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables seamless interaction with Twitter/X platform through Claude AI, allowing users to post tweets with images, search for tweets, and engage in conversations using natural language commands.
    10
    74
    25
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A lightweight Twitter MCP server for Claude Code with 17 tools for reading and writing tweets, including search, user profiles, and media uploads, using a hybrid API approach.
    25
    2
    ISC
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents and coding assistants with Twitter data access including tweets, user profiles, followers, and search functionality.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables users to interact with X/Twitter via Claude, allowing posting tweets, searching, liking, retweeting, and more using OAuth 2.0 PKCE authentication.
    10
    7
    MIT

View all related MCP servers

Related MCP Connectors

  • X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.

  • X (Twitter) profiles, tweets and single-tweet lookup by handle or URL. No login. Pay per result.

  • Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.

View all MCP Connectors

Latest Blog Posts

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/0xGval/twitter-X-mcp-server'

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