/ 目录 / 演练场 / XActions
● 社区 nirholas ⚡ 即开即用

XActions

作者 nirholas · nirholas/XActions

140+ MCP tools for X/Twitter — scrape, post, automate, analyze, and monitor. No API fees, fully open source and local.

XActions is a comprehensive X/Twitter automation toolkit with 140+ MCP tools, CLI, browser scripts, and a browser extension. It handles scraping (profiles, tweets, followers), actions (post, like, follow, DM), analytics (sentiment, engagement, competitor analysis), workflow automation (JSON pipelines), and account portability (export/migration). No Twitter API key needed — works locally with no data leaving your machine.

为什么要用

核心特性

实时演示

实际使用效果

xactions-2.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "xactions-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/nirholas/XActions"
      ]
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "xactions-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/nirholas/XActions"
      ]
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "xactions-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/nirholas/XActions"
      ]
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "xactions-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/nirholas/XActions"
      ]
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "xactions-2",
      "command": "TODO",
      "args": [
        "See README: https://github.com/nirholas/XActions"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "xactions-2": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/nirholas/XActions"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add xactions-2 -- TODO 'See README: https://github.com/nirholas/XActions'

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: XActions

How to analyze your X/Twitter engagement and audience

👤 Content creators and social media managers ⏱ ~15 min beginner

何时使用: You want to understand your audience, track engagement, and find growth opportunities.

前置条件
  • XActions installed — npm install -g xactions
  • Logged into X in your browser — Browser scripts use your active session
步骤
  1. Profile analysis
    Analyze my X profile @myhandle. Show follower growth trends, top performing tweets, and engagement rate.✓ 已复制
    → Profile analytics with engagement metrics and trends
  2. Competitor analysis
    Compare my engagement metrics with @competitor1 and @competitor2. Where am I winning and where can I improve?✓ 已复制
    → Side-by-side comparison with actionable insights

结果: A clear picture of your X presence with data-backed growth strategies.

注意事项
  • Scraping too aggressively triggers X rate limits — Built-in rate limiting and human-like delays prevent most issues, but don't override them
搭配使用: filesystem

Find and unfollow accounts that don't follow you back

👤 X users managing their following list ⏱ ~30 min beginner

何时使用: Your following/follower ratio is off and you want to clean up.

前置条件
  • XActions configured — npm install xactions
步骤
  1. Detect non-followers
    Scan my X account and find all accounts I follow that don't follow me back.✓ 已复制
    → List of non-reciprocal follows with account names
  2. Smart unfollow
    Unfollow the non-followers except for accounts with over 100k followers (I want to keep those). Use smart delays.✓ 已复制
    → Progress updates with unfollow count

结果: Following list cleaned up with non-reciprocal accounts removed.

注意事项
  • Mass unfollowing too fast triggers X restrictions — Use the built-in smart delays and rate limiting — don't rush the process

组合

与其他 MCP 搭配,撬动十倍杠杆

xactions-2 + filesystem

Export your X data for backup or platform migration

Export all my tweets, followers, and following lists to ~/x-backup/ in JSON and CSV formats.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
scrape_profile handle: str Get a user's profile data 0
scrape_tweets handle: str, count?: int Get a user's recent tweets 0
search_tweets query: str, filters? Search for tweets by keyword 0
post_tweet content: str Post a new tweet 0
detect_unfollowers none Find accounts that unfollowed you or don't follow back 0
sentiment_analysis tweets: Tweet[] Analyze sentiment of tweets 0

成本与限制

运行它的成本

API 配额
No Twitter API needed — uses browser-level access
每次调用 Token 数
300–2000 tokens per tool call
费用
Free and open source
提示
Use targeted searches instead of full profile scrapes to reduce data volume.

安全

权限、密钥、影响范围

凭据存储: Uses your browser's active X session — no separate credentials needed
数据出站: All data stays local. Browser interactions go through x.com only.

故障排查

常见错误与修复

Authentication failed

Ensure you're logged into X (twitter.com) in your browser. The tools use your active session.

验证: Open x.com in your browser and verify you're logged in
Rate limited by X

X has aggressive rate limits for automated behavior. Wait 15-30 minutes and reduce automation frequency.

验证: Try a simple profile scrape to test access
Scraper returns empty data

X frequently changes their page structure. Update to the latest version of XActions.

验证: npm update xactions

替代方案

XActions 对比其他方案

替代方案何时用它替代权衡
Twitter/X official APIYou want official API access with guaranteed stabilityCosts money ($100+/mo for basic) but stable and ToS-compliant

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills