X
- javascript
6
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"infatoshi-x-mcp": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/x-mcp/dist/index.js"
],
"env": {
"X_API_KEY": "your_consumer_key",
"X_API_SECRET": "your_secret_key",
"X_ACCESS_TOKEN": "your_access_token",
"X_BEARER_TOKEN": "your_bearer_token",
"X_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}
}
}
}You can empower AI agents to interact with the X social platform by running a dedicated MCP server that exposes X’s posting, reading, and engagement actions through natural language. This server enables you to post tweets, read timelines, search content, manage followers, and handle media, all via MCP-compatible clients.
How to use
Connect to the MCP server from your chosen client and start issuing natural language instructions that map to X API actions. You can post tweets, search for content, read timelines and mentions, like or retweet posts, and upload media. The server supports both direct URL-based inputs (tweet URLs or IDs) and plain IDs, making it easy to reference specific tweets.
How to install
Prerequisites: you need Node.js installed on your system. You will clone the project, install dependencies, and build the server before running it.
Additional setup and configuration
Configure your X API credentials to authorize actions like posting and liking. You will set five credentials: Consumer Key, Consumer Secret, Bearer Token, Access Token, and Access Token Secret. Place these values in an environment file that the MCP server will read when starting.
Troubleshooting
If you encounter permission or authentication errors, verify that your App permissions include Read and Write, then regenerate Access Tokens if needed. For rate limit or unauthorized errors, ensure credentials are correct and review any authorization scopes. If the server reports a misconfiguration, restart with the correct environment variables loaded.
Rate limiting and pagination
The MCP server provides rate limit information with each response, including remaining requests, total limit, and reset time. When you hit a limit, you will receive a clear error with the exact reset timestamp. Paging endpoints return a next_token to retrieve the next page of results for search, timelines, mentions, and follower lists.
Search query syntax
Your search tool supports X’s full query language, including from:, to:, hashtags, exact phrases, content-type filters, and language constraints. You can combine terms with AND or OR to refine results.
License
MIT license.
Available tools
post_tweet
Post a new tweet to X with optional text and media.
reply_to_tweet
Reply to a specific tweet by ID or URL.
quote_tweet
Quote a tweet with your own comment.
delete_tweet
Delete a previously posted tweet by ID.
get_tweet
Retrieve a tweet by ID or URL.
search_tweets
Search tweets using X’s query syntax and filters.
get_timeline
Fetch the authenticated user’s home timeline.
get_mentions
Retrieve tweets that mention the authenticated user.
get_user
Look up user details by username or user ID.
get_followers
List users who follow a given account.
get_following
List accounts followed by a given user.
like_tweet
Like a specified tweet.
retweet
Retweet a specified tweet.
upload_media
Upload media (images/videos) for posting.
get_metrics
Retrieve basic engagement metrics for your posts.