VX

vidhupv/x-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

61 stars 25 forks 质量 65 趋势 13MIT

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:

手动安装

  1. 克隆仓库:

  2. 在终端中使用 Homebrew 全局安装 UV:

  3. 创建claude_desktop_config.json:

  • 对于 MacOS:打开目录 ~/Library/Application Support/Claude/,并在其中创建文件
  • 对于Windows:打开目录 %APPDATA%/Claude/,并在其中创建文件
  1. 将此配置添加到claude_desktop_config.json:

  2. 获取你的X/Twitter API凭证:

  • 前往 X API 开发者门户
  • 创建项目
  • 在用户认证设置中:设置了读写权限,网页应用类型
  • 将回调URL设置为http://localhost/,网站URL设置为http://example.com/
  • 生成并复制“密钥和令牌”部分的所有密钥和令牌
  1. 更新配置文件:
  • 将/path/to/x-mcp替换为你的实际仓库路径
  • 添加你的X/Twitter API凭证
  1. 彻底退出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

  1. Clone the repository:
git clone https://github.com/yourusername/x-mcp.git
  1. Install UV globally using Homebrew in Terminal:
brew install uv
  1. 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
  2. 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"
      }
    }
  }
}
  1. 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 to http://example.com/
    • Generate and copy all keys and tokens from Keys and Tokens section
  2. Update the config file:

    • Replace /path/to/x-mcp with your actual repository path
    • Add your X/Twitter API credentials
  3. 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 uv and reinstall with brew install uv)
  • Or find UV path with which uv and 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
在 GitHub 查看完整 README

安装

npx -y @smithery/cli install x-mcp --client claude
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }