Skip to main content
Glama
vidhupv

X(Twitter) MCP Server

by vidhupv

X(Twitter)MCP服务器

铁匠徽章

MCP 服务器,用于直接通过 Claude 聊天创建、管理和发布 X/Twitter 帖子。

快速设置

通过 Smithery 安装

通过Smithery自动为 Claude Desktop 安装 X(Twitter) MCP 服务器:

npx -y @smithery/cli install x-mcp --client claude

手动安装

  1. 克隆存储库:

git clone https://github.com/yourusername/x-mcp.git
  1. 在终端中使用 Homebrew 全局安装 UV:

brew install uv
  1. 创建claude_desktop_config.json:

    • 对于 MacOS:打开目录~/Library/Application Support/Claude/并在其中创建文件

    • 对于 Windows:打开目录%APPDATA%/Claude/并在其中创建文件

  2. 将此配置添加到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" } } } }
  1. 获取您的 X/Twitter API 凭证:

    • 前往X API 开发者门户

    • 创建项目

    • 在用户身份验证设置中:设置读取和写入权限,Web 应用类型

    • 将回调 URL 设置为http://localhost/ ,将网站 URL 设置为http://example.com/

    • 从密钥和令牌部分生成并复制所有密钥和令牌

  2. 更新配置文件:

    • /path/to/x-mcp替换为您的实际存储库路径

    • 添加您的 X/Twitter API 凭证

  3. 彻底退出 Claude 并重新打开它

Related MCP server: ClaudeKeep

使用示例

  • “推文‘刚刚学会了如何通过人工智能发推文——太震撼了!🤖✨’”

  • “创建一个关于披萨历史的帖子”

  • “显示我的推文草稿”

  • “发布此草稿!”

  • “删除该草稿”

故障排除

如果不起作用:

  • 确保 UV 已全局安装(如果没有,请使用pip uninstall uv卸载,然后使用brew install uv重新安装)

  • 或者使用which uv查找 UV 路径,并将"command": "uv"替换为完整路径

  • 验证所有 X/Twitter 凭证是否正确

  • 检查配置中的 x-mcp 路径是否与你的实际存储库位置匹配

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vidhupv/x-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server