Twitter MCP Server
Twitter/Xデータを、Claude、Cursor、AIエージェント向けのMCPツールとして利用できます。
An open-source server that plugs live Twitter/X data straight into your AI client — twelve read-only tools, one command to install, no Twitter developer account and no scraping.
npx -y @kaitoinfra/twitterapi-io-mcp-server
Twitter MCP Serverとは
The Twitter MCP Server is an open-source Model Context Protocol server that gives Claude, Cursor and other AI agents direct, structured access to live Twitter/X data. インストール it with one command, point it at a twitterapi.io API key, and your AI client gains twelve tools for searching tweets and reading profiles, followers, replies and trends.
MCP is an open standard that lets an AI application call external tools and data sources in a uniform way — instead of bespoke integration code for every service, a client speaks one protocol to many servers. This server is the Twitter/X piece of that picture: it wraps twitterapi.io's read-only data endpoints so any MCP-compatible client can use them as native tools. The agent decides which tool to call and with what arguments; you just ask a question in plain language.
It is read-only by design — no posting, no logins, no scraping — and it is licensed MIT, so you can read the source, fork it, or run it unmodified.
12個のツール
Every tool maps to a twitterapi.io endpoint and returns public data only. The agent picks the right one for each request.
search_tweetsfrom:、since:、lang:など、Twitterの演算子をフルに使った高度な検索。トピック監視、データセット作成get_user_info任意のアカウントの基本プロフィールをハンドル名から取得。bio、フォロワー数、認証情報など。アカウント検索とエンリッチメントget_user_aboutユーザーの拡張プロフィール/詳細情報。より深いプロフィール情報の把握get_user_followersアカウントのフォロワーをメタデータ付きで取得。カーソルベースのページネーションに対応。オーディエンスとネットワークの分析get_user_followingsユーザーがフォローしているアカウントを取得。カーソルベースのページネーションに対応。興味関心グラフの可視化get_user_last_tweetsユーザーのタイムラインにある最近のツイート。アクティビティの追跡と要約get_user_mentions指定したアカウントに言及しているツイート。ブランドと評判のモニタリングget_tweets_by_ids1回の呼び出しで、IDから最大100件のツイートを一括取得。ツイートデータセットのハイドレーションget_tweet_repliesツイートにぶら下がる返信スレッド。会話分析get_tweet_quotes指定したツイートの引用ツイート。議論と拡散の分析get_tweet_retweetersツイートをリツイートしたアカウント。拡散力とリーチの分析get_trendsWOEIDで指定した場所のトレンドトピック。トレンド検知とタイムリーなコンテンツ作成
インストールと設定
サーバーはローカルで npx — there is nothing to clone or build. Add the configuration below to your client, set your API key, and restart it.
Claude Desktop
これを claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude. The file lives in ~/Library/Application Support/Claude/ 、Windowsでは %APPDATA%\Claude\ です。
{
"mcpServers": {
"twitterapi-io": {
"command": "npx",
"args": ["-y", "@kaitoinfra/twitterapi-io-mcp-server"],
"env": { "TWITTERAPI_IO_API_KEY": "your_key_here" }
}
}
}Cursor & VS Code
Both speak the same MCP configuration. In Cursor: Settings → MCP → Add new MCP Server. In VS Code: open User Settings (JSON) and add the server under its MCP servers block. Either way, paste the same mcpServers ブロックを貼り付けてください。
Claude Code
ターミナルからコマンド1つで実行できます。
claude mcp add twitterapi-io npx -- -y @kaitoinfra/twitterapi-io-mcp-server -e TWITTERAPI_IO_API_KEY=your_key_here
置き換えるのは your_key_here です。実際のtwitterapi.io APIキーに置き換えてください。詳しくは次のセクションを参照してください。
リクエストの流れ
With the server connected you never call the API directly. You ask your AI client a normal question; it picks the right tool, calls it, and reads the result back to you. Here is a real round-trip.
- 1
あなたが質問する
ClaudeやCursorで、自然な言葉で入力します。“@elonmuskのプロフィールを取得して。”
- 2
エージェントがツールを呼び出す
モデルは、この依頼がget_user_infoに対応すると判断し、推測した引数で呼び出します。tool call{ "name": "get_user_info", "arguments": { "userName": "elonmusk" } } - 3
サーバーがライブデータを返す
twitterapi.io answers and the server hands the live profile straight back to the model:response{ "data": { "id": "44196397", "userName": "elonmusk", "name": "Elon Musk", "followers": 239997162, "following": 1142, "isBlueVerified": true, "description": "...", "profilePicture": "https://..." } } - 4
エージェントが回答する
The model reads that and replies in plain language — “@elonmusk has roughly 240M followers, follows 1,142 accounts and is Blue-verified” — or a table, a comparison, whatever you asked for. No glue code and no rate-limit handling on your side.
The same pattern covers every tool — “what's trending worldwide” routes to get_trendsへ、“recent tweets from @sama about AGI”なら search_tweets.
APIキーの取得
The server authenticates to twitterapi.io with your own key, passed through the TWITTERAPI_IO_API_KEY 環境変数で渡します。
- 1.twitterapi.ioにサインインし、ダッシュボードを開きます。
- 2.ダッシュボードからAPIキーをコピーします。
- 3.設定内で
TWITTERAPI_IO_API_KEYとして貼り付け、クライアントを再起動します。
twitterapi.ioを選ぶ理由
The server is only as good as the API behind it. The official X (Twitter) API requires a developer account, gates capability behind steep tiers, and is priced for enterprises. twitterapi.io takes the opposite approach:
1,000ツイートあたり。呼び出しごとの課金で、サブスクリプションも最低利用料金も不要
高スループットなエージェントワークロード向けに設計
Twitter開発者承認もアプリ審査も不要
詳しくは 料金詳細 で呼び出しごとの料金表を確認できます。また、 X API概要 では、twitterapi.ioと公式APIの詳細な比較を確認できます。
よくある質問
MCPサーバーとは?
MCP(Model Context Protocol)は、AIアプリケーションが外部ツールやデータソースを共通の方法で呼び出すためのオープン標準です。MCPサーバーは1つの機能を公開します。このサーバーはTwitter/Xデータを公開するため、MCP対応クライアントなら、連携コードを書かなくてもツイート、プロフィール、トレンドを読み取れます。
どのクライアントで使えますか?
MCPに対応しているものであれば使えます。Claude Desktop、Claude Code、Cursor、VS Codeをはじめ、MCP対応のエディタやエージェントで動作します。セットアップはいずれも同じ標準設定です。
Twitter MCP serverは無料ですか?
サーバー自体はMITライセンスの無料オープンソースです。利用するtwitterapi.ioは呼び出しごとの課金制で、自分のAPIキーを設定し、ツールが実際に取得したデータ分だけ支払います。
twitterapi.ioのアカウントとAPIキーは必要ですか?
はい。サーバーにはtwitterapi.io APIキーが必要で、TWITTERAPI_IO_API_KEY環境変数で渡します。キーはダッシュボードから約1分で作成できます。
MCPサーバーでできないことは?
完全に読み取り専用です。投稿、返信、いいね、フォロー、DM送信、アカウントへのログインはできません。12個のツールはいずれも公開されているTwitter/Xデータを取得するだけです。
公式X(Twitter)APIとは何が違いますか?
公式X APIを使うにはTwitter開発者アカウントが必要で、機能は制約の大きい料金ティアの内側にあり、価格もエンタープライズ向けです。このサーバーは代わりにtwitterapi.ioと通信します。開発者アカウントは不要、呼び出しごとの課金で、公開データへの読み取りアクセスをはるかに低コストで利用できます。
どのMCP仕様バージョンを実装していますか?
現在リリースされている仕様である2025-11-25 Model Context Protocol specificationを対象にしています。そのため、最新のMCPクライアントで動作します。
オープンソースですか?
はい。MITライセンスで、ソースはGitHubのgithub.com/kaitoInfra/twitterapi-io-mcp-serverで公開されています。
最新版へ更新するには?
設定ではnpx経由でサーバーを起動するため、起動のたびに公開済みの最新版が自動で取得されます。特定のバージョンに固定したい場合は、argsで明示的に指定してください。
レート制限はありますか?
twitterapi.ioは高スループット向けに設計されており、秒間1000+クエリに対応します。サーバー自体は制限を追加しません。実際の利用量はレート上限ではなく、APIクレジットによって決まります。
エージェントにリアルタイムのTwitterデータを。
インストール the server, drop in an API key, and Claude or Cursor can search tweets and read profiles, followers and trends — in the next message you send it.