vidhupv/x-mcp 是从 https://github.com/vidhupv/x-mcp. 导入的 MCP 服务器候选
概览
vidhupv/x-mcp 是从 https://github.com/vidhupv/x-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个MCP服务器,可以直接通过Claude聊天创建、管理和发布X/Twitter帖子。
快速布置
通过Smithery安装
通过 Smithery 自动安装 X(Twitter) MCP Server for Claude Desktop:
手动安装
-
克隆仓库:
-
在终端中使用 Homebrew 全局安装 UV:
-
创建claude_desktop_config.json:
- 对于 MacOS:打开目录
~/Library/Application Support/Claude/,并在其中创建文件 - 对于Windows:打开目录
%APPDATA%/Claude/,并在其中创建文件
-
将此配置添加到claude_desktop_config.json:
-
获取你的X/Twitter API凭证:
- 前往 X API 开发者门户
- 创建项目
- 在用户认证设置中:设置了读写权限,网页应用类型
- 将回调URL设置为
http://localhost/,网站URL设置为http://example.com/ - 生成并复制“密钥和令牌”部分的所有密钥和令牌
- 更新配置文件:
- 将
/path/to/x-mcp替换为你的实际仓库路径 - 添加你的X/Twitter API凭证
- 彻底退出Claude并重新打开它
使用示例
- “推特 ‘刚刚学会通过AI发推——真是令人震惊!🤖✨’"
本页由 AI 翻译,技术细节请以原文为准。
README
X(Twitter) MCP server
An MCP server to create, manage and publish X/Twitter posts directly through Claude chat.
Quick Setup
Installing via Smithery
To install X(Twitter) MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install x-mcp --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/yourusername/x-mcp.git
- Install UV globally using Homebrew in Terminal:
brew install uv
-
Create claude_desktop_config.json:
- For MacOS: Open directory
~/Library/Application Support/Claude/and create the file inside it - For Windows: Open directory
%APPDATA%/Claude/and create the file inside it
- For MacOS: Open directory
-
Add this configuration to 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"
}
}
}
}
-
Get your X/Twitter API credentials:
- Go to X API Developer Portal
- Create a project
- In User Authentication Settings: Set up with Read and Write permissions, Web App type
- Set Callback URL to
http://localhost/and Website URL tohttp://example.com/ - Generate and copy all keys and tokens from Keys and Tokens section
-
Update the config file:
- Replace
/path/to/x-mcpwith your actual repository path - Add your X/Twitter API credentials
- Replace
-
Quit Claude completely and reopen it
Usage Examples
- “Tweet ‘Just learned how to tweet through AI - mind blown! 🤖✨’”
- “Create a thread about the history of pizza”
- “Show me my draft tweets”
- “Publish this draft!”
- “Delete that draft”
Troubleshooting
If not working:
- Make sure UV is installed globally (if not, uninstall with
pip uninstall uvand reinstall withbrew install uv) - Or find UV path with
which uvand replace"command": "uv"with the full path - Verify all X/Twitter credentials are correct
- Check if the x-mcp path in config matches your actual repository location
安装
npx -y @smithery/cli install x-mcp --client claude配置
{
"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"
}
}
}
}