X (Twitter) MCP
Enables interaction with X (Twitter) to post tweets, threads, and replies while retrieving tweet metrics and account information. It supports core management tasks like deleting tweets and verifying authentication through the Twitter API.
README
X (Twitter) MCP
A simple Model Context Protocol server for Twitter/X. Post tweets, threads, and get metrics.
Features
| Tool | Description |
|---|---|
x_get_me() |
Verify auth, get your profile info |
x_post_tweet(text) |
Post a single tweet (max 280 chars) |
x_post_thread(text) |
Post a thread (separate tweets with \n\n---\n\n) |
x_get_tweet(id) |
Get tweet details and metrics |
x_delete_tweet(id) |
Delete a tweet |
x_reply(tweet_id, text) |
Reply to a tweet |
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.txt
3. Configure
cp .env.example .env
Edit .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_secret
4. 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.