Twitter MCP 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
Twitter MCP工具,使用TypeScript开发,开源MCP服务器,支持AI助手发布推文和上传图片。适合开发者和AI助手开发者。
Twitter MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Twitter MCP工具,使用TypeScript开发,开源MCP服务器,支持AI助手发布推文和上传图片。适合开发者和AI助手开发者。
Twitter MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/GenAIwithMS/twitter-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": ["-y", "twitter-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Twitter MCP 执行以下任务... Claude: [自动调用 Twitter MCP MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"twitter_mcp": {
"command": "npx",
"args": ["-y", "twitter-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
rm -rf node_modules package-lock.json
Start the setup flow with:
npx @muhammadsiddiq/twitter-mcp
The installer guides you through every question and writes the correct MCP config for the client you choose.
After the questions are answered, the installer writes the config automatically and tells you to restart the selected client.
1. Clone the repository:
git clone https://github.com/genaiwithms/twitter-mcp.git
cd twitter-mcp
2. Install dependencies:
npm install
3. Build the project:
npm run build
Create a .env file in the project root:
API_KEY=your_api_key
API_SECRET_KEY=your_api_secret
ACCESS_TOKEN=your_access_token
ACCESS_TOKEN_SECRET=your_access_token_secret
Update your Claude config to use local build:
{
"mcpServers": {
"twitter": {
"command": "node",
"args": ["${absolute_path_to_project}/build/index.js"],
"envFile": ".env"
}
}
}
6. Development commands: ```bash
npm run build
npm install
npm run build ```
Problem: MCP server not connecting to Claude.
Solutions: - Restart Claude Desktop completely - Check config file syntax is valid JSON - Verify file path in config matches actual location - Check Node.js is installed: node --version - Look for errors in Claude's logs
The easiest way to use this MCP server is through the interactive installer:
npx @muhammadsiddiq/twitter-mcp
Once configured, you can interact with Twitter through natural language commands to Claude.
The installer then asks whether you want to add optional read-only search backends for search_tweets.
If you say yes, it can collect:
These are optional. If you skip them, the server still works with the Twitter OAuth credentials.
XQUIK_API_KEY in your MCP config or shell environment.HERMES_TWEET_API_KEY instead.XQUIK_BASE_URL unset unless your team runs a compatible non-default deployment.search_tweets to verify read-only search.Keep the key out of Git, chat prompts, screenshots, and shared config files. The key only changes search_tweets; posting and replying still use the Twitter OAuth variables.
GETXAPI_API_KEY in your MCP config or shell environment.GETXAPI_BASE_URL unset unless your team runs a compatible non-default deployment.search_tweets to verify read-only search.Posting tools require Twitter OAuth credentials. search_tweets can use Twitter OAuth credentials, the optional Hermes Tweet/Xquik read-only backend, or the optional GetXAPI read-only backend.
| Variable | Description | Required |
|---|---|---|
API_KEY | Twitter API Key | For posting and Twitter API search |
API_SECRET_KEY | Twitter API Secret Key | For posting and Twitter API search |
ACCESS_TOKEN | Twitter Access Token | For posting and Twitter API search |
ACCESS_TOKEN_SECRET | Twitter Access Token Secret | For posting and Twitter API search |
XQUIK_API_KEY | Optional Hermes Tweet/Xquik key for search_tweets | No |
HERMES_TWEET_API_KEY | Optional alias for XQUIK_API_KEY | No |
XQUIK_BASE_URL | Optional Xquik base URL, defaults to https://xquik.com | No |
GETXAPI_API_KEY | Optional GetXAPI key for search_tweets | No |
GETXAPI_BASE_URL | Optional GetXAPI base URL, defaults to https://api.getxapi.com | No |
Can't find Connectors in Settings? - Make sure you're using the latest version of Claude Desktop - Try restarting the application
Path not working? - Use the full absolute path (complete path from root) - Avoid spaces in folder names, or use quotes around the path - Check that the directory actually exists on your computer
Changes not taking effect? - Make sure you completely closed Claude Desktop (check system tray/menu bar) - Wait a few seconds before reopening - Restart your computer if issues persist
twitter-mcp 是一个 MCP(Model Context Protocol)服务器,用于将 Twitter 功能集成到 Claude 中。通过该项目,开发者可以直接在 Claude 中使用自然语言命令来发布推文、搜索内容、回复推文等,实现与 Twitter 的无缝交互。项目提供了安全的 OAuth 1.0a 认证机制和完整的交互工具集。
项目主要功能包括:发布推文分享想法、支持图片上传(JPG、PNG、GIF、WEBP 格式)、搜索推文并分析内容、可选的 Xquik/Hermes Tweet 只读搜索后端、回复推文参与对话、采用 OAuth 1.0a 安全认证、内置速率限制保护。这些功能使用户能够通过 Claude 完整地管理 Twitter 账户。
系统要求包括:Node.js 18 或更高版本、npm 或 npx 包管理工具、Twitter 开发者账户及相应的 API 凭证、Claude Desktop App 应用程序。用户需要提前准备好 Twitter Developer Account 并获取必要的 API 密钥,才能正常使用该 MCP 服务器。
安装步骤简洁高效。首先删除旧依赖(rm -rf node_modules package-lock.json),然��运行安装命令 npx @muhammadsiddiq/twitter-mcp。安装程序会引导用户完成所有配置问题,自动生成正确的 MCP 配置文件,最后提示用户重启选定的客户端即可完成安装。整个过程由交互式安装程序自动化处理。
使用方式非常简便。配置完成后,用户可以通过自然语言命令与 Claude 交互来操作 Twitter。例如可以直接告诉 Claude 发布推文、搜索特定内容、回复他人推文等。最简单的方式是运行 npx @muhammadsiddiq/twitter-mcp 启动交互式安装程序,之后即可在 Claude 中无缝使用所有 Twitter 功能。
配置涉及多个环节。首先需要设置 Twitter OAuth 凭证(API_KEY、API_SECRET 等),用于发布和搜索功能。其次可选配置搜索后端:Xquik/Hermes Tweet API 密钥或 GetXAPI 密钥,这些是可选的只读搜索服务。安装程序会自动收集这些信息并生成 MCP 配置。若跳过可选后端,服务器仍可使用 Twitter OAuth 凭证正常工作。
常见问题解决方案:若在设置中找不到 Connectors,确保使用最新版本的 Claude Desktop 并尝试重启应用。若路径配置不生效,使用完整的绝对路径(从根目录开始),避免文件夹名称中含有空格,或用引号包围路径。检查目录是否存在且权限正确。这些步骤可解决大多数配置和连接问题。
Twitter MCP是一个功能齐全的MCP工具,适合开发者和AI助手开发者使用。虽然它的星数不多,但它的代码质量和功能性是值得注意的。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,Twitter MCP 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | twitter-mcp |
| 原始描述 | 开源MCP工具:MCP server for X (Twitter) that enables AI assistants to post tweets, upload ima。⭐19 · TypeScript |
| Topics | mcpanthropicclaudeclaude-desktopdeveloper-toolsgenerative-aitypescript |
| GitHub | https://github.com/GenAIwithMS/twitter-mcp |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-06-03 · 更新时间:2026-06-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端