Getting Started with XActions
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.
Choose Your Interface
| 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 |
---|--------|
| 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.
Quick Start: CLI
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 myhandle
See the full CLI Reference for all 111 commands.
Quick Start: Node.js Library
npm install xactions
import { 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', 'user@mastodon.social');
See the full API Reference and XActions Reference.
Quick Start: MCP Server (AI Agents)
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-config
51+ MCP tools available — scraping, posting, engagement, analytics, streaming, and more. See MCP Setup.
Quick Start: Dashboard
- 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
Quick Start: Browser Extension
- 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.
Authentication
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 |
Rate Limits & Safety
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)
What's Next?
| 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 |
⚡ Explore XActions
100% free and open-source. No API keys, no fees, no signup.
Browse All Documentation