x-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
x-mcp
MCP server in front of the X (Twitter) API v2. Image: ghcr.io/robertdwhite/x-mcp.
Manifests in whitehouse-rke2 (apps/ai/x-mcp/).
Reads are free. Writes are two-step — draft_post returns a preview plus a
single-use confirm_token, and nothing is published until publish_post is
called with that exact token. An agent cannot post in one call, so a human-visible
preview always exists first. That matters when the output is public and permanent.
There is deliberately no delete tool. Deletion is destructive and irreversible; remove posts from the X app.
Tools
Tool | Kind | Notes |
| read | Which account the credentials act as |
| read | One post by id |
| read | Recent posts from a handle |
| read | Mentions of the authenticated account |
| read | Reverse-chronological home timeline |
| read | Last-7-days search (plan-dependent) |
| stage | Validates + previews. Publishes nothing. |
| read | Staged drafts and their remaining TTL |
| write | Publishes a draft. Public and permanent. |
Drafts are in-memory: a restart clears them, so a stale confirm token never outlives the process that showed the preview.
Related MCP server: x-mcp
Endpoints
POST /mcp— streamable-HTTP MCP, gated onAuthorization: Bearer $MCP_TOKENGET /healthz— open, for liveness/readiness
Every other path returns 404, not 401 — including the /.well-known/oauth-*
probes MCP clients make on startup. A 401 there makes clients attempt an
interactive OAuth flow, which hangs headless clients as a connection timeout.
Configuration
Env | Required | Purpose |
| recommended | Bearer for |
| yes | Consumer key |
| yes | Consumer secret |
| yes | Access token (user context) |
| yes | Access token secret |
| no | Length limit, default |
| no | Draft lifetime in seconds, default |
| no | HTTP timeout, default |
Auth to X is OAuth 1.0a user context, signed per request. App-only bearer tokens cannot post, because publishing acts as the account. Get the four values from an X app with Read and Write permission: consumer keys plus an access token/secret pair generated for your own account.
If the credentials are missing, every tool returns a clear "not configured" error instead of a stack trace — so the service can be deployed before the credentials exist.
Note on X API plans
Write access is gated by X's paid API tiers, and the free tier is heavily
capped. A 429 from this server surfaces the rate-limit reset when X provides
it. Check your plan at developer.x.com if writes fail immediately.
Local run
pip install -r requirements.txt
MCP_TOKEN=dev X_API_KEY=... X_API_SECRET=... \
X_ACCESS_TOKEN=... X_ACCESS_TOKEN_SECRET=... python server.pyTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Hosted MCP server from TwitterAPI.io that gives AI agents read-only access to Twitter/X data. 12 tools: tweet search with X operators, user profiles, a user's latest tweets, followers and followings, replies, quotes, retweeters, mentions and trends. Connect at https://mcp.twitterapi.io/mcp with a TwitterAPI.io API key or account sign-in; usage is paid per result returned. Separately, TwitterAPI.io also offers x402 pay-per-call HTTP endpoints (tweet search, user info, a user's latest tweets) paid in USDC on Base or Solana with no account or API key; see https://docs.twitterapi.io/x402-pay-per-call. The MCP server itself uses an API key or sign-in.
Draft, schedule and publish posts on X, Threads and Bluesky from ChatGPT, Claude or any MCP client.
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interacting with Twitter/X through natural language, including searching tweets, posting, sending DMs, and managing timelines via any MCP client.8MIT
- 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-
- FlicenseBqualityDmaintenanceMCP server for the official X API, enabling agents to read and publish posts, look up users, and search posts with safe read-only default and explicit write mode.8-
- AlicenseAqualityBmaintenanceEnables MCP clients to interact with the X (Twitter) API v2 through 41 typed tools for reading, searching, engaging, publishing, and managing content, with policy-based access control and session credit budgets to prevent overspending.4152 npm1MIT