MCP server for posting to X (Twitter)
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"post-x": {
"command": "/path/to/post-x"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
An MCP (Model Context Protocol) server for X (Twitter). Built in Rust using OAuth 1.0a and the X API v2. Supports multiple accounts.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API
PubNub Model Context Protocol MCP Server for Cursor and Claude
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Post X and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP (Model Context Protocol) server for X (Twitter). Built in Rust using OAuth 1.0a and the X API v2. Supports multiple accounts.
Communicates via stdio using JSON-RPC 2.0.
| Tool | Description |
|---|---|
list_accounts | List available accounts and which is the default |
post_tweet | Post a tweet with optional media (up to 4 images, 1 video, or 1 GIF) |
post_thread | Post a thread of up to 25 tweets, each with optional media |
delete_tweet | Delete a tweet by ID or URL |
upload_media | Upload media for later attachment (returns a media_id) |
search_tweets | Search recent tweets (last 7 days) with Twitter operators |
get_timeline | Get your home timeline in reverse chronological order |
get_me | Get the authenticated user's profile |
lookup_user | Look up any user by @username or numeric ID |
get_followers | List your followers (paginated) |
get_following | List who you follow (paginated) |
get_all_followers | Fetch ALL your followers in a single call (auto-paginates) |
get_all_following | Fetch ALL accounts you follow in a single call (auto-paginates) |
like_tweet | Like a tweet by ID or URL |
unlike_tweet | Unlike a tweet by ID or URL |
retweet | Retweet a tweet by ID or URL |
unretweet | Undo a retweet by ID or URL |
get_dm_events | Get recent direct messages across all conversations |
send_dm | Send a direct message to a conversation |
follow_user | Follow a user by username or ID |
unfollow_user | Unfollow a user by username or ID |
All tools accept an optional account parameter to select which X account to use. Omit it to use the default account.
cargo build --release
Produces target/release/post-x (optimized with LTO, stripped).
The server looks for the config at the first of:
$XDG_CONFIG_HOME/mcp-server-post-x/config.toml~/.config/mcp-server-post-x/config.tomlYou can also run without any config file by providing credentials via environment variables (great for containers/CI):
export POST_X_API_KEY=...
export POST_X_API_KEY_SECRET=...
export POST_X_ACCESS_TOKEN=...
export POST_X_ACCESS_TOKEN_SECRET=...
# Optional:
# export POST_X_ACCOUNT_NAME=myaccount
Create the config file (classic approach):
mkdir -p ~/.config/mcp-server-post-x
Create ~/.config/mcp-server-post-x/config.toml:
Single account (no default_account needed):
[accounts.myaccount]
api_key = "your-api-key"
api_key_secret = "your-api-key-secret"
access_token = "your-access-token"
access_token_secret = "your-access-token-secret"
Multiple accounts:
default_account = "myaccount"
[accounts.myaccount]
api_key = "your-api-key"
api_key_secret = "your-api-key-secret"
access_token = "your-access-token"
access_token_secret = "your-access-token-secret"
[accounts.otheraccount]
api_key = "your-api-key"
api_key_secret = "your-api-key-secret"
access_token = "other-access-token"
access_token_secret = "other-access-token-secret"
Notes:
[accounts.codechap])default_account is requireddefault_account is optional (auto-detected)api_key/api_key_secret (same X app). Only the access_token/access_token_secret differ per account.Secure it:
chmod 700 ~/.config/mcp-server-post-x
chmod 600 ~/.config/mcp-server-post-x/config.toml
See Getting credentials below for how to obtain these.
Claude Code (~/.claude.json):
{
"mcpServers": {
"post-x": {
"command": "/path/to/post-x"
}
}
}
Then ask Claude things like: