X (Twitter) 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 (Twitter) MCP
A simple Model Context Protocol server for Twitter/X. Post tweets, threads, and get metrics.
Features
Tool | Description |
| Verify auth, get your profile info |
| Post a single tweet (max 280 chars) |
| Post a thread (separate tweets with |
| Get tweet details and metrics |
| Delete a tweet |
| Reply to a tweet |
Related MCP server: Apex MCP for X Management
Requirements
Python 3.10+
Twitter API credentials (OAuth 1.0a)
Setup
1. Get Twitter API Credentials
Go to Twitter Developer Portal
Create a project and app
Enable OAuth 1.0a with read and write permissions
Generate Access Token and Secret
2. Install
git clone https://github.com/arnaldo-delisio/x-mcp.git
cd x-mcp
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt3. Configure
cp .env.example .envEdit .env with your credentials:
TWITTER_API_KEY=your_api_key
TWITTER_API_KEY_SECRET=your_api_key_secret
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret4. Add to Claude Code
Add to your .mcp.json or Claude Code config:
{
"mcpServers": {
"x": {
"command": "/path/to/x-mcp/venv/bin/python",
"args": ["/path/to/x-mcp/server.py"],
"env": {}
}
}
}Usage
Post a tweet
x_post_tweet("Hello world!")Post a thread
Separate tweets with \n\n---\n\n:
x_post_thread("1/ First tweet here
---
2/ Second tweet continues
---
3/ Final tweet")Get tweet metrics
x_get_tweet("1234567890")Returns likes, retweets, replies, impressions, quotes, and bookmarks.
Roadmap
Upload media (images, video)
Quote tweet
Batch metrics
License
MIT
Related MCP Connectors
Publish and schedule tweets and threads on X (Twitter) from your AI assistant.
X/Twitter search, posts, comments, user profiles, user posts/replies and video transcripts.
Your agent posts, schedules, queues and threads posts on X, with a human approval queue.
15 Twitter / X endpoints. Pay per call in USDC via x402.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables interaction with X (formerly Twitter), allowing for posting tweets, searching content, managing accounts, and organizing lists.1114 npm3MIT
- AlicenseNot gradedqualityDmaintenanceEnables complete management of X (Twitter) accounts through a single API key, supporting functions like getting tweets, searching, generating and posting replies.54 npm2MIT
- AlicenseBqualityDmaintenanceEnables users to interact with X (Twitter) through the X API. Supports posting tweets, retrieving user timelines, searching tweets, and replying to tweets with comprehensive error handling.33 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with X (Twitter) API v2 for posting tweets, searching, liking, retweeting, and more through natural language.17 PyPIMIT