xactions-mcp-server
XActions MCP Server
The definitive free Twitter/X MCP server. 68+ tools for AI agents.
Quick Start
{
"mcpServers": {
"xactions": {
"command": "npx",
"args": ["xactions-mcp"],
"env": {
"XACTIONS_SESSION_COOKIE": "your_auth_token_here"
}
}
}
}
Setup
1. Get auth_token
DevTools (F12) -> Application -> Cookies -> x.com -> copy auth_token value
2. Configure your client
Claude Desktop:
xactions mcp-config --client claude --write
Cursor:
xactions mcp-config --client cursor --write
Windsurf / VS Code:
xactions mcp-config --client windsurf --write
xactions mcp-config --client vscode --write
3. Restart your client
Available Tools (68+)
Scraping
x_get_profile, x_get_followers, x_get_following, x_get_non_followers, x_get_tweets, x_search_tweets, x_get_thread, x_download_video
Actions
x_follow, x_unfollow, x_unfollow_non_followers, x_post_tweet, x_like, x_retweet, x_delete_tweet, x_reply, x_bookmark, x_get_bookmarks, x_clear_bookmarks, x_auto_like
Analysis
x_detect_unfollowers, x_best_time_to_post, x_analyze_sentiment, x_monitor_reputation, x_reputation_report, x_competitor_analysis, x_brand_monitor
Profile & Settings
x_update_profile, x_get_settings, x_toggle_protected, x_get_blocked, x_check_premium
Content
x_post_thread, x_create_poll, x_schedule_post, x_publish_article
Discovery
x_get_trends, x_get_explore
Messaging
x_send_dm, x_get_conversations, x_export_dms
AI (requires OPENROUTER_API_KEY)
x_analyze_voice, x_generate_tweet, x_rewrite_tweet, x_summarize_thread
Advanced
- Streaming:
x_stream_start/stop/list/pause/resume/status/history - Workflows:
x_workflow_create/run/list/actions - Social Graph:
x_graph_build/analyze/recommendations/list - Portability:
x_export_account/migrate_account/diff_exports
Example Prompts
"Scrape @nichxbt's profile and last 50 tweets. What topics do they post about most?"
"Find my non-followers and unfollow them"
"Search for tweets about 'AI agents' and analyze the sentiment"
"Post a thread about the top 3 AI trends in 2026"
"Monitor brand mentions of 'XActions' for the last week"
Environment Variables
| Variable | Required | Purpose |
|---|---|---|
XACTIONS_SESSION_COOKIE |
Yes | X auth_token for authentication |
OPENROUTER_API_KEY |
No | Enables AI tools (voice analysis, tweet generation) |
Full Documentation
See docs/mcp-setup.md for complete setup guide with troubleshooting.
More from nirholas/xactions
twitter-scraping
Scrapes X/Twitter data without API access using Puppeteer stealth and browser console scripts. Extracts profiles, followers, following lists, tweets, search results, hashtags, threads, media, bookmarks, notifications, DMs, likes, and viral tweets. Exports to JSON/CSV. Use when collecting, exporting, or analyzing Twitter data.
25direct-messages
Sends, manages, and automates direct messages on X/Twitter. Supports personalized bulk DMs with templates, conversation management, message request filtering, and DM export. The agent uses this skill when a user needs to send DMs, manage conversations, or automate direct messaging workflows.
10engagement-interaction
Automates X/Twitter engagement actions — like, unlike, reply, bookmark, hide replies, and auto-like by keyword. Also bulk-unlikes all posts. Use when users want to automate likes, send replies, manage bookmarks on tweets, hide replies, or clear their entire likes history.
10follower-monitoring
Monitors X/Twitter follower changes using browser console scripts. Detects who unfollowed, tracks new followers with welcome messages, monitors any public account, runs continuous monitoring with alerts, tracks follower growth over time, and analyzes follower demographics. Use when tracking follower changes, detecting unfollowers, or monitoring Twitter accounts.
9discovery-explore
Explores X/Twitter trending topics, searches for content, and discovers new accounts. Includes trending topic monitoring, keyword search, explore page scraping, and topic discovery. Use when users want to explore trends, search for content, or discover new accounts and topics on X.
7premium-subscriptions
Manages X/Twitter Premium subscription features including plan detection, feature access verification, and subscription-dependent script guidance. Use when checking Premium status, understanding which features require Premium, or managing subscription-gated functionality.
7