Twitter

by 0xhijo

6 stars
488 downloads
Not rated
GitHub

About

Integrates with Twitter/X to enable direct actions like posting, replying, following users, and retrieving profile data through a Node.js server with dual authentication options.

Details

Author
0xhijo
Repository
0xhijo/mcp_twitter
GitHub stars
6
Downloads
488
License
MIT License
Categories
Developer Tools, Design, File Management, AI, Community, Media, Automation, Infrastructure, Frontend
Tags
#integration

This MCP server provides the following actions:

- create_twitter_post: Create a new X/Twitter post
- reply_twitter_tweet: Reply to a specific X/Twitter post by ID
- get_last_tweet: Get the most recent post from a specified X/Twitter account
- get_last_tweets_options: Get a specified number of posts matching a search query
- create_and_post_twitter_thread: Create and publish an X/Twitter thread
- follow_twitter_from_username: Follow an X/Twitter user by username
- get_twitter_profile_from_username: Get complete X/Twitter profile data by username
- get_twitter_user_id_from_username: Get X/Twitter user ID from username
- get_last_tweet_and_replies_from_user: Get recent X/Twitter posts and replies from a user
- get_last_tweet_from_user: Get recent X/Twitter posts from a user
- get_own_twitter_account_info: Get current account profile data

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Twitter
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 mcp_twitter
    Environment
    • TWITTER_EMAIL YOUR_TWITTER_EMAIL
    • TWITTER_PASSWORD YOUR_TWITTER_PASSWORD
    • TWITTER_USERNAME YOUR_TWITTER_USERNAME
    • TWITTER_AUTH_MODE CREDENTIALS

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


pnpm build

bash
npx mcp_twitter

1. Configure the .env file:

sh
TWITTER_AUTH_MODE = "CREDENTIALS" # Credentials mode

1. Create a Developer Account:

Make sure you have a Twitter account
Visit the Developer Platform
Get your API credentials
Follow this guide if you need help creating your developer account

2. Configure the .env file

TWITTER_AUTH_MODE = "API" # API mode

Add the following entry to your claude_mcp_config.json file:

json
"mcp_twitter": {
"command": "npx",
"args": ["mcp_twitter"],
"env": {
"TWITTER_AUTH_MODE": "CREDENTIALS",
"TWITTER_USERNAME": "YOUR_TWITTER_USERNAME",
"TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD",
"TWITTER_EMAIL": "YOUR_TWITTER_EMAIL"
}
}
```
Replace the placeholder credentials with your actual Twitter account information. This configuration will launch the MCP Twitter server using npx when Claude needs to interact with Twitter.

Once configured, Claude will be able to use all the Twitter functionalities provided by the MCP server, such as creating posts, retrieving tweets, and more. You can simply ask Claude to perform Twitter actions, and it will utilize the MCP server to execute them.

create_twitter_post

Create a new X/Twitter post.

reply_twitter_tweet

Reply to a specific X/Twitter post by ID.

get_last_tweet

Get the most recent post from a specified X/Twitter account.

get_last_tweets_options

Get a specified number of posts matching a search query.

create_and_post_twitter_thread

Create and publish an X/Twitter thread.

follow_twitter_from_username

Follow an X/Twitter user by username.

get_twitter_profile_from_username

Get complete X/Twitter profile data by username.

get_twitter_user_id_from_username

Get X/Twitter user ID from username.

get_last_tweet_and_replies_from_user

Get recent X/Twitter posts and replies from a user.

get_last_tweet_from_user

Get recent X/Twitter posts from a user.

get_own_twitter_account_info

Get current account profile data.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "twitter": {
            "env": {
                "TWITTER_EMAIL": "YOUR_TWITTER_EMAIL",
                "TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD",
                "TWITTER_USERNAME": "YOUR_TWITTER_USERNAME",
                "TWITTER_AUTH_MODE": "CREDENTIALS"
            },
            "args": [
                "mcp_twitter"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": {
        "TWITTER_EMAIL": "YOUR_TWITTER_EMAIL",
        "TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD",
        "TWITTER_USERNAME": "YOUR_TWITTER_USERNAME",
        "TWITTER_AUTH_MODE": "CREDENTIALS"
    },
    "args": [
        "mcp_twitter"
    ],
    "command": "npx"
}

Macos

{
    "env": {
        "TWITTER_EMAIL": "YOUR_TWITTER_EMAIL",
        "TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD",
        "TWITTER_USERNAME": "YOUR_TWITTER_USERNAME",
        "TWITTER_AUTH_MODE": "CREDENTIALS"
    },
    "args": [
        "mcp_twitter"
    ],
    "command": "npx"
}

Windows

{
    "env": {
        "TWITTER_EMAIL": "YOUR_TWITTER_EMAIL",
        "TWITTER_PASSWORD": "YOUR_TWITTER_PASSWORD",
        "TWITTER_USERNAME": "YOUR_TWITTER_USERNAME",
        "TWITTER_AUTH_MODE": "CREDENTIALS"
    },
    "args": [
        "/c",
        "npx",
        "mcp_twitter"
    ],
    "command": "cmd"
}

MCP Twitter

Description

MCP Twitter is a server based on the Model Context Protocol that allows direct interaction with Twitter/X. It exposes various Twitter API functionalities through a standardized set of tools, enabling AI models and applications to perform actions on Twitter.

Features

This MCP server provides the following actions:

- create_twitter_post: Create a new X/Twitter post
- reply_twitter_tweet: Reply to a specific X/Twitter post by ID
- get_last_tweet: Get the most recent post from a specified X/Twitter account
- get_last_tweets_options: Get a specified number of posts matching a search query
- create_and_post_twitter_thread: Create and publish an X/Twitter thread
- follow_twitter_from_username: Follow an X/Twitter user by username
- get_twitter_profile_from_username: Get complete X/Twitter profile data by username
- get_twitter_user_id_from_username: Get X/Twitter user ID from username
- get_last_tweet_and_replies_from_user: Get recent X/Twitter posts and replies from a user
- get_last_tweet_from_user: Get recent X/Twitter posts from a user
- get_own_twitter_account_info: Get current account profile data

Installation and Usage

Local Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.