Skip to main content
Glama
X(Twitter) MCP Server

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: thread-storm

使用示例

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

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

  • “显示我的推文草稿”

  • “发布此草稿!”

  • “删除该草稿”

故障排除

如果不起作用:

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

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

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

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

Available Tools

5 tools
create_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

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      An MCP server that enables Claude to interact with Twitter, allowing for posting tweets and searching Twitter content.
      3
      503 npm
      411
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      13
      MIT