Skip to main content
Glama
X Tools for Claude MCP

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.exampleをmcp.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.mdとknowledge/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.mdとTwitterSearchSyntaxGuide.txtが Claude ルールとナレッジベースに正しく追加されていることを確認してください

発達

ツールを変更するには:

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

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

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

ライセンス

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

謝辞

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

  • ラピッドAPI Twitter154 API

  • アクシオス

  • ゾッド


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

Available Tools

1 tool
searchTwitterD
NameRequiredDescriptionDefault
queryYes
sectionNolatest
limitNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool update
    • First observedsearchTwitter

TDQS

D1.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'searchTwitter' stands alone with no other tools to confuse it with.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tool names to compare it against. The name 'searchTwitter' follows a clear verb_noun pattern.

Tool Count2/5

One tool is too few for a server named 'X Tools for Claude MCP', which implies multiple tools. This minimal set feels thin and incomplete for any meaningful domain coverage, indicating a mismatch between the server's implied purpose and its actual tool surface.

Completeness1/5

The server is severely incomplete with only a single search tool. For a Twitter-related domain, obvious gaps include operations like posting tweets, managing followers, or accessing user profiles, making it impossible for agents to perform basic workflows beyond simple searches.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    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
    17 npm
    26
    MIT
  • A
    license
    Not graded
    quality
    C
    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.
    14 npm
    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