XActions

Read, post and engage on X/Twitter with your own session cookie, without an X API key

By nich (individual) TypeScript Local · stdio CommunicationBrowser automationData and analytics

64 popularity score ★ 644 ↓ 412/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs XACTIONS_SESSION_COOKIE. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add xactions -e XACTIONS_SESSION_COOKIE=<XACTIONS_SESSION_COOKIE> -- npx -y -p xactions xactions-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "xactions": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "xactions",
        "xactions-mcp"
      ],
      "env": {
        "XACTIONS_SESSION_COOKIE": "<XACTIONS_SESSION_COOKIE>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "xactions": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "xactions",
        "xactions-mcp"
      ],
      "env": {
        "XACTIONS_SESSION_COOKIE": "<XACTIONS_SESSION_COOKIE>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "xactions": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "xactions",
        "xactions-mcp"
      ],
      "env": {
        "XACTIONS_SESSION_COOKIE": "<XACTIONS_SESSION_COOKIE>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.xactions]
command = "npx"
args = ["-y", "-p", "xactions", "xactions-mcp"]

[mcp_servers.xactions.env]
XACTIONS_SESSION_COOKIE = "<XACTIONS_SESSION_COOKIE>"
Gemini CLITerminal
gemini mcp add --scope user -e XACTIONS_SESSION_COOKIE=<XACTIONS_SESSION_COOKIE> xactions npx -- -y -p xactions xactions-mcp

Settings 10

XACTIONS_SESSION_COOKIE Required: Your X auth_token cookie; needed for writes, DMs and most signed-in reads.
OPENROUTER_API_KEY Optional: Key for the AI writing and analysis tools.
XACTIONS_MCP_TOOLS Optional: Allowlist of tools or groups to expose, e.g. read,analytics.
XACTIONS_MCP_EXCLUDE Optional: Denylist of tools or groups; wins over the allowlist.
XACTIONS_MCP_REQUIRE_APPROVAL Optional: 1 holds every write as a draft until approved.
XACTIONS_MODE Optional: local (default, Puppeteer and HTTP on your machine) or remote (api.xactions.app).
X402_PRIVATE_KEY Optional: Wallet key for paying per call in remote mode.
XACTIONS_MCP_TOKEN Optional: Bearer token for /mcp when run with --http.
XACTIONS_MCP_HOST Optional: Bind address for --http; 127.0.0.1 by default.
XACTIONS_HOME Optional: Folder for drafts and the action ledger; ~/.xactions by default.

What it does

XActions is a Node.js toolkit for X (formerly Twitter) that bundles scrapers, a command-line tool, browser scripts and an MCP server. The MCP server, started with the `xactions-mcp` program in the `xactions` npm package, gives an assistant tools to read profiles, timelines, followers, searches, threads, trends and Spaces, and, once signed in with your own X session cookie, to post, reply, like, repost, follow, unfollow, send direct messages, change profile settings and run bulk or scheduled actions. It talks to X's web front end with your session rather than through the paid X API, so no developer key is needed.

Version 4.0.1 registers 153 tools in its server source, more than the 149 its MCP setup guide states or the 152 and 154 shown in its README; plugins can add more. Many profile, follower, timeline and search tools also accept Bluesky, Mastodon or Threads accounts. Beyond plain reads and writes there are analytics, sentiment and audience reports, a follower graph, scheduled posts, RSS-to-draft feeds, saved workflows, and AI writing tools that call a model through OpenRouter.

Two safeguards are built in. Every write is charged against a rolling 24-hour budget per action class, kept on disk so it survives restarts (by default 2,400 posts, 500 likes, 400 follows and 500 direct messages a day), and a call over budget is refused before it reaches X. Setting `XACTIONS_MCP_REQUIRE_APPROVAL=1` holds every write as a draft until a person approves it. `XACTIONS_MCP_TOOLS` and `XACTIONS_MCP_EXCLUDE` narrow which tools are advertised.

What it needs

RuntimeNode.js 20+

Node.js 20 or later (the npm package's engines field; the main branch asks for 22.12). An X account and its auth_token session cookie for writes, DMs and most signed-in reads; public profile and timeline reads work without it. Browser-driven tools need Puppeteer, an optional peer dependency npx does not install (npm install puppeteer, then npx puppeteer browsers install chrome). AI writing tools need an OPENROUTER_API_KEY.

Limits

It works through X's web session, not the official API, so it can break when X changes its site, and its makers call it educational material, untested on personal accounts, used at your own risk, with no responsibility for account restrictions or bans; follow X's terms. The docs' `npx -y xactions-mcp` command fetches a separate wrapper package, `xactions-mcp` (3.4.9), not `xactions` 4.0.1; `npx -y -p xactions xactions-mcp` runs this one. The default daily caps apply to MCP writes only. Tools named in the docs on main, such as x_block_user, are not in 4.0.1.

Who it suits

Suits someone who wants an assistant to read X data or act on their own X account without paying for API access, and accepts the risk of automating a personal session against X's terms. Reads, analytics and monitoring can be enabled alone with tool filtering, and approval mode suits those who want a person to release each post. It is not made by X; anyone who needs a supported route with API keys and stable terms should look at the official X API instead. With 153 tools, it is best narrowed with XACTIONS_MCP_TOOLS for clients that slow down with long tool lists.

Tools 60 of 153

x_login
Signs the session in with an X auth_token cookie
x_get_profile
Reads a user's profile: bio, counts and similar fields
x_get_followers
Lists an account's followers
x_get_following
Lists the accounts a user follows
x_get_non_followers
Finds accounts you follow that do not follow back
x_get_tweets
Fetches recent posts from a profile
x_search_tweets
Searches posts for a query
x_get_thread
Fetches a whole conversation thread
x_get_replies
Reads replies to a post
x_get_mentions
Reads posts that mention an account
x_get_likers
Lists accounts that liked a post
x_get_retweeters
Lists accounts that reposted a post
x_get_trends
Reads current trending topics
x_get_notifications
Reads the signed-in account's notifications
x_get_bookmarks
Lists the signed-in account's bookmarks
x_get_lists
Lists an account's X lists
x_get_spaces
Finds Spaces (live audio rooms)
x_space_transcript
Gets the transcript of a Space
x_post_tweet
Publishes a post from the signed-in account
x_post_thread
Publishes a series of posts as a thread
x_reply
Replies to a post
x_quote_tweet
Reposts a post with added text
x_create_poll
Publishes a post with a poll
x_schedule_post
Schedules a post for later
x_delete_tweet
Deletes one of your posts
x_publish_article
Publishes a long-form article
x_like
Likes a post
x_retweet
Reposts a post without comment
x_bookmark
Bookmarks a post
x_follow
Follows an account
x_unfollow
Unfollows an account
x_unfollow_non_followers
Unfollows, in bulk, accounts that do not follow back
x_unfollow_all
Unfollows every account you follow
x_auto_like
Likes posts matching given criteria in a batch
x_auto_follow
Follows accounts matching given criteria in a batch
x_auto_comment
Leaves replies on matching posts automatically
x_engage
Runs a feed sweep that can like, reply and repost; dry run by default
x_send_dm
Sends a direct message
x_get_conversations
Lists direct-message conversations
x_export_dms
Exports direct-message history
x_mute_user
Mutes an account
x_update_profile
Changes the signed-in account's profile fields
x_toggle_protected
Switches the account between public and protected posts
x_download_video
Downloads a video from a post
x_download_media
Saves a profile's photos and videos
x_get_analytics
Reads account-level analytics
x_get_post_analytics
Reads metrics for one post
x_analyze_sentiment
Scores the sentiment of posts
x_brand_monitor
Tracks posts about a brand or keyword
x_compare_accounts
Compares figures across several accounts
x_grok_query
Puts a question to Grok through the X session
x_generate_tweet
Drafts a post with an AI model (needs OPENROUTER_API_KEY)
x_persona_run
Runs an automated persona that posts and engages
x_workflow_run
Runs a saved multi-step workflow
x_bulk_execute
Applies one action to a list of usernames
x_export_account
Exports an account's data to files
x_ask
Answers questions about using XActions itself from its docs
x_list_drafts
Lists posts held for approval in approval mode
x_approve_draft
Releases a held draft so it is carried out
x_action_budget
Shows how much of each daily action cap is left

Similar servers