X(Twitter)MCP 服务器
该 MCP 服务器允许客户端与 X(以前称为 Twitter)进行交互,从而实现包括发布推文、搜索内容、管理帐户和组织列表在内的综合平台操作。
快速入门
创建 X 开发者帐户并从X 开发者门户获取 API 密钥
在环境变量中设置所有必需的 API 密钥
克隆此存储库:
git clone https://github.com/Dishant27/twitter-mcp.git安装依赖项:
npm install运行服务器:
使用环境变量:
使用
.env文件:
与 MCP 客户端(例如 Claude)一起使用。
克劳德配置
要将此服务器与 Claude 一起使用,您需要设置 MCP 配置。以下是配置结构的示例:
将此配置保存在您的 Claude MCP 配置目录中,通常位于:
Windows:
%APPDATA%\AnthropicClaude\mcp-serversmacOS:
~/Library/Application Support/AnthropicClaude/mcp-serversLinux:
~/.config/AnthropicClaude/mcp-servers
特征
后期操作
帖子内容(最多 280 个字符)
按查询搜索帖子,可自定义结果计数
账户管理
获取任何用户或经过身份验证的帐户的个人资料信息
更新个人资料详细信息(姓名、简历、位置、网站网址)
关注和取消关注用户
列出任何用户或经过身份验证的帐户的关注者
列出用户关注的帐户
列表管理
创建新列表(公共或私人)
获取有关特定列表的信息
检索经过身份验证的用户拥有的所有列表
可用的 MCP 工具
工具名称 | 描述 |
| 将新内容发布到 X |
| 在 X 上搜索内容 |
| 获取用户或经过身份验证的帐户的个人资料信息 |
| 更新已验证用户的个人资料 |
| 关注用户 |
| 取消关注用户 |
| 列出用户或已验证帐户的关注者 |
| 列出用户或经过身份验证的帐户正在关注的帐户 |
| 创建新列表 |
| 获取有关列表的信息 |
| 获取已验证用户拥有的所有列表 |
要求
Node.js 18.x 或更高版本
X 带有 API 密钥的开发者帐户
API v1 和 v2 访问
环境变量
多变的 | 描述 |
| 您的 API 密钥 |
| 您的 API 秘密 |
| 您的访问令牌 |
| 您的访问令牌秘密 |
存储库结构
执照
麻省理工学院
This server cannot be installed
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityServer for X (Twitter) integration that provides tools for reading your timeline and engaging with tweets. Designed for use with Claude desktop.Last updated -1242MIT License
- AsecurityAlicenseAqualityEnables interaction with Twitter through a Model Context Protocol, allowing large language models to post tweets, search for tweets, and reply to tweets.Last updated -53122MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.Last updated -611MIT License
- -securityFlicense-qualityEnables complete management of X (Twitter) accounts through a single API key, supporting functions like getting tweets, searching, generating and posting replies.Last updated -2
Appeared in Searches
- Search for posts related to X
- A search for strategies to promote a directory website and generate ideas for solopreneur SAAS businesses
- Managing Social Media Content Creation Using Monday
- A guide to researching LinkedIn profiles and personalizing outreach based on customer persona and company signals
- How to access and manage bookmarks on X / Twitter