X Tools For Claude
STDIOLightweight toolkit enabling Claude to search Twitter efficiently with natural language display.
Lightweight toolkit enabling Claude to search Twitter efficiently with natural language display.
A lightweight, open-source toolkit that enables Claude to search Twitter efficiently with natural language and display results based on user intent. Designed for both raw data viewing and optional analysis.
Clone this repository:
git clone https://github.com/0xGval/twitter-X-mcp-server cd twitter-X-mcp-tools
Install dependencies:
npm install
Create your configuration:
mcp.json.example
to mcp.json
in your Claude Desktop directorymcp.json
to include your RapidAPI key and correct file paths{ "mcpServers": { "x-tools": { "command": "node", "args": ["YOUR_ABSOLUTE_PATH_TO/main.js"], "env": { "RAPIDAPI_KEY": "your_rapidapi_key" } } } }
Configure Claude for Desktop:
mcp.json
file in %APPDATA%\Claude\
mcp.json
file in ~/Library/Application Support/Claude/
claude-rules.md
and knowledge/TwitterSearchSyntaxGuide.txt
to your Claude knowledge base directoryThe tool is primarily designed to be used with natural language. Simply ask Claude to search for something on Twitter, and it will interpret your request.
searchTwitter(query: "keyword", section: "latest", limit: 20)
Search Twitter using natural language or advanced syntax:
query
: Search query (supports Twitter's advanced search operators)section
: "latest" or "top" results (default: "latest")limit
: Number of tweets to return (default: 20)Ask Claude:
Show me recent tweets about artificial intelligence
Ask Claude:
Find the latest tweets from Elon Musk that mention SpaceX
Ask Claude:
Search for tweets about climate change with at least 100 likes from the past month
Ask Claude:
What's the sentiment around the new Bitcoin ETF based on recent tweets?
For those who prefer direct syntax:
from:elonmusk spacex since:2023-01-01
"artificial intelligence" filter:images min_faves:100
climate action min_retweets:50 -filter:retweets
This tool includes several important files that must be properly set up:
Make sure all these files are placed in the correct locations in your Claude setup.
The tool supports all standard Twitter search operators, which Claude can apply from your natural language:
from:username
- Tweets sent by a specific accountto:username
- Replies to a specific account@username
- Tweets mentioning the accountfilter:media
- Tweets with any mediafilter:images
- Tweets with imagesfilter:native_video
- Tweets with videosfilter:links
- Tweets with linkssince:YYYY-MM-DD
- Tweets after this dateuntil:YYYY-MM-DD
- Tweets before this datemin_retweets:n
- Tweets with at least n retweetsmin_faves:n
- Tweets with at least n likesmin_replies:n
- Tweets with at least n repliesCommon issues:
mcp.json
\\
)claude-rules.md
that includes the flexible output instructionsclaude-rules.md
and TwitterSearchSyntaxGuide.txt
are properly added to your Claude rules and knowledge baseTo modify the tool:
tools/
directoryformatTwitterResults()
function if neededThis project is licensed under the MIT License.
Note: This tool is designed to work with the Claude AI assistant and provide Twitter search results with flexible display options based on user intent.