article
README
🚀 Twitter MCP 服务器
此MCP服务器允许客户端与Twitter交互,支持发布推文和搜索Twitter,为用户提供便捷的Twitter操作体验。
🚀 快速开始
- 在Twitter Developer Portal创建一个Twitter开发账户并获取你的API密钥。
- 将以下配置添加到Claude Desktop配置文件中:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": ["-y", "@enescinar/twitter-mcp"],
"env": {
"API_KEY": "your_api_key_here",
"API_SECRET_KEY": "your_api_secret_key_here",
"ACCESS_TOKEN": "your_access_token_here",
"ACCESS_TOKEN_SECRET": "your_access_token_secret_here"
}
}
}
}
- 重启Claude Desktop。
这样,Claude就可以通过两个工具与Twitter交互:
post_tweet:发布一条新推文search_tweets:搜索推文
💻 使用示例
尝试询问Claude:
- "你能发布一条推文说'来自Claude的问候!'"
- "你能搜索关于Claude AI的相关推文吗?"
🔧 故障排除
日志位置:
- Windows:
%APPDATA%\Claude\logs\mcp-server-twitter.log - macOS:
~/Library/Logs/Claude/mcp-server_twitter.log
🛠️ 开发
如果你想贡献或从源代码运行:
- 克隆仓库:
git clone https://github.com/EnesCinr/twitter-mcp.git
cd twitter-mcp
- 安装依赖项:
npm install
- 构建:
npm run build
- 运行:
npm start
📄 许可证
MIT
Scan to contact