Twitter MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/6551Team/opentwitter-mcp
cd opentwitter-mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "TWITTER_TOKEN=${TWITTER_TOKEN}" twitter-mcp -- node "<FULL_PATH_TO_OPENTWITTER_MCP>/dist/index.js"

Replace <FULL_PATH_TO_OPENTWITTER_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:TWITTER_TOKEN+ 2 optional
README.md

Twitter/X Data, User Profiles, Tweet Search, Follower Events, and KOL Tracking

Twitter MCP Server Twitter/X Data · User Profiles · Tweet Search · Follower Events · KOL Tracking

中文 | 日本語 | 한국어


Quick Install

First, go to https://6551.io/mcp to get your API Token.

Claude Code

claude mcp add twitter \
  -e TWITTER_TOKEN=<your-token> \
  -- uv --directory /path/to/twitter-mcp run twitter-mcp

Replace /path/to/twitter-mcp with your local project path, and <your-token> with your Token.

OpenClaw

export TWITTER_TOKEN="<your-token>"
cp -r openclaw-skill/opentwitter ~/.openclaw/skills/

Let AI Review & Install For You

Not sure if this MCP is safe? Paste the prompt below to your AI assistant — it will review the source code first, then install if safe:

Copy this prompt and send it to your AI assistant (replace `` and <your-token> with actual values):

Please review and install the twitter-mcp MCP server for me. The project is at .

Steps:
1. Review these files for security:
   - src/twitter_mcp/api_client.py — Confirm it only connects to ai.6551.io, no data sent elsewhere
   - src/twitter_mcp/config.py — Confirm token is only read from local config.json or env vars, no hardcoded secrets or leaks
   - src/twitter_mcp/tools.py — Confirm all tools only perform API queries, no file writes, command execution, or dangerous operations
   - pyproject.toml — Confirm dependencies are only mcp, httpx, no suspicious packages
2. Tell me your conclusion: safe / risky / problematic, with specific reasons
3. If safe, run the install (get Token from https://6551.io/mcp):
   claude mcp add twitter -e TWITTER_TOKEN=<your-token> -- uv --directory  run twitter-mcp

What Can It Do?

Once connected, just ask your AI assistant:

You say It does
"Show @elonmusk's Twitter profile" Get user profile info
"What did @VitalikButerin tweet recently" Get user's recent tweets
"Search Bitcoin related tweets" Keyword search
"Find tweets with #crypto hashtag" Hashtag search
"Popular tweets about ETH with 1000+ likes" Search with engagement filters
"Who quoted this tweet" Get quote tweets for a tweet
"Who retweeted this tweet" Get users who retweeted a tweet
"Who followed @elonmusk recently" Get new follower events
"Who unfollowed @elonmusk" Get unfollower events
"What tweets did @elonmusk delete" Get deleted tweets
"Which KOLs follow @elonmusk" Get KOL followers

Available Tools

Tool Description
get_twitter_user Get user profile by username
get_twitter_user_by_id Get user profile by numeric ID
get_twitter_user_tweets Get recent tweets from a user
search_twitter Search tweets with basic filters
search_twitter_advanced Advanced search with multiple filters
get_twitter_follower_events Get follower/unfollower events
get_twitter_deleted_tweets Get deleted tweets from a user
get_twitter_kol_followers Get KOL (Key Opinion Leader) followers
get_twitter_article_by_id Get Twitter article by ID
get_twitter_tweet_by_id Get tweet by ID with nested reply/quote tweets
get_twitter_quote_tweets_by_id Get tweets that quote a specific tweet
get_twitter_retweet_users_by_id Get users who retweeted a specific tweet
get_twitter_watch Get all Twitter monitoring users
add_twitter_watch Add a Twitter user to monitoring list
delete_twitter_watch Delete a Twitter user from monitoring list

Configuration

Get API Token

Go to https://6551.io/mcp to get your API Token.

Set the environment variable:

# macOS / Linux
export TWITTER_TOKEN="<your-token>"

# Windows PowerShell
$env:TWITTER_TOKEN = "<your-token>"
Variable Required Description
TWITTER_TOKEN Yes 6551 API Bearer Token (get from https://6551.io/mcp)
TWITTER_API_BASE No Override REST API URL
TWITTER_MAX_ROWS No Max results per query (default: 100)

Also supports config.json in the project root (env vars take precedence):

{
  "api_base_url": "https://ai.6551.io",
  "api_token": "<your-token>",
  "max_rows": 100
}

WebSocket Real-time Subscriptions

Endpoint: wss://ai.6551.io/open/twitter_wss?token=YOUR_TOKEN

Subscribe to real-time events from your monitored Twitter accounts.

Subscribe to Twitter Events

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "twitter.subscribe"
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "success": true
  }
}

Unsubscribe

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "twitter.unsubscribe"
}

Tools (15)

get_twitter_userGet user profile by username
get_twitter_user_by_idGet user profile by numeric ID
get_twitter_user_tweetsGet recent tweets from a user
search_twitterSearch tweets with basic filters
search_twitter_advancedAdvanced search with multiple filters
get_twitter_follower_eventsGet follower/unfollower events
get_twitter_deleted_tweetsGet deleted tweets from a user
get_twitter_kol_followersGet KOL (Key Opinion Leader) followers
get_twitter_article_by_idGet Twitter article by ID
get_twitter_tweet_by_idGet tweet by ID with nested reply/quote tweets
get_twitter_quote_tweets_by_idGet tweets that quote a specific tweet
get_twitter_retweet_users_by_idGet users who retweeted a specific tweet
get_twitter_watchGet all Twitter monitoring users
add_twitter_watchAdd a Twitter user to monitoring list
delete_twitter_watchDelete a Twitter user from monitoring list

Environment Variables

TWITTER_TOKENrequired6551 API Bearer Token
TWITTER_API_BASEOverride REST API URL
TWITTER_MAX_ROWSMax results per query

Configuration

claude_desktop_config.json
{"api_base_url": "https://ai.6551.io", "api_token": "<your-token>", "max_rows": 100}

Try it

Show me the recent tweets from @VitalikButerin.
Search for popular tweets about ETH that have more than 1000 likes.
Who are the KOLs that follow @elonmusk?
Check if @elonmusk has deleted any tweets recently.
Who recently unfollowed @elonmusk?

Frequently Asked Questions

What are the key features of Twitter MCP Server?

Retrieve detailed user profiles and tweet history. Perform advanced keyword and hashtag searches with engagement filters. Track follower and unfollower events for specific accounts. Monitor Key Opinion Leader (KOL) activity. Access deleted tweets and quote/retweet metadata.

What can I use Twitter MCP Server for?

Market research by analyzing sentiment and trends around specific hashtags. Tracking influencer activity and audience growth for social media management. Investigating deleted content from public figures for transparency. Monitoring real-time engagement and community reactions to specific topics.

How do I install Twitter MCP Server?

Install Twitter MCP Server by running: claude mcp add twitter -e TWITTER_TOKEN=<your-token> -- uv --directory /path/to/twitter-mcp run twitter-mcp

What MCP clients work with Twitter MCP Server?

Twitter MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Twitter MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare