Twitter MCP Server logo

Twitter MCP Server

OrganizationPopular
6551Team

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

Publisher6551Team
Repositoryopentwitter-mcp
LanguagePython
Forks
103
Stars
1.4K
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Twitter MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    1.4K stars and 103 forks from the linked repository.


Quick Install

First, go to http://app.newsliquid.com/mcp to get your API Token.

Claude Code

bash
claude mcp add twitter \
  -e OPENNEWS_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

bash
export OPENNEWS_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 <project-path> and <your-token> with actual values):

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

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 http://app.newsliquid.com/mcp):
   claude mcp add twitter -e OPENNEWS_TOKEN=<your-token> -- uv --directory <project-path> run twitter-mcp

What Can It Do?

Once connected, just ask your AI assistant:

You sayIt 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
"Monitor @elonmusk with follower tracking and a custom note"Add user to watch list with options
"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
"Show the thesis and callout evidence for this meme token"Get token evidence from fomo/pump feeds
"Show the later statements and buys/sells for this token"Get meme activity and trade evidence

Available Tools

ToolDescription
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 query and 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_meme_token_evidenceGet thesis and callout evidence for a meme token
get_meme_activityGet meme token statements and buy/sell evidence
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 (with event type options, remark, and optional group_name)
delete_twitter_watchDelete a Twitter user from monitoring list

Configuration

Get API Token

Go to http://app.newsliquid.com/mcp to get your API Token.

Set the environment variable:

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

# Windows PowerShell
$env:OPENNEWS_TOKEN = "<your-token>"
VariableRequiredDescription
OPENNEWS_TOKENYes6551 API Bearer Token (get from http://app.newsliquid.com/mcp)
TWITTER_API_BASENoOverride REST API URL
TWITTER_MAX_ROWSNoMax results per query (default: 100)

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

json
{
  "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.

Heartbeat

To keep the connection alive, the client can send ping, and the server responds with pong.

Subscribe to Twitter Events

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

Response:

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

Unsubscribe

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

Server Push - Twitter Event

When a monitored account has activity, the server pushes:

json
{
  "jsonrpc": "2.0",
  "method": "twitter.event",
  "params": {
    "id": 123456,
    "twAccount": "elonmusk",
    "twUserName": "Elon Musk",
    "profileUrl": "https://twitter.com/elonmusk",
    "eventType": "NEW_TWEET",
    "content": "...",
    "ca": "0x1234...",
    "remark": "Custom note",
    "createdAt": "2026-03-06T10:00:00Z"
  }
}

Note: The content field structure varies by event type (see below).


**Event Types and Content Structure**:

#### Tweet Events
- `NEW_TWEET` - New tweet posted
- `NEW_TWEET_REPLY` - New reply tweet
- `NEW_TWEET_QUOTE` - New quote tweet
- `NEW_RETWEET` - Retweeted
- `CA` - Tweet with CA address

Content structure for tweet events:
```json
{
  "id": "1234567890",
  "text": "Tweet content...",
  "createdAt": "2026-03-06T10: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://...",
      "expandedUrl": "https://...",
      "displayUrl": "example.com"
    }
  ],
  "mentions": [
    {
      "username": "VitalikButerin",
      "name": "Vitalik Buterin"
    }
  ]
}

Follower Events

  • NEW_FOLLOWER - This account followed a user
  • NEW_UNFOLLOWER - This account unfollowed a user

Content structure for follower events (array):

json
[
  {
    "id": 123,
    "twId": 44196397,
    "twAccount": "elonmusk",
    "twUserName": "Elon Musk",
    "twUserLabel": "Verified",
    "description": "User bio...",
    "profileUrl": "https://...",
    "bannerUrl": "https://...",
    "followerCount": 170000000,
    "friendCount": 500,
    "createdAt": "2026-03-06T10:00:00Z"
  }
]

Profile Update Events

  • UPDATE_NAME - Username changed (content: new name string)
  • UPDATE_DESCRIPTION - Bio updated (content: new description string)
  • UPDATE_AVATAR - Profile picture changed (content: new avatar URL string)
  • UPDATE_BANNER - Banner image changed (content: new banner URL string)

Other Events

  • TWEET_TOPPING - Tweet pinned
  • DELETE - Tweet deleted
  • SYSTEM - System event
  • TRANSLATE - Tweet translation
  • CA_CREATE - CA token created

Data Structures

Twitter User

json
{
  "userId": "44196397",
  "screenName": "elonmusk",
  "name": "Elon Musk",
  "description": "...",
  "followersCount": 170000000,
  "friendsCount": 500,
  "statusesCount": 30000,
  "verified": true
}

Tweet

json
{
  "id": "1234567890",
  "text": "Tweet content...",
  "createdAt": "2024-02-20T12:00:00Z",
  "retweetCount": 1000,
  "favoriteCount": 5000,
  "replyCount": 200,
  "userScreenName": "elonmusk",
  "hashtags": ["crypto", "bitcoin"],
  "urls": [{"url": "https://..."}]
}

Meme Feed Item

Meme evidence tools return fomo/pump feed data, including platform, kind, author, text, createdAt, and (for trades) a trade object. Use get_meme_token_evidence for the initial thesis/callout view and get_meme_activity for later statements and buy/sell evidence.


In all configs below, replace /path/to/twitter-mcp with your actual local project path, and <your-token> with your Token from http://app.newsliquid.com/mcp.

Claude Desktop

Edit config (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

json
{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json or Settings > MCP Servers:

json
{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Cline

VS Code sidebar > Cline > MCP Servers > Configure, edit cline_mcp_settings.json:

json
{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Continue.dev

~/.continue/config.yaml:

yaml
mcpServers:
  - name: twitter
    command: uv
    args:
      - --directory
      - /path/to/twitter-mcp
      - run
      - twitter-mcp
    env:
      OPENNEWS_TOKEN: <your-token>

Cherry Studio

Settings > MCP Servers > Add > Type stdio: Command uv, Args --directory /path/to/twitter-mcp run twitter-mcp, Env OPENNEWS_TOKEN.

Zed Editor

~/.config/zed/settings.json:

json
{
  "context_servers": {
    "twitter": {
      "command": {
        "path": "uv",
        "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
        "env": {
          "OPENNEWS_TOKEN": "<your-token>"
        }
      }
    }
  }
}

Any stdio MCP client

bash
OPENNEWS_TOKEN=<your-token> \
  uv --directory /path/to/twitter-mcp run twitter-mcp

Compatibility

ClientInstall MethodStatus
Claude Codeclaude mcp addOne-liner
OpenClawCopy skill directoryOne-liner
Claude DesktopJSON configSupported
CursorJSON configSupported
WindsurfJSON configSupported
ClineJSON configSupported
Continue.devYAML / JSONSupported
Cherry StudioGUISupported
ZedJSON configSupported

Development

bash
cd /path/to/twitter-mcp
uv sync
uv run twitter-mcp
bash
# MCP Inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/twitter-mcp run twitter-mcp

Project Structure

├── README.md
├── docs/
│   ├── README_JA.md           # 日本語
│   └── README_KO.md           # 한국어
├── openclaw-skill/opentwitter/    # OpenClaw Skill
├── pyproject.toml
├── config.json
└── src/twitter_mcp/
    ├── server.py              # Entry point
    ├── app.py                 # FastMCP instance
    ├── config.py              # Config loader
    ├── api_client.py          # HTTP client
    └── tools.py               # 8 tools

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "opentwitter-mcp": {
      "command": "claude",
      "args": [
        "mcp",
        "add",
        "twitter",
        "-e",
        "TWITTER_TOKEN={{config.TWITTER_TOKEN}}",
        "--",
        "uv",
        "--directory",
        "/path/to/twitter-mcp",
        "run",
        "twitter-mcp"
      ],
      "env": {
        "TWITTER_TOKEN": "<TWITTER_TOKEN>"
      }
    }
  }
}

Use Twitter MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Twitter MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Twitter MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Twitter MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "opentwitter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Twitter MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Twitter MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Twitter MCP Server to help me with this task?
Twitter MCP Server
Sure. I read it.
Here is what I found using Twitter MCP Server.

Option 2: Add an MCP server URL

Use this when Twitter MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Twitter MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Twitter MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Twitter MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Twitter MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Twitter MCP Server to help me with this task?
Twitter MCP Server
Sure. I read it.
Here is what I found using Twitter MCP Server.

Frequently asked questions

What is the Twitter MCP Server MCP server used for?

Twitter MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Twitter MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Twitter MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Twitter MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Twitter MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Twitter MCP Server MCP to TypingMind?

Twitter MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Twitter MCP Server MCP provide in TypingMind?

Twitter MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Twitter MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Twitter MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇