X(Twitter) MCP Server
X(Twitter)MCP服务器
MCP 服务器,用于直接通过 Claude 聊天创建、管理和发布 X/Twitter 帖子。
快速设置
通过 Smithery 安装
通过Smithery自动为 Claude Desktop 安装 X(Twitter) MCP 服务器:
npx -y @smithery/cli install x-mcp --client claude手动安装
克隆存储库:
git clone https://github.com/yourusername/x-mcp.git在终端中使用 Homebrew 全局安装 UV:
brew install uv创建claude_desktop_config.json:
对于 MacOS:打开目录
~/Library/Application Support/Claude/并在其中创建文件对于 Windows:打开目录
%APPDATA%/Claude/并在其中创建文件
将此配置添加到claude_desktop_config.json:
{
"mcpServers": {
"x_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/x-mcp",
"run",
"x-mcp"
],
"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"
}
}
}
}获取您的 X/Twitter API 凭证:
创建项目
在用户身份验证设置中:设置读取和写入权限,Web 应用类型
将回调 URL 设置为
http://localhost/,将网站 URL 设置为http://example.com/从密钥和令牌部分生成并复制所有密钥和令牌
更新配置文件:
将
/path/to/x-mcp替换为您的实际存储库路径添加您的 X/Twitter API 凭证
彻底退出 Claude 并重新打开它
Related MCP server: thread-storm
使用示例
“推文‘刚刚学会了如何通过人工智能发推文——太震撼了!🤖✨’”
“创建一个关于披萨历史的帖子”
“显示我的推文草稿”
“发布此草稿!”
“删除该草稿”
故障排除
如果不起作用:
确保 UV 已全局安装(如果没有,请使用
pip uninstall uv卸载,然后使用brew install uv重新安装)或者使用
which uv查找 UV 路径,并将"command": "uv"替换为完整路径验证所有 X/Twitter 凭证是否正确
检查配置中的 x-mcp 路径是否与你的实际存储库位置匹配
Available Tools
5 toolscreate_draft_threadC
Create a draft tweet thread
Inputs: contents (required).
create_draft_tweetC
Create a draft tweet
Inputs: content (required).
delete_draftC
Delete a draft tweet or thread
Inputs: draft_id (required).
list_draftsB
List all draft tweets and threads
Inputs: no named parameters.
publish_draftC
Publish a draft tweet or thread
Inputs: draft_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Every tool has a clearly distinct purpose with no ambiguity. Tools are clearly separated by action (create, delete, list, publish) and target (draft tweet vs. draft thread where specified), making misselection unlikely.
All tools follow a consistent verb_noun pattern (e.g., create_draft_thread, list_drafts). The naming is predictable and readable throughout the set, with no deviations in style.
With 5 tools, the count is well-scoped for managing draft tweets and threads. Each tool earns its place, covering essential operations without bloat or thinness for this focused domain.
The toolset provides complete CRUD/lifecycle coverage for drafts (create, list, delete, publish), with minor gaps such as the inability to edit or update existing drafts, but agents can work around this by recreating drafts.
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted X Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
PostHero MCP server — schedule and publish social media posts from any MCP-compatible AI tool
Hosted MCP server for AI agents to post to LinkedIn profiles and X and upload to YouTube.
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP server that enables Claude to interact with Twitter, allowing for posting tweets and searching Twitter content.3503 npm411MIT
- AlicenseAqualityDmaintenanceMCP server for publishing threads to Threads and Twitter/X simultaneously from Claude Code. Journal your thoughts, convert them to viral threads, and post everywhere at once.13MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude to automate Twitter posting with AI-generated images and thread support.9 npmMIT
- AlicenseAqualityDmaintenanceA local MCP server that lets Claude post to social media via upload-post.com — text, photos, and videos across 13 platforms.17MIT