Loading...
Loading...
Twitter/X MCP server for fetching user profiles, tweets, follower events, and KOL tracking via AI assistants
npx skill4agent add aradotso/mcp-skills opentwitter-mcp-serverSkill by ara.so — MCP Skills collection.
uvclaude mcp add twitter \
-e TWITTER_TOKEN=$TWITTER_TOKEN \
-- uv --directory /path/to/twitter-mcp run twitter-mcp~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"twitter": {
"command": "uv",
"args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
"env": {
"TWITTER_TOKEN": "${TWITTER_TOKEN}"
}
}
}
}~/.cursor/mcp.json{
"mcpServers": {
"twitter": {
"command": "uv",
"args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
"env": {
"TWITTER_TOKEN": "${TWITTER_TOKEN}"
}
}
}
}~/.continue/config.yamlmcpServers:
- name: twitter
command: uv
args:
- --directory
- /path/to/twitter-mcp
- run
- twitter-mcp
env:
TWITTER_TOKEN: ${TWITTER_TOKEN}| Variable | Required | Description |
|---|---|---|
| Yes | Bearer token from 6551.io |
| No | Override API URL (default: |
| No | Max results per query (default: 100) |
config.json{
"api_base_url": "https://ai.6551.io",
"api_token": "your-token-here",
"max_rows": 100
}get_twitter_user# Example use from AI assistant:
# "Show me @elonmusk's profile"
{
"username": "elonmusk"
}get_twitter_user_by_id{
"user_id": "44196397"
}get_twitter_user_tweets# "What did @VitalikButerin tweet recently"
{
"username": "VitalikButerin",
"count": 20
}get_twitter_tweet_by_id{
"tweet_id": "1234567890"
}get_twitter_article_by_id{
"article_id": "1234567890"
}search_twitter# "Search Bitcoin related tweets"
{
"query": "Bitcoin",
"count": 50
}search_twitter_advanced# "Popular tweets about ETH with 1000+ likes"
{
"query": "ETH",
"min_likes": 1000,
"min_retweets": 100,
"language": "en",
"count": 30
}min_likesmax_likesmin_retweetsmax_retweetsmin_repliesmax_replieslanguagesinceuntilverified_onlyget_twitter_quote_tweets_by_id# "Who quoted this tweet"
{
"tweet_id": "1234567890",
"count": 50
}get_twitter_retweet_users_by_id# "Who retweeted this tweet"
{
"tweet_id": "1234567890",
"count": 100
}get_twitter_watch# "Show my Twitter watch list"
{}add_twitter_watch# "Monitor @elonmusk with follower tracking"
{
"username": "elonmusk",
"event_types": ["NEW_FOLLOWER", "NEW_UNFOLLOWER", "NEW_TWEET"],
"remark": "Tesla CEO",
"ca": "0x1234..." # Optional contract address
}NEW_TWEETNEW_TWEET_REPLYNEW_TWEET_QUOTENEW_RETWEETNEW_FOLLOWERNEW_UNFOLLOWERDELETEUPDATE_NAMEUPDATE_DESCRIPTIONUPDATE_AVATARUPDATE_BANNERCAdelete_twitter_watch{
"username": "elonmusk"
}get_twitter_follower_events# "Who followed @elonmusk recently"
{
"username": "elonmusk",
"event_type": "NEW_FOLLOWER",
"count": 50
}get_twitter_deleted_tweets# "What tweets did @elonmusk delete"
{
"username": "elonmusk",
"count": 20
}get_twitter_kol_followers# "Which KOLs follow @elonmusk"
{
"username": "elonmusk",
"count": 100
}{
"userId": "44196397",
"screenName": "elonmusk",
"name": "Elon Musk",
"description": "Bio text...",
"followersCount": 170000000,
"friendsCount": 500,
"statusesCount": 30000,
"verified": true,
"profileImageUrl": "https://...",
"profileBannerUrl": "https://...",
"createdAt": "2009-06-02T20:12:29Z"
}{
"id": "1234567890",
"text": "Tweet content...",
"createdAt": "2024-02-20T12:00:00Z",
"language": "en",
"retweetCount": 100,
"favoriteCount": 500,
"replyCount": 20,
"quoteCount": 10,
"viewCount": 10000,
"userScreenName": "elonmusk",
"userName": "Elon Musk",
"userIdStr": "44196397",
"userFollowers": 170000000,
"userVerified": true,
"conversationId": "1234567890",
"isReply": false,
"isQuote": false,
"hashtags": ["crypto", "bitcoin"],
"media": [
{
"type": "photo",
"url": "https://...",
"thumbUrl": "https://..."
}
],
"urls": [
{
"url": "https://t.co/...",
"expandedUrl": "https://example.com",
"displayUrl": "example.com"
}
],
"mentions": [
{
"username": "VitalikButerin",
"name": "Vitalik Buterin"
}
]
}wss://ai.6551.io/open/twitter_wss?token=YOUR_TOKEN{
"jsonrpc": "2.0",
"id": 1,
"method": "twitter.subscribe"
}{
"jsonrpc": "2.0",
"method": "twitter.event",
"params": {
"id": 123456,
"twAccount": "elonmusk",
"twUserName": "Elon Musk",
"profileUrl": "https://twitter.com/elonmusk",
"eventType": "NEW_TWEET",
"content": { /* tweet object */ },
"ca": "0x1234...",
"remark": "Custom note",
"createdAt": "2026-03-06T10:00:00Z"
}
}{
"jsonrpc": "2.0",
"id": 2,
"method": "twitter.unsubscribe"
}# High-engagement tweets in specific timeframe
search_twitter_advanced(
query="AI",
min_likes=1000,
min_retweets=500,
since="2024-01-01",
until="2024-12-31",
verified_only=True,
language="en"
)# Add multiple KOLs to watch list
for username in ["elonmusk", "VitalikButerin", "naval"]:
add_twitter_watch(
username=username,
event_types=["NEW_TWEET", "NEW_FOLLOWER"],
remark=f"Tracking {username}"
)# Get full engagement picture for a tweet
tweet = get_twitter_tweet_by_id(tweet_id="1234567890")
quotes = get_twitter_quote_tweets_by_id(tweet_id="1234567890")
retweet_users = get_twitter_retweet_users_by_id(tweet_id="1234567890")# Compare followers vs KOL followers
all_followers = get_twitter_follower_events(
username="elonmusk",
event_type="NEW_FOLLOWER"
)
kol_followers = get_twitter_kol_followers(username="elonmusk")cd /path/to/twitter-mcp
uv sync
export TWITTER_TOKEN=your-token
uv run twitter-mcpnpx @modelcontextprotocol/inspector \
uv --directory /path/to/twitter-mcp run twitter-mcpsrc/twitter_mcp/
├── server.py # Entry point
├── app.py # FastMCP instance
├── config.py # Config loader
├── api_client.py # HTTP client
└── tools.py # Tool implementationsTWITTER_TOKENmax_rowsTWITTER_API_BASEai.6551.iouv