X MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@X MCP Server post a tweet saying Hello World"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
X MCP Server
This tool is an MCP server for interacting with the X platform via an MCP client such as Claude, Cursor AI, Windsurf AI, etc.
Prerequisites
Node.js (>=18.0.0)
npm (>=8.0.0)
X Developer API keys
Related MCP server: X API FastMCP Server
Important Notes regarding to the rate limits of the X APIs
There is a rate limit on the number of requests per minute for the X APIs, which is set by the X platform.
You can refer to this page for knowing the limits: https://developer.x.com/en/portal/products
Getting Started
Clone this repository:
git clone <repository-url>Install the dependencies:
npm installBuild the project:
npm run buildThis will compile the
index.tsfile in thesrcfolder and create thebuilddirectory.
Configuration
You will need your X Developer API keys to use this tool. You will need these 4 keys/tokens:
X API Key
X API Key Secret
X Access Token
X Access Token Secret
In case you are not aware of how to get these keys/tokens, you can follow the instructions on the X Developer website: https://developer.twitter.com/en/docs/twitter-api/getting-started/getting-access-to-the-twitter-api
Set the environment variables: You will have to setup the MCP server for your client.
For Claude:
Open Claude Desktop
Go to Settings -> Developer
Here you will see an option to configure MCP servers by clicking on it (Edit Config)
Claude will open the folder containing the config file. Open the config file which is named
claude_desktop_config.json.Add the following configuration:
{ "x-mcp-server": { "command": "node", "args": [ "/ABSOLUTE/PATH/TO/PARENT/FOLDER/x-mcp-server/build/index.js" ], "env": { "X_API_KEY": "your-x-api-key", "X_API_KEY_SECRET": "your-x-api-key-secret", "X_ACCESS_TOKEN": "your-x-access-token", "X_ACCESS_TOKEN_SECRET": "your-x-access-token-secret" } } }Save the config file.
Restart Claude Desktop.
You can refer the official Anthropic documentation for setting up an MCP server https://modelcontextprotocol.io/quickstart/server
For Cursor AI:
You can follow the instructions in the Cursor documentation: https://docs.cursor.com/context/model-context-protocol
For Windsurf AI:
Open a new chat in Cascade.
You should see a Configure MCP button below the Cascade's prompt input. Click on it.
It will open the config file in the editor and you can add the following configuration:
{ "mcpServers": { "x-mcp-server": { "command": "node", "args": [ "/ABSOLUTE/PATH/TO/PARENT/FOLDER/x-mcp-server/build/index.js" ], "env": { "X_API_KEY": "your-x-api-key", "X_API_KEY_SECRET": "your-x-api-key-secret", "X_ACCESS_TOKEN": "your-x-access-token", "X_ACCESS_TOKEN_SECRET": "your-x-access-token-secret" } } } }Save file and click on the Refresh servers button below the Cascade's prompt input.
For other MCP clients:
You can refer to the official MCP documentation: https://modelcontextprotocol.io/introduction
Now you can connect to this MCP server locally using your preferred MCP client and interact with the X platform.
Available Tools
20 toolsadd-delete-bookmarkB
Add or delete a bookmark for a specific tweet
Inputs: tweetId (required), isAddBookmark (required).
advanced-tweetA
Post a tweet with advanced options like reply to a tweet, quote a specific tweet, or create a poll for the tweet,
Inputs: text (required), poll, quote, reply_to.
get-communityB
Get details for a specific X community
Inputs: communityId (required).
get-home-timelineC
Get tweets from your home timeline
Inputs: maxResults, excludeReplies, excludeRetweets.
get-my-detailsB
Get my X account details
Inputs: no named parameters.
get-quoted-tweetsB
Get tweets that quote a specific tweet
Inputs: tweetId (required), maxResults.
get-tweetsC
Get one or more tweets by their IDs
Inputs: tweetIds (required).
get-user-by-usernameC
Get details for a specific X user by username
Inputs: username (required).
get-user-detailsB
Get details for a specific X user by ID
Inputs: userId (required).
get-user-followersB
Get followers of a specific X user
Inputs: userId (required), maxResults.
get-user-followingC
Get accounts that a specific X user is following
Inputs: userId (required), maxResults.
get-user-timelineB
Get tweets from a specific user's timeline
Inputs: userId (required), maxResults, excludeReplies, excludeRetweets.
like-tweetC
Like a specific tweet
Inputs: userId (required), tweetId (required).
post-tweetC
Post a tweet with the specified content
Inputs: content (required).
quote-a-tweetC
Quote a specific tweet
Inputs: text (required), tweetId (required).
retweetC
Retweet a specific tweet
Inputs: userId (required), tweetId (required).
search-communitiesC
Search for X communities by keyword
Inputs: query (required), maxResults.
tweet-threadC
Post a thread of tweets
Inputs: tweets (required).
unlike-tweetC
Unlike a specific tweet
Inputs: userId (required), tweetId (required).
unretweetA
Remove a retweet from a specific tweet
Inputs: userId (required), tweetId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct action or resource. Overlap is minimal; for example, post-tweet and advanced-tweet are differentiated by advanced options. All tools have clear boundaries.
Most tools follow a verb_noun pattern with hyphens, but there are inconsistencies: 'retweet' and 'unretweet' omit hyphens? Actually they do have hyphens. However 'add-delete-bookmark' uses two verbs, 'advanced-tweet' is adjective-noun, and 'quote-a-tweet' includes 'a'. Slight deviations from the dominant pattern.
20 tools cover the core functionality of an X client: user actions, tweet CRUD, bookmarks, timelines, and communities. This is well-scoped for a single-purpose server.
Covers most common actions but misses important ones like deleting a tweet, following/unfollowing users, and searching tweets. These gaps could cause agent failures for basic workflows.
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
Hosted MCP server from TwitterAPI.io that gives AI agents read-only access to Twitter/X data. 12 tools: tweet search with X operators, user profiles, a user's latest tweets, followers and followings, replies, quotes, retweeters, mentions and trends. Connect at https://mcp.twitterapi.io/mcp with a TwitterAPI.io API key or account sign-in; usage is paid per result returned.
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with the Twitter/X API v2, enabling AI assistants to retrieve tweets, post content, reply, quote, and more programmatically.2,530 npm13MIT

X API FastMCP Serverofficial
FlicenseNot gradedqualityDmaintenanceA local MCP server that exposes the X API (formerly Twitter API) as tools, enabling operations like posting, searching, user management, and more via natural language commands.868-- AlicenseAqualityCmaintenanceMCP server for Twitter/X enabling AI agents to search, post, reply, and engage with tweets.1415 npm2MIT
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X API, enabling search, user profiles, tweets, followers, and more via natural language.941,114 npm6MIT