コネクタガイド約6分で読めますMCP ツール 41 個7 言語

MCP 経由で X (Twitter) を Gemini に接続する方法

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

HC執筆: HelpCode チーム更新日 6分で読了 GitHub でオープンソース

クレジットカード不要 · 7日間の試用 · セルフホストの選択肢あり

X (Twitter)

X (Twitter)

Let your AI work with X (formerly Twitter): read and search posts, your timeline, mentions, bookmarks, Lists and direct messages, look up accounts and followers, and publish posts, replies and quotes, like, repost and send DMs after your confirmation.

ツール

41

地域

INTL

カテゴリー

ソーシャルメディア

認証

OAuth 2.0

必要な環境変数

X_CLIENT_IDX_CLIENT_SECRET
Cloud にワンクリックでインストール

7日間無料トライアル · クレジットカード不要

  • 7日間の無料トライアル
    クレジットカード不要
  • GDPR・SOC 2 レディ
    EU データ保管、監査ログ
  • GitHub でオープンソース
    オープンソース · AGPL-3.0
  • ChatGPT、Claude、Gemini に対応
    MCP 対応クライアントすべて

インストール不要。2分以内に動きます。

cloud.anythingmcp.com で無料トライアルを開始し、X (Twitter) をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。

無料トライアルを開始

概要

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

こう聞いてみよう

X (Twitter) のサンプルプロンプト

プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。

X (Twitter) · MCP 経由でライブ
共有
Opus 4.7

Claude は AI のため誤ることがあります。回答をご確認ください。

💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → X (Twitter) をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も git clone もローカルサーバーも不要。

X (Twitter) + Gemini

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

前提条件

完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:

X_CLIENT_ID, X_CLIENT_SECRET

ステップ 1 — 認証情報を取得

  1. https://console.x.com で X Developer Console を開き、アプリの所有者となる X アカウントでサインインして、Create App をクリックします。
  2. 請求(billing)の設定で API クレジットを追加します。X API はプリペイドクレジットによる従量課金制で、新規の開発者には無料プランがありません。クレジットがないと、X はすべての呼び出しを拒否します。
  3. アプリの User authentication settings を開き、Set up をクリックします。アプリの権限に Read and write and Direct message(DM ツールを使わない場合は Read and write で十分です)、アプリの種類に Web App, Automated App or Bot を選び、ウェブサイトの URL とコールバック URI https://cloud.anythingmcp.com/api/mcp-oauth/callback を入力します。AnythingMCP をセルフホストしている場合は <your AnythingMCP URL>/api/mcp-oauth/callback です。X は末尾のスラッシュも含めて 1 文字ずつ照合します。ローカル環境では localhost ではなく 127.0.0.1 を使い、http://127.0.0.1:<port>/api/mcp-oauth/callback とします。
  4. OAuth 2.0 Client ID と Client Secret を X_CLIENT_ID と X_CLIENT_SECRET にコピーします。X はシークレットを一度しか表示しません。アプリの API Key、API Secret、Bearer Token は別のサインイン方式用のもので、ここでは使いません。
  5. コネクターをインストールし、Authorize with Provider をクリックして、X でアクセスを許可します。サインインには OAuth 2.0 を使うため、AnythingMCP が X のパスワードを目にすることはありません。アクセストークン(有効期間は 2 時間)は AnythingMCP が自動で更新します。
  6. まず x_get_me を実行します。アカウント情報と数値のユーザー ID が返ります。この ID は、タイムライン、いいね、リポスト、ブックマーク、フォローの各ツールで必要です。x_get_user_by_username は任意の @username を ID に変換します。

料金: X は読み取りと投稿のたびにクレジット残高から課金します。公開は読み取りより高く、リンク付きの投稿はさらに大幅に高くなります。サインインに使うアカウントが開発者アプリの所有者でもある場合、自分のデータの読み取りは安くなります。また、同じ UTC 日に同じアイテムを 2 回読み取っても課金は 1 回です。Developer Console で利用上限を設定し、X の最新料金を https://docs.x.com/x-api/getting-started/pricing で確認してください。返されるアイテムはすべてカウントされるため、取得する結果を減らせば費用を抑えられます。

まず確認を: 投稿、返信、引用、リポスト、ダイレクトメッセージ(x_create_post、x_reply_to_post、x_quote_post、x_repost、x_send_dm、x_send_dm_to_conversation)はすぐに送信されるため、AI は正確な文面と宛先を示し、あなたの了承を待ちます。アカウントのフォローとフォロー解除も確認を経て行います。x_delete_post と x_delete_dm は、インストール時はオフになっています。

返信: API 経由で送った返信を X が受け付けるのは、元の投稿の作成者があなたのアカウントをメンションまたは引用している場合だけです。自分のスレッド内での返信や、自分へのメンションへの返信は可能です。

検索とメッセージ: 検索の対象は直近 7 日間で、from:、to:、#hashtag、"exact phrase"、-is:retweet、lang:en などの X の演算子に対応しています。x_count_recent_posts は、該当する投稿を読み取らずに件数だけを数えます。ダイレクトメッセージは直近 30 日分が対象です。暗号化された会話は API では利用できません。

読み取り専用または DM なしにするには: コネクターの OAuth 設定で .write スコープ、または dm. スコープを削除し、もう一度認可して、それらを必要とするツールをオフにします。

よくあるエラー: 401 は認可が取り消されたか client secret が変更されたことを示すので、もう一度認可してください。client-forbidden または client-not-enrolled を伴う 403 は、アプリが従量課金になっていないことを示します。Developer Console でアプリを Pay-per-use パッケージと Production 環境に移し、クレジットを追加してください。以前は動いていた呼び出しが失敗する場合、たいていはクレジットか利用上限を使い切っています。429 は X のレート制限で、15 分ごとにリセットされます。

このコネクターは、メディアのアップロード(投稿はテキストか投票のみ)、全アーカイブの検索、投稿のストリーミング、リストの管理、アカウントのミュートやブロック、広告の運用には対応していません。

ステップ 2 — アダプターをインストール

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

ステップ 3 — Gemini にコネクタを追加

サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドで YOUR_SERVER_ID と表示されている箇所に使ってください。

Gemini CLI は ~/.gemini/settings.json(Windows では %USERPROFILE%\.gemini\settings.json)から MCP サーバーを読み込みます。次を追加してください:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. AnythingMCP の MCP Servers → 対象のサーバー → API keys で MCP API キーを作成し、YOUR_MCP_API_KEY と置き換えます。
  2. ファイルを保存し、gemini を再起動します。
  3. Gemini CLI で /mcp を実行します(またはシェルで gemini mcp list)。anythingmcp が接続済みとして表示されるはずです。
  4. プロンプトを入力しましょう。Gemini CLI が X (Twitter) のツールを呼び出せるようになりました。

利用可能なツール

ToolWhat it does
x_get_meRead the X account that authorized the connector: id, name, @username and the user fields asked for
x_get_user_by_usernameLook up one X account by its @username (without the @): id, name, bio, follower and post counts and more
x_get_users_by_usernamesLook up up to 100 X accounts by @username in one call
x_get_userLook up one X account by its numeric user id: name, @username, bio, counts and the user fields asked for
x_search_usersFind X accounts by name or @username keywords
x_get_postRead one post by id: text, author_id, time, metrics and the fields asked for
x_get_postsRead up to 100 posts by id in one call
x_list_user_postsList the most recent posts of an account (up to the last 3,200), newest first
x_list_user_mentionsList the most recent posts that mention an account (up to the last 800), newest first
x_get_home_timelineRead your home timeline in reverse chronological order: posts and reposts from you and the accounts you follow
x_search_recent_postsSearch posts from the last 7 days with X search operators, e.g. "anythingmcp lang:en -is:retweet", from:username, to:username, #hashtag…
x_count_recent_postsCount the posts of the last 7 days that match a search query, per minute, hour or day, without reading them
x_list_quote_postsList the posts that quote a given post, newest first, with the quoting text and author_id
x_list_reposted_byList the accounts that reposted a post, with the user fields asked for
x_list_liking_usersList the accounts that liked a post
x_create_postPublish a new post on the authorized account, visible to everyone at once
x_reply_to_postPublish a reply to a post, visible to everyone at once
x_quote_postPublish a post that quotes another post with your comment, visible to everyone at once
x_delete_postDelete one of your own posts for good
x_list_liked_postsList the posts an account liked, newest like first
x_like_postLike a post as the authorized account
x_unlike_postRemove your like from a post you liked before
x_repostRepost a post to your followers, visible to everyone at once
x_undo_repostTake back your repost of a post; the original post stays
x_list_bookmarksList your bookmarked posts, most recently bookmarked first (up to the last 800)
x_add_bookmarkBookmark a post
x_remove_bookmarkRemove a post from your bookmarks
x_list_followersList the accounts that follow an account, newest follower first
x_list_followingList the accounts an account follows, most recently followed first
x_follow_userFollow an account as the authorized account; the other account is notified
x_unfollow_userStop following an account as the authorized account
x_list_owned_listsList the X Lists an account owns: id, name, description, member and follower counts
x_list_followed_listsList the X Lists an account follows: id, name, description, member and follower counts
x_get_listRead one X List: name, description, member and follower counts, whether it is private and when it was created
x_list_list_postsRead the latest posts from the members of an X List, newest first
x_list_list_membersList the accounts that are members of an X List, with the user fields asked for
x_list_dm_eventsList your recent direct messages across all conversations (the last 30 days), newest first
x_list_dm_conversation_with_userRead your one-to-one direct message conversation with another account (the last 30 days), newest first
x_send_dmSend a direct message to an account, in your one-to-one conversation with it (created when needed)
x_send_dm_to_conversationSend a direct message into an existing conversation (one-to-one or group) by its dm_conversation_id from x_list_dm_events
x_delete_dmDelete one of your direct messages, for you only (the other side keeps it)

プロンプトの例

  • 「今日の自分のアカウントへのメンションを表示して、質問しているものには返信の下書きを作成してください。」
  • 「直近 7 日間の当社の製品ローンチに関する投稿を検索して、全体のトーンをまとめてください。」
  • 「今週、#ourbrand に言及した投稿は 1 日あたり何件ありましたか?」
  • 「新しい料金ページを告知する投稿の下書きを作成し、私が文面を承認したら公開してください。」

FAQ

Gemini CLI はどこから MCP サーバーを読み込みますか? ユーザー単位では ~/.gemini/settings.json、プロジェクト単位ではプロジェクト内の .gemini/settings.json です。gemini mcp list で各サーバーと接続状態を確認できます。

次のステップ

このガイドは役に立ちましたか?

X エージェントまで、あとワンクリック。

コネクタをインストールし、キーを貼り付けて、Gemini に聞くだけ。7 日間無料、クレジットカード不要。

関連ガイド

コネクタ

MCP 経由で X (Twitter) を ChatGPT に接続する方法

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

コネクタ

MCP 経由で X (Twitter) を Claude に接続する方法

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

コネクタ

MCP 経由で X (Twitter) を Cursor に接続する方法

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

コネクタ

MCP 経由で X (Twitter) を Meta Muse に接続する方法

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

コネクタ

X (Twitter) を MCP に:あらゆる AI エージェントから X (Twitter) を操作

AI に X(旧 Twitter)で作業させます。投稿、タイムライン、メンション、ブックマーク、リスト、ダイレクトメッセージの閲覧と検索、アカウントとフォロワーの参照に加え、あなたの確認後には投稿、返信、引用の公開、いいね、リポスト、DM の送信ができます。

コネクタ

MCP 経由で Canva を Gemini に接続する方法

AI に Canva で作業させます。デザインの検索と参照、新しいデザインの作成、PDF、PNG、PowerPoint、動画へのエクスポート(ダウンロードリンク付き)、フォルダーの整理、リンクからの画像アップロード、ブランドテンプレートの参照、デザインへのコメントができます。