This tool is an MCP server for interacting with the X platform via an MCP client such as Claude, Cursor AI, Windsurf AI, etc.
Clone this repository:
git clone <repository-url>
Install the dependencies:
npm install
Build the project:
npm run build
This will compile the index.ts
file in the src
folder and create the build
directory.
You will need your X Developer API keys to use this tool. You will need these 4 keys/tokens:
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:
claude_desktop_config.json
.{
"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"
}
}
}
For Cursor AI:
For Windsurf AI:
{
"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"
}
}
}
}
For other MCP clients:
Now you can connect to this MCP server locally using your preferred MCP client and interact with the X platform.
Seamless access to top MCP servers powering the future of AI integration.