x-wing-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-wing-mcp
A stdio MCP server for X (Twitter) that combines x-wing write tools with x_data read tools.
All tools share one process, one .env, and one official xdk OAuth 2.0 app.
Tools
Write tools
Tool | Description | Required scope |
| Create a single post |
|
| Create a multi-post thread |
|
| Like a post |
|
| Repost a post |
|
| Follow a user by ID |
|
| Unfollow a user by source/target ID |
|
| Send a direct message |
|
Read tools
Tool | Description | Required scope |
| Fetch exact public posts by URL/ID |
|
| Recent posts for one user |
|
| Search public posts |
|
| Authenticated account timeline |
|
| Mentions for the authenticated account |
|
| Thread/conversation from an anchor post |
|
| Replies to one post |
|
| Quote posts of one post |
|
| Followers/following for one user |
|
| Published X Article via wrapper tweet |
|
| One-shot bulk collection query |
|
| Server/provider status | none |
| Provider diagnostics | none |
| Local usage/cost ledger summary | none |
| Owned-account analytics from the local x-analytics service (read-only, never fetches) | none (local HTTP) |
Read tools use an internal provider router (official_x, syndication, socialdata, getxapi).
max_cost_usd is required on every read tool except status/healthcheck.
Related MCP server: twikit-mcp
Provisioning
Ensure this repo's
.envexists and is readable only by the owner:chmod 600 .envPopulate
.envwith OAuth 2.0 credentials from the X developer portal:X_OAUTH2_CLIENT_ID=... X_OAUTH2_CLIENT_SECRET=... X_OAUTH2_ACCESS_TOKEN=... X_OAUTH2_REFRESH_TOKEN=... X_OAUTH2_SCOPES="offline.access dm.read tweet.write like.write like.read users.read dm.write tweet.read bookmark.write follows.write follows.read"Legacy aliases (
X_CLIENT_ID,X_CLIENT_SECRET,X_ACCESS_TOKEN,X_REFRESH_TOKEN,X_SCOPES) are also accepted.Optional paid/backup providers:
SOCIALDATA_API_KEY=... GETXAPI_API_KEY=...Leave blank to rely on
official_x+syndicationonly.If the access token is expired, run the included OAuth setup script or use the CLI refresh path to obtain a fresh token.
Running
./x-wing-mcp-hermes.shThe wrapper uses the repo-local uv environment and launches the server over
stdio. stdout is the MCP protocol stream - no other process should write to it.
Analytics integration
x_read_own_analytics is a read-only client of the separate local
x-analytics service. It reads the service's stored observations over
loopback HTTP and never opens an analytics database or calls X directly.
Collection, OAuth credentials, spend limits, and freshness policy belong to
the x-analytics deployment. Keep this MCP tool read-only: agents must not
be able to trigger paid analytics collection.
Configure the local endpoint in config/analytics.yaml. x-wing accepts only
an http loopback origin, uses a bounded timeout, rejects redirects and
oversized/non-JSON responses, and reports a distinct ANALYTICS_SERVICE error
when the service is missing or unreachable.
The MCP tool defaults to view="overview". It also supports posts,
post_history (requires post_id), followers, and status, with a
window_days of 1–30. Responses use x-analytics' versioned envelope with an
as_of timestamp and freshness state. Post metrics are cumulative at as_of;
reported change always names the two observation timestamps rather than
pretending to be a calendar-period total.
Testing
python -m pytest tests/ -qProject layout
.
├── .env # real tokens, gitignored, chmod 600
├── .env.example # committed template
├── .gitignore # ignores .env and auth-state files
├── pyproject.toml # x-wing-mcp package metadata
├── README.md # this file
├── x_client.py # vendored + patched x-wing client
├── oauth_setup.py # vendored + patched OAuth setup
├── server.py # FastMCP stdio server (read + write tools)
├── xdata/ # vendored x_data read providers/router/server
├── config/ # provider routing configuration
└── tests/ # vendored + new MCP testsVerification
uv run python -m pytest tests/ -qpasses.An MCP handshake via the wrapper script (
initialize→tools/list) returns the 22 tools documented above.x_data_statusreports the configured providers' health without exposing credentials.A token check against
users/mesucceeds, and.envplus auth-state files remain owner-readable only.
Deployment notes
This repository is relocatable: configure the MCP host with the absolute path to
x-wing-mcp-hermes.shin its checked-out repository.Store X credentials only in
<repo_root>/.env(mode0600). Do not duplicate or source them from shared host, agent-profile, or global environment files.Register one x-wing MCP server per intended host/profile and apply that host's tool-access policy—for example, exclude write tools from read-only profiles.
The wrapper reads only the repository-local
.envand keeps stdout reserved for the stdio MCP protocol.
Roadmap
See AGENTS.md. Repo reconciliation is
already complete: this repo (bob0x-ai/x-wing-mcp) is the canonical source of truth.
Tool 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
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with the Twitter/X API v2, enabling AI assistants to retrieve tweets, post content, reply, quote, and more programmatically.13MIT
- AlicenseBqualityCmaintenanceAn MCP server for interacting with Twitter/X using browser cookies without an API key, enabling tweet management, user actions, and search via natural language.6252 PyPI15MIT
- FlicenseAqualityDmaintenanceAn MCP server for interacting with X/Twitter, enabling posting tweets, searching, user info, timeline, liking, retweeting, and deleting tweets.71-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables posting tweets, reading timelines, searching posts, and interacting with X (Twitter) API.2MIT