XActions is the complete X/Twitter automation toolkit. Browser scripts, CLI, Node.js library, MCP server for AI agents, and a web dashboard — all without Twitter API fees.
| Interface | Best For | Setup Time |
|---|---|---|
| Browser Scripts | Quick one-off tasks, free usage | 30 seconds |
| CLI | Power users, scripting, automation | 2 minutes |
| Node.js Library | Custom integrations, bots | 5 minutes |
| MCP Server | AI agents (Claude, GPT, Cursor) | 3 minutes |
| Dashboard | Visual monitoring, team use | 1 minute |
| Browser Extension | One-click automation from x.com | 1 minute |
The fastest way to get started — paste a script into your browser console.
Open x.com and log in. For unfollow scripts, go to x.com/YOUR_USERNAME/following.
- Windows/Linux:
Ctrl + Shift + J - Mac:
Cmd + Option + J
Go to the src/ folder on GitHub, open a script, click Copy raw file, paste into the console, and press Enter.
Popular scripts:
| Task | Script |
|---|---|
| Unfollow non-followers | src/unfollowback.js |
| Unfollow everyone | src/unfollowEveryone.js |
| Detect who unfollowed you | src/detectUnfollowers.js |
| Auto-like by keyword | src/automation/autoLiker.js |
| Scrape followers | scripts/scrapeFollowers.js |
Note: Scripts in
src/automation/require pastingsrc/automation/core.jsfirst.
npm install -g xactions
xactions login # Saves your auth_token cookie
xactions profile elonmusk --json
xactions followers elonmusk --count 500 --output followers.csv
xactions non-followers myhandleSee the full CLI Reference for all 111 commands.
npm install xactionsimport { scrapeProfile, scrapeFollowers, searchTweets } from 'xactions';
const profile = await scrapeProfile('elonmusk', { cookie: process.env.X_COOKIE });
const followers = await scrapeFollowers('elonmusk', { count: 100, cookie: process.env.X_COOKIE });
const tweets = await searchTweets('javascript', { count: 50, cookie: process.env.X_COOKIE });Multi-platform scraping:
import { scrape } from 'xactions/scrapers';
const profile = await scrape('bluesky', 'profile', 'user.bsky.social');
const tweets = await scrape('mastodon', 'tweets', '[email protected]');See the full API Reference and XActions Reference.
Add XActions to Claude Desktop, Cursor, or any MCP-compatible client:
{
"mcpServers": {
"xactions": {
"command": "npx",
"args": ["-y", "xactions", "mcp"],
"env": {
"XACTIONS_SESSION_COOKIE": "your_auth_token_here"
}
}
}
}Generate this config automatically:
xactions mcp-config51+ MCP tools available — scraping, posting, engagement, analytics, streaming, and more. See MCP Setup.
- Deploy the API server (see Deployment)
- Open the dashboard at your deployment URL
- Connect your browser by pasting the bridge script into your x.com tab
- Run operations from the visual interface
- Open
chrome://extensions(oredge://extensions) - Enable Developer mode
- Click Load unpacked → select the
extension/folder - Navigate to x.com — the extension icon activates automatically
See Extension Guide.
All interfaces need an X/Twitter session cookie (auth_token):
- Open x.com and log in
- Open DevTools → Application → Cookies →
https://x.com - Find the
auth_tokencookie and copy its value
| Interface | How to Set |
|---|---|
| CLI | xactions login (interactive prompt) |
| Node.js | Pass { cookie: 'your_token' } to functions |
| MCP | Set XACTIONS_SESSION_COOKIE env var |
| Dashboard | Pasted via bridge script |
| Extension | Reads automatically from x.com tab |
X/Twitter enforces aggressive rate limits. All XActions tools include built-in delays, but follow these guidelines:
- Start small — test with 10-20 actions before scaling up
- 1-3 second minimum delays between actions (built into all scripts)
- Batch large operations — do 200, wait 15-30 minutes, repeat
- Don't run multiple scripts simultaneously on the same account
- Keep your browser tab open while operations run (browser scripts only)
| Guide | Description |
|---|---|
| CLI Reference | All 111 CLI commands |
| API Reference | Node.js library functions |
| MCP Setup | AI agent integration |
| Browser Scripts | Complete script catalog |
| Automation | Advanced browser automation framework |
| Analytics | Sentiment, reputation, history tracking |
| Workflows | Automated multi-step workflows |
| Streaming | Real-time tweet/follower/mention streams |
| Social Graph | Network analysis and visualization |
| Plugins | Extend XActions with plugins |
| Deployment | Deploy to Railway, Fly.io, Docker |
| Troubleshooting | Common issues and fixes |