x-mcp
x-mcp
X(Twitter)API v2 の前面に立つ MCP サーバー。イメージ: ghcr.io/robertdwhite/x-mcp。
マニフェストは whitehouse-rke2(apps/ai/x-mcp/)にあります。
読み取りは無料です。書き込みは2段階 — draft_post はプレビューと
使い捨ての confirm_token を返し、publish_post がその正確なトークンで呼び出されるまで何も公開されません。
エージェントは1回の呼び出しで投稿できないため、常に人間が見えるプレビューが先に存在します。
これは出力が公開かつ永続的である場合に重要です。
削除ツールは意図的にありません。削除は破壊的で取り消し不能です。X アプリから投稿を削除してください。
ツール
ツール | 種類 | 備考 |
| 読み取り | 認証情報がどのアカウントとして動作するか |
| 読み取り | ID による1件の投稿 |
| 読み取り | ハンドルからの最近の投稿 |
| 読み取り | 認証済みアカウントへのメンション |
| 読み取り | 逆時系列のホームタイムライン |
| 読み取り | 直近7日間の検索(プラン依存) |
| ステージ | 検証 + プレビュー。何も公開しない。 |
| 読み取り | ステージされた下書きと残り TTL |
| 書き込み | 下書きを公開。公開かつ永続的。 |
下書きはインメモリです。再起動でクリアされるため、古い confirm token が プレビューを表示したプロセスより長生きすることはありません。
Related MCP server: pyX-MCP
エンドポイント
POST /mcp— ストリーミング可能な HTTP MCP。Authorization: Bearer $MCP_TOKENで保護GET /healthz— オープン。死活監視用
他のすべてのパスは 401 ではなく 404 を返します — MCP クライアントが起動時に行う
/.well-known/oauth-* プローブも含みます。そこでの 401 はクライアントに
インタラクティブな OAuth フローを試行させ、ヘッドレス クライアントは接続タイムアウトとしてハングします。
設定
環境変数 | 必須 | 目的 |
| 推奨 |
|
| はい | コンシューマーキー |
| はい | コンシューマーシークレット |
| はい | アクセストークン(ユーザーコンテキスト) |
| はい | アクセストークンシークレット |
| いいえ | 文字数制限、デフォルト |
| いいえ | 下書きの有効期限(秒)、デフォルト |
| いいえ | HTTP タイムアウト、デフォルト |
X への認証は OAuth 1.0a ユーザーコンテキストで、リクエストごとに署名されます。 アプリ専用のベアラートークンは投稿できません。公開はアカウント として 行われるためです。 読み取りおよび書き込み権限を持つ X アプリから4つの値を取得してください。コンシューマーキーと、 自分のアカウント用に生成されたアクセストークン/シークレットのペアです。
認証情報がない場合、すべてのツールはスタックトレースの代わりに明確な「未設定」エラーを返します。 そのため、認証情報が存在する前にサービスをデプロイできます。
X API プランに関する注意
書き込みアクセスは X の有料 API ティアによって制限され、無料ティアは大幅に制限されています。
このサーバーからの 429 は、X が提供する場合にレート制限のリセットを表示します。
書き込みがすぐに失敗する場合は、developer.x.com でプランを確認してください。
ローカル実行
pip install -r requirements.txt
MCP_TOKEN=dev X_API_KEY=... X_API_SECRET=... \
X_ACCESS_TOKEN=... X_ACCESS_TOKEN_SECRET=... python server.pyThis server cannot be installed
Maintenance
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
- AlicenseBqualityCmaintenanceEnables interacting with Twitter/X through natural language, including searching tweets, posting, sending DMs, and managing timelines via any MCP client.8MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to post, search, and manage tweets on X (Twitter) via the MCP protocol.102
- FlicenseAqualityDmaintenanceEnables interaction with the X (Twitter) API through MCP tools for managing users, posts, bookmarks, likes, and lists. Supports markdown or JSON output and uses OAuth 2.0 PKCE authentication.22
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X read API, enabling search, user profiles, tweets, followers, and more via natural language.94149MIT
Related MCP Connectors
FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native
128 REST operations. 120 MCP routes; 119 JSON/text ops. OAuth 2.1. Not affiliated with X Corp.
Bluesky MCP — wraps the AT Protocol API
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/RobertDWhite/x-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server