twitter-mcp
by Dishant27·★ 3·综合分 30
MCP 服务器实现 X (Twitter) 集成,通过 API 执行 CRUD 操作。
概述
这个 MCP 服务器通过模型上下文协议 (Model Context Protocol) 提供与 X (前 Twitter) 的全面交互功能。它允许通过 Twitter API 发布推文、搜索内容、管理资料和组织列表。服务器提供多种账户管理工具,包括关注/取消关注用户、获取关注者列表和更新个人资料信息。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要通过 MCP 界面执行基本的 Twitter/X 操作(如发布、搜索和账户管理)时,选择此服务器。
什么时候不要选它
如果您需要高级 Twitter 功能(如分析)、此处未涵盖的 API v2 端点,或者需要企业级访问控制,请不要选择此服务器。
此 server 暴露的工具
从 README 抽取出 11 个工具post_tweetPost new content to X
search_tweetsSearch for content on X
get_profileGet profile information for a user or the authenticated account
update_profileUpdate the authenticated user's profile
follow_userFollow a user
unfollow_userUnfollow a user
list_followersList followers of a user or the authenticated account
list_followingList accounts that a user or the authenticated account is following
create_listCreate a new list
get_list_infoGet information about a list
get_user_listsGet all lists owned by the authenticated user
可对比工具
安装
安装步骤
- 创建 X 开发者账户并从 [X 开发者门户](https://developer.twitter.com/en/portal/dashboard) 获取 API 密钥
- 设置所需的环境变量:
``bash TWITTER_API_KEY=your_api_key TWITTER_API_SECRET=your_api_secret TWITTER_ACCESS_TOKEN=your_access_token TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret ``
- 克隆并安装:
``bash git clone https://github.com/Dishant27/twitter-mcp.git cd twitter-mcp npm install npm start ``
Claude Desktop 配置
添加到您的 Claude MCP 配置文件:
{
"name": "x",
"display_name": "X",
"description": "X MCP 允许 Claude 与 X (前 Twitter) 交互",
"path": "path/to/twitter-mcp/dist/index.js",
"startup": {
"env": {
"TWITTER_API_KEY": "your_api_key",
"TWITTER_API_SECRET": "your_api_secret",
"TWITTER_ACCESS_TOKEN": "your_access_token",
"TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}
},
"transport": "stdio"
}FAQ
- 这个服务器是否支持 Twitter API v2?
- 是的,该服务器同时支持 Twitter API v1 和 v2,以实现完整功能。
- 是否有使用限制?
- 是的,该服务器受 Twitter 标准 API 速率限制的约束,具体限制因使用的端点而异。
twitter-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。