MCP Twitter
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Supports configuration through environment variables stored in a .env file, allowing users to securely provide Twitter authentication credentials.
Enables installation via cloning the GitHub repository, with the source code hosted at github.com/0xhijo/mcp_twitter.
Provides installation and execution through NPX, allowing users to run the server without explicit installation.
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 postreply_twitter_tweet
: Reply to a specific X/Twitter post by IDget_last_tweet
: Get the most recent post from a specified X/Twitter accountget_last_tweets_options
: Get a specified number of posts matching a search querycreate_and_post_twitter_thread
: Create and publish an X/Twitter threadfollow_twitter_from_username
: Follow an X/Twitter user by usernameget_twitter_profile_from_username
: Get complete X/Twitter profile data by usernameget_twitter_user_id_from_username
: Get X/Twitter user ID from usernameget_last_tweet_and_replies_from_user
: Get recent X/Twitter posts and replies from a userget_last_tweet_from_user
: Get recent X/Twitter posts from a userget_own_twitter_account_info
: Get current account profile data
Installation and Usage
Local Installation
Installation via NPX
Configuration
Configuration via Twitter Scraper
- Configure the .env file:
You need to configure Twitter authentication by creating a .env
file or directly adding the variables to your environment.
Configuration via Twitter API
- 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
- Configure the .env file
Integrating with Claude
To use MCP Twitter with Claude, you need to add it to your claude_mcp_config.json
file. This will allow Claude to interact with Twitter through the MCP server.
Adding to Claude's MCP Configuration
Add the following entry to your claude_mcp_config.json
file:
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.
Usage with Claude
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.
Important Notes
- Choose the authentication mode (API or CREDENTIALS) based on your needs
- Verify that your credentials are properly configured in the .env file
- Check the official documentation for more details about API limitations
This server cannot be installed
A Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.