
Claude MCP 的 X 工具:一套轻量级工具包,使 Claude 能够用自然语言搜索 Twitter,并根据用户意图显示结果。获取原始推文数据或 AI 分析——由你选择。
概览
一个轻量级、开源工具包,使 Claude 能够用自然语言高效搜索 Twitter,并根据用户意图显示结果。设计用于原始数据查看和可选分析。 - : 让Claude用通俗英语搜索推特 - : 使用自然语言或高级推文语法搜索推文 - : 干净、按 markdown 格式显示推文 - : 显示原始推文或根据你的需求添加分析 - : 按关键词、用户、日期、互动指标等查找推文 - : 必要时每次搜索检索超过默认的 20 条推文 - Node.js v16+ - Claude for Desktop - 免费的 RapidAPI 密钥,可访问“The Old Bird API”(Twitter154)端点 1. 访问 RapidAPI 上的 The Old Bird API 2.如果还没有 RapidAPI 账户,请注册 3.订阅 API(有免费套餐可选) 4.订阅后,从仪表盘复制你的 RapidAPI 密钥 3. : - 将mcp.json.example复制到你的Claude桌面目录中mcp.json - 编辑mcp。
概述(AI 翻译)
一个轻量级、开源工具包,使 Claude 能够用自然语言高效搜索 Twitter,并根据用户意图显示结果。设计用于原始数据查看和可选分析。
特色
- 自然语言搜索:让Claude用通俗英语搜索Twitter。
- Twitter 搜索:使用自然语言或高级 Twitter 语法搜索推文
- 专业格式化:干净、按折扣格式显示推文
- 灵活输出:显示原始推文或根据您的需求添加分析
- 高级筛选:按关键词、用户、日期、互动指标等查找推文
- 分页支持:必要时每次搜索检索超过默认的20条推文
安装
先决条件
- Node.js v16+
- 桌面版 Claude
- 免费的 RapidAPI 密钥,可访问“The Old Bird API”(Twitter154)端点
RapidAPI 密钥设置
- 访问RapidAPI上的老鸟 API
- 如果你还没有RapidAPI账户,请注册
- 订阅API(有免费套餐)
- 订阅后,从仪表盘复制你的 RapidAPI 密钥
设置步骤
-
克隆此仓库:
-
安装依赖项:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
X Tools for Claude MCP
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.
Features
- Natural Language Search: Ask Claude to search Twitter in plain English
- Twitter Search: Search tweets using natural language or advanced Twitter syntax
- Professional Formatting: Clean, markdown-formatted tweet display
- Flexible Output: Display raw tweets or add analysis based on what you ask for
- Advanced Filtering: Find tweets by keywords, users, dates, engagement metrics, and more
- Pagination Support: Retrieve more than the default 20 tweets per search when needed
Installation
Prerequisites
- Node.js v16+
- Claude for Desktop
- Free RapidAPI key with access to the “The Old Bird API” (Twitter154) endpoint
RapidAPI Key Setup
- Visit The Old Bird API on RapidAPI
- Sign up for a RapidAPI account if you don’t have one
- Subscribe to the API (there is a free tier available)
- Once subscribed, copy your RapidAPI key from your dashboard
Setup Steps
-
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:
- Copy
mcp.json.exampletomcp.jsonin your Claude Desktop directory - Edit
mcp.jsonto 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" } } } } - Copy
-
Configure Claude for Desktop:
- On Windows: Place your
mcp.jsonfile in%APPDATA%\Claude\ - On macOS: Place your
mcp.jsonfile in~/Library/Application Support/Claude/ - Copy
claude-rules.mdandknowledge/TwitterSearchSyntaxGuide.txtto your Claude knowledge base directory - Restart Claude Desktop for the changes to take effect
- On Windows: Place your
Available Tools
Twitter Search
The 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)
Natural Language Examples
Simple Query
Ask Claude:
Show me recent tweets about artificial intelligence
User-Focused Query
Ask Claude:
Find the latest tweets from Elon Musk that mention SpaceX
Complex Natural Query
Ask Claude:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"x-tools": {
"command": "node",
"args": ["YOUR_ABSOLUTE_PATH_TO/main.js"],
"env": {
"RAPIDAPI_KEY": "your_rapidapi_key"
}
}
}
}