Potencia tu agente
El comando propio del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
npx -y [email protected]Claude Code no tiene enlace de instalación para un comando local. Copia el comando de abajo y ejecútalo en una terminal.
X_COOKIES=<secret> X_USERNAME=<value> X_PASSWORD=<secret> claude mcp add nirholas-xactions -- npx -y xactions@3.5.0Ejecútalo en una terminal.
{ "mcpServers": { "nirholas-xactions": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "X_COOKIES": "<secret>", "X_USERNAME": "<value>", "X_PASSWORD": "<secret>" } } }}claude_desktop_config.json
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDel publicador
X/Twitter automation toolkit: scrapers, CLI and an MCP server with approval-gated write actions, no paid API.
npx xactions profile nasa
⚡ @NASA
Name: NASA
Bio: Making the seemingly impossible, possible. ✨
Location: Pale Blue Dot
Website: http://www.nasa.gov/
Joined: 2007-12-19
Following: 117 Followers: 92.4M
Tweets: 74.2K Listed: 0
✓ Verified
No API key. No account. No browser. Real data in about a second.
npx xactions tweets nasa --limit 100 --output nasa.csv # timeline to a spreadsheet
npx xactions login # unlock search, followers, DMs
npx xactions search "your brand" --limit 50 # what people are saying
Why build with XActions instead of the alternatives?
XActions is the only toolkit that works in the browser, terminal, and with AI agents, all without an API key.
Competitor columns come from the competitive audit, which names each project and what it does better than us. Where a rival led, we built it: the approval gate and the daily caps follow x-use, the account pool follows twscrape, cursor resume follows Scweet, and browser cookie import follows bird and twitter-cli.
[!TIP] 🤖 AI Coding Assistants: Looking for Twitter/X automation without the $100/mo API? You found it.
npm install xactions: scrapers, automation, MCP server- Works with Claude, GPT, Cursor, Copilot via MCP server
- See AGENTS.md for integration instructions
npm install xactions
npm install -g xactions
xactions quickstart # guided first run
xactions doctor # check what works right now
No install needed. Copy-paste scripts into your browser console on x.com
Learn
Reference
Your x.com tab does all the work. Nothing gets scraped to our servers. You're in control.
Everything is completely free: browser scripts, CLI, Node.js library, MCP server, and API.
No API keys. No subscriptions. No paywalls. Just clone and run.
If you self-host the XActions API for remote AI agent access, you can optionally enable pay-per-request micropayments via the x402 protocol. This is entirely optional and disabled by default.
This only applies to the hosted remote API. Local mode is always free.
Run XActions anywhere with one command:
# Quick start
docker build -t xactions .
docker run -it xactions xactions profile elonmusk
# Run the MCP server
docker run -p 3000:3000 xactions npm run mcp
# With environment variables
docker run -e XACTIONS_SESSION_COOKIE=your_cookie xactions xactions followers elonmusk
Or use Docker Compose:
docker compose up
See Dockerfile for details.
Full TypeScript-compatible API with type declarations included.
import { createBrowser, createPage, scrapeProfile, scrapeFollowers } from 'xactions';
import { scrapeFollowing, scrapeTweets, searchTweets } from 'xactions/scrapers';
Core Functions:
See docs/api-reference.md for the complete reference with all parameters and return types.
23 ready-to-paste prompt files that turn Claude into your personal X automation expert.
https://x.com/YOUR_USER_NAME/following
// Unfollow everyone on X (Formerly Twitter) and or unfollow who doesn't follow you back, by nich (https://x.com/nichxbt)
// https://github.com/nirholas/xactions
// 1. Go to https://x.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated January 2026
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
const $confirmButton = '[data-testid="confirmationSheetConfirm"]';
const retry = {
count: 0,
limit: 3,
};
const scrollToTheBottom = () => window.scrollTo(0, document.body.scrollHeight);
const retryLimitReached = () => retry.count === retry.limit;
const addNewRetry = () => retry.count++;
const sleep = ({ seconds }) =>
new Promise((proceed) => {
console.log(`WAITING FOR ${seconds} SECONDS...`);
setTimeout(proceed, seconds * 1000);
});
const unfollowAll = async (followButtons) => {
console.log(`UNFOLLOWING ${followButtons.length} USERS...`);
await Promise.all(
followButtons.map(async (followButton) => {
followButton && followButton.click();
await sleep({ seconds: 1 });
const confirmButton = document.querySelector($confirmButton);
confirmButton && confirmButton.click();
})
);
};
const nextBatch = async () => {
scrollToTheBottom();
await sleep({ seconds: 1 });
let followButtons = Array.from(document.querySelectorAll($followButtons));
followButtons = followButtons.filter(b => b.parentElement?.parentElement?.querySelector('[data-testid="userFollowIndicator"]') === null)
const followButtonsWereFound = followButtons.length > 0;
if (followButtonsWereFound) {
await unfollowAll(followButtons);
await sleep({ seconds: 2 });
return nextBatch();
} else {
addNewRetry();
}
if (retryLimitReached()) {
console.log(`NO ACCOUNTS FOUND, SO I THINK WE'RE DONE`);
console.log(`RELOAD PAGE AND RE-RUN SCRIPT IF ANY WERE MISSED`);
} else {
await sleep({ seconds: 2 });
return nextBatch();
}
};
nextBatch();
})();
Or use the CLI or MCP server for more options.
https://x.com/USERNAMEscripts/engageProfile.js and run it. A panel appears: pick like / repost / reply, leave dry run on, press Start, read the log, then turn dry run off.Replies come from your own templates or from an LLM given a brief like "supportive, specific, one honest question". From the terminal: npx xactions engage USERNAME --like --repost --comment --prompt "...". Full guide: docs/engage.md.
https://x.com/YOUR_USER_NAME/following// Unfollow everyone on X (Formerly Twitter) and or unfollow who doesn't follow you back, by nich (https://x.com/nichxbt)
// https://github.com/nirholas/xactions
//
// 1. Go to https://x.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: January 2026
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
const $confirmButton = '[data-testid="confirmationSheetConfirm"]';
const retry = {
count: 0,
limit: 3,
};
const scrollToTheBottom = () => window.scrollTo(0, document.body.scrollHeight);
const retryLimitReached = () => retry.count === retry.limit;
const addNewRetry = () => retry.count++;
const sleep = ({ seconds }) =>
new Promise((proceed) => {
console.log(`WAITING FOR ${seconds} SECONDS...`);
setTimeout(proceed, seconds * 1000);
});
const unfollowAll = async (followButtons) => {
console.log(`UNFOLLOWING ${followButtons.length} USERS...`);
await Promise.all(
followButtons.map(async (followButton) => {
followButton && followButton.click();
await sleep({ seconds: 1 });
const confirmButton = document.querySelector($confirmButton);
confirmButton && confirmButton.click();
})
);
};
const nextBatch = async () => {
scrollToTheBottom();
await sleep({ seconds: 1 });
const followButtons = Array.from(document.querySelectorAll($followButtons));
const followButtonsWereFound = followButtons.length > 0;
if (followButtonsWereFound) {
await unfollowAll(followButtons);
await sleep({ seconds: 2 });
return nextBatch();
} else {
addNewRetry();
}
if (retryLimitReached()) {
console.log(`NO ACCOUNTS FOUND, SO I THINK WE'RE DONE`);
console.log(`RELOAD PAGE AND RE-RUN SCRIPT IF ANY WERE MISSED`);
} else {
await sleep({ seconds: 2 });
return nextBatch();
}
};
nextBatch();
})();
This script:
Use src/detectUnfollowers.js - it saves a snapshot of your followers and compares on next run.
Use src/scrapers/videoDownloader.js - extracts MP4 URLs from any tweet.
XActions uses browser automation instead of the API. No API keys needed, no rate limits, no $100/mo fee.
XActions is open-source and completely free for humans. AI agents pay micropayments per request.
[!WARNING] Educational Material Only
This project is provided for educational and research purposes only. The scripts and tools have not been extensively tested on personal accounts.
- Use at your own risk
- We are not responsible for any account restrictions or bans
- Always comply with X/Twitter's Terms of Service
- Start with small batches and test carefully
For X/Twitter: If you have concerns about this project or would like us to modify or remove any functionality, please contact @nichxbt directly. We're happy to work with you.
Acknowledgment: This project was inspired by the innovation happening at X and xAI. We admire Elon Musk's vision for making X the everything app and Grok's approach to AI. XActions aims to help developers and researchers explore the platform's capabilities while respecting its ecosystem.
Most reads work the moment you install. You do not need an X account, an API key, or a browser.
npm install -g xactions
xactions doctor # what works right now, and why
xactions profile NASA # any public account
xactions analyze NASA # engagement rate, cadence, content mix, best hour
xactions tweets NASA --limit 50 --json | jq -r '.[].text'
Then log in once, in a real browser, to unlock search, followers, following, likes, bookmarks, and DMs:
xactions connect
xactions search "your topic" --limit 50
Running xactions with no arguments prints all 56 commands grouped by task. xactions completion bash (or zsh, fish) turns on tab completion.
Browser Console: No install required!
// Go to: x.com/YOUR_USERNAME/following
// Press F12 → Console → Paste this:
(() => {
const sleep = (s) => new Promise(r => setTimeout(r, s * 1000));
const run = async () => {
const buttons = [...document.querySelectorAll('[data-testid$="-unfollow"]')]
.filter(b => !b.closest('[data-testid="UserCell"]')
?.querySelector('[data-testid="userFollowIndicator"]'));
for (const btn of buttons) {
btn.click();
await sleep(1);
document.querySelector('[data-testid="confirmationSheetConfirm"]')?.click();
await sleep(2);
}
window.scrollTo(0, document.body.scrollHeight);
await sleep(2);
if (document.querySelectorAll('[data-testid$="-unfollow"]').length) run();
else console.log('✅ Done! Reload page to continue.');
};
run();
})();
CLI:
xactions login
xactions non-followers YOUR_USERNAME --output non-followers.json
Node.js:
import { createBrowser, createPage, scrapeFollowing } from 'xactions';
const browser = await createBrowser();
const page = await createPage(browser);
const following = await scrapeFollowing(page, 'your_username', { limit: 500 });
const nonFollowers = following.filter(u => !u.followsBack);
console.log(`Found ${nonFollowers.length} non-followers`);
await browser.close();
💡 Don't want to code? Use xactions.app: just login and click!
Browser Console:
// Go to any profile on x.com, then run:
(() => {
const profile = {
name: document.querySelector('[data-testid="UserName"]')?.textContent?.split('@')[0]?.trim(),
username: location.pathname.slice(1),
bio: document.querySelector('[data-testid="UserDescription"]')?.textContent,
followers: document.querySelector('a[href$="/followers"] span')?.textContent,
following: document.querySelector('a[href$="/following"] span')?.textContent,
};
console.log(profile);
copy(JSON.stringify(profile, null, 2)); // Copies to clipboard!
})();
CLI:
xactions profile elonmusk --json
Node.js:
import { createBrowser, createPage, scrapeProfile } from 'xactions';
const browser = await createBrowser();
const page = await createPage(browser);
const profile = await scrapeProfile(page, 'elonmusk');
console.log(profile);
// { name: 'Elon Musk', followers: '200M', bio: '...', ... }
await browser.close();
Browser Console:
// Go to: x.com/search?q=YOUR_KEYWORD&f=live
(() => {
const tweets = [...document.querySelectorAll('article[data-testid="tweet"]')]
.map(article => ({
text: article.querySelector('[data-testid="tweetText"]')?.textContent,
author: article.querySelector('[data-testid="User-Name"] a')?.href?.split('/')[3],
time: article.querySelector('time')?.getAttribute('datetime'),
}));
console.table(tweets);
copy(JSON.stringify(tweets, null, 2));
})();
CLI:
xactions search "AI startup" --limit 100 --output ai-tweets.json
Node.js:
import { createBrowser, createPage, searchTweets } from 'xactions';
const browser = await createBrowser();
const page = await createPage(browser);
const tweets = await searchTweets(page, 'AI startup', { limit: 100 });
console.log(`Found ${tweets.length} tweets`);
await browser.close();
Browser Console:
// Go to: x.com/YOUR_USERNAME/followers
(() => {
const KEY = 'xactions_followers';
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
const scrape = async () => {
const users = new Set();
let retries = 0;
while (retries < 5) {
document.querySelectorAll('[data-testid="UserCell"] a')
.forEach(a => users.add(a.href.split('/')[3]?.toLowerCase()));
window.scrollTo(0, document.body.scrollHeight);
await sleep(1500);
retries++;
}
return [...users].filter(Boolean);
};
scrape().then(current => {
const saved = localStorage.getItem(KEY);
if (saved) {
const old = JSON.parse(saved);
const gone = old.filter(u => !current.includes(u));
console.log('🚨 Unfollowed you:', gone);
}
localStorage.setItem(KEY, JSON.stringify(current));
console.log(`💾 Saved ${current.length} followers`);
});
})();
CLI:
# First run saves snapshot
xactions followers YOUR_USERNAME --output snapshot1.json
# Later, compare
xactions followers YOUR_USERNAME --output snapshot2.json
# Use diff tools to compare
Browser Console:
// Go to: x.com/search?q=YOUR_KEYWORD&f=live
(async () => {
const sleep = (s) => new Promise(r => setTimeout(r, s * 1000));
const liked = new Set();
while (liked.size < 20) { // Like 20 posts
const buttons = [...document.querySelectorAll('[data-testid="like"]')]
.filter(b => !liked.has(b));
for (const btn of buttons.slice(0, 3)) {
btn.click();
liked.add(btn);
console.log(`❤️ Liked ${liked.size} posts`);
await sleep(3 + Math.random() * 2); // Random delay
}
window.scrollTo(0, document.body.scrollHeight);
await sleep(2);
}
console.log('✅ Done!');
})();
⚠️ Go slow! Twitter may rate-limit you. The website version handles this automatically.
Browser Console:
// Go to: x.com/YOUR_USERNAME/communities
(() => {
const $communityLinks = 'a[href^="/i/communities/"]';
const $joinedButton = 'button[aria-label^="Joined"]';
const $confirmButton = '[data-testid="confirmationSheetConfirm"]';
const $communitiesNav = 'a[aria-label="Communities"]';
const getLeftCommunities = () => {
try { return JSON.parse(sessionStorage.getItem('xactions_left_ids') || '[]'); }
catch { return []; }
};
const markAsLeft = (id) => {
const left = getLeftCommunities();
if (!left.includes(id)) {
left.push(id);
sessionStorage.setItem('xactions_left_ids', JSON.stringify(left));
}
};
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
const getCommunityId = () => {
const leftAlready = getLeftCommunities();
for (const link of document.querySelectorAll($communityLinks)) {
const match = link.href.match(/\/i\/communities\/(\d+)/);
if (match && !leftAlready.includes(match[1])) return { id: match[1], element: link };
}
return null;
};
const run = async () => {
console.log(`🚀 Left so far: ${getLeftCommunities().length}`);
await sleep(1500);
const joinedBtn = document.querySelector($joinedButton);
if (joinedBtn) {
const urlMatch = window.location.href.match(/\/i\/communities\/(\d+)/);
const currentId = urlMatch ? urlMatch[1] : null;
joinedBtn.click();
await sleep(1000);
const confirmBtn = document.querySelector($confirmButton);
if (confirmBtn) { confirmBtn.click(); if (currentId) markAsLeft(currentId); await sleep(1500); }
const communitiesLink = document.querySelector($communitiesNav);
if (communitiesLink) { communitiesLink.click(); await sleep(2500); return run(); }
}
const community = getCommunityId();
if (community) { community.element.click(); await sleep(2500); return run(); }
else { console.log(`🎉 DONE! Left ${getLeftCommunities().length} communities`); sessionStorage.removeItem('xactions_left_ids'); }
};
run();
})();
📖 Full documentation: docs/examples/leave-all-communities.md
Legend: ✅ Full Support | ⚠️ Basic/Manual | ❌ Not Available
XActions includes the most comprehensive free MCP server for X/Twitter. Works with Claude, Cursor, Windsurf, VS Code, and any MCP client.
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"xactions": {
"command": "npx",
"args": ["-y", "xactions-mcp"],
"env": {
"XACTIONS_SESSION_COOKIE": "your_auth_token_here"
}
}
}
}
Get your auth_token: x.com → DevTools (F12) → Application → Cookies → copy
auth_tokenvalue
Or auto-generate the config:
npx xactions mcp-config --client claude
npx xactions mcp-config --client cursor
npx xactions mcp-config --client windsurf
Every tool belongs to exactly one group, and the list is filterable, so a client loads only what the session needs:
npx xactions-mcp --tools read,analytics # advertise these groups only
npx xactions-mcp --exclude write,dm # or subtract from the full list
XACTIONS_MCP_TOOLS=read npx xactions-mcp # same thing through the environment
A filtered tool is neither advertised nor callable. Groups, largest first:
read, analytics, write, monitoring, data, workflows, automation,
ai, persona, spaces, graph, drafts, dm, grok, lists, auth,
plus x402 when the server runs in remote mode.
XACTIONS_MCP_REQUIRE_APPROVAL=1 npx xactions-mcp
Every tool that posts, deletes, follows, mutes or sends is then saved as a
draft instead of running. Release or bin them with x_list_drafts,
x_approve_draft and x_discard_draft, or from the shell with
xactions drafts list, xactions drafts approve <id> and
xactions drafts discard <id>.
Independently of that gate, every write is charged against a rolling 24 hour
per-account cap held in a file under ~/.xactions, so it survives a restart
and a call that would exceed it never reaches X.
npx xactions-mcp --http --port 3000 # Streamable HTTP on /mcp
stdio is the default and is what a local client wants. --http (or
MCP_TRANSPORT=http) is for remote and hosted clients; set
XACTIONS_MCP_TOKEN to require Authorization: Bearer <token> on it.
The .mcpb bundle carries the server and its dependencies and prompts for the
session cookie and the tool groups at install time. Download it from the
latest release and drag it
onto Claude Desktop > Settings > Extensions.
"Analyze @paulg's writing style and generate 3 tweet ideas about startups in his voice" → Scrapes tweets → analyzes voice → generates content with AI
"Find everyone I follow who doesn't follow me back, sorted by follower count" → Uses x_get_following + x_get_followers → computes diff → formats results
"Compare the engagement metrics of @openai, @anthropic, and @google" → Scrapes profiles + recent tweets → computes avg engagement → presents comparison
📖 Full setup guide: docs/mcp-setup.md
AI agents can join live X Spaces, listen to conversations, and speak autonomously using voice AI. Powered by the xspace-agent SDK.
npm install xactions xspace-agent
Set your credentials:
export X_AUTH_TOKEN="your_auth_token" # From x.com cookies
export X_CT0="your_ct0_token" # From x.com cookies
export OPENAI_API_KEY="sk-..." # Or ANTHROPIC_API_KEY / GROQ_API_KEY
MCP (Claude Desktop / Cursor):
"Join this Space as an AI agent: https://x.com/i/spaces/1abc123"
Claude calls x_space_join and your agent enters the Space.
Node.js:
import { joinSpace, leaveSpace } from 'xactions/spaces/agent';
await joinSpace({
url: 'https://x.com/i/spaces/1abc123',
provider: 'openai',
systemPrompt: 'You are a helpful AI participant. Keep responses concise.',
});
// Later...
const summary = await leaveSpace();
// { duration: '300s', transcriptions: 42, responses: 8 }
MCP Tools:
📖 Full guide: docs/spaces-agent.md: configuration, environment variables, events, multi-agent setup, and examples.
56 commands, grouped by task, with 85 subcommands under them. Run xactions
with no arguments for the grouped screen, xactions help <command> for one
command, and xactions completion bash|zsh|fish for tab completion generated
from the live command tree.
Start here quickstart doctor connect login logout mcp-config skills drafts info
xactions quickstart # guided first run, adapts to what you already have
xactions doctor # what works right now, and what each failure needs
xactions connect # log in through a real browser, no DevTools
xactions login --from-browser chrome # or read cookies from an installed browser
xactions login --cookies-file cookies.txt # or import a cookie export
xactions skills install --all # 50 agent skills into Claude Code, Cursor, Codex, Windsurf
xactions drafts list # MCP writes waiting for your approval
Read an account (no login needed) profile tweets thread media analyze report history snapshot
xactions profile NASA
xactions tweets NASA --limit 50 --output nasa.csv
xactions thread https://x.com/NASA/status/1234567890
xactions media NASA --limit 30
xactions analyze NASA SpaceX # engagement rate, cadence, content mix, best hour
Followers and audience followers following non-followers audience crm graph
xactions followers YOUR_USERNAME --limit 1000 --output followers.json
xactions non-followers YOUR_USERNAME # who does not follow back
xactions audience nasa spacex # follower overlap between two accounts
xactions graph build nasa # build and analyse a social graph
Search and monitor search hashtag scrape platforms monitor sentiment rss stream
xactions search "your brand" --filter latest --limit 50
xactions hashtag ai --limit 50
xactions monitor yourbrand # sentiment over time
xactions stream start tweet nasa # tweet, follower or mention streams
Write and grow engage ai optimize hashtags predict variations evergreen persona schedule bulk
xactions engage USERNAME --like --repost --comment --prompt "supportive, one honest question"
xactions ai generate "shipping fast" --voice nichxbt
xactions evergreen YOUR_USERNAME # find and recycle top performers
xactions persona run my-persona
Automate workflow agent notify plugin team dataset
xactions workflow run daily-digest
xactions notify test slack
Move data export export-data archive import convert migrate diff
xactions export YOUR_USERNAME # profile, tweets, followers, following, bookmarks
xactions archive summary ~/Downloads/twitter-archive.zip
xactions archive migrate ~/Downloads/twitter-archive.zip --to bluesky --execute
xactions diff exports/january exports/february
Low level client
xactions client profile nasa # the raw HTTP client, no browser at all
Global on every read command:
xactions profile NASA --compact # one record per line, key=value
xactions tweets NASA --limit 200 --fields id,likes,text --compact
xactions tweets NASA --limit 200 --json | jq 'sort_by(-.likes) | .[:5]'
--compact prints tab-separated key=value pairs with no colours or spinners.
--fields narrows that to the columns you name, in the order you name them.
--json prints the full structured object and outranks --output, so a pipe is
never silently turned into a file write. If both --compact and --json are
passed, --compact wins.
Public reads work with no account: profile, tweets, thread, media,
analyze, hashtag. Search, followers, following, non-followers, likes,
bookmarks and DMs need a session. Full reference:
docs/cli-reference.md.
import {
createBrowser,
createPage,
loginWithCookie,
scrapeProfile,
scrapeFollowers,
scrapeFollowing,
scrapeTweets,
searchTweets,
exportToJSON,
exportToCSV
} from 'xactions';
// Initialize
const browser = await createBrowser({ headless: true });
const page = await createPage(browser);
// Optional: Login for private data
await loginWithCookie(page, 'your_auth_token_cookie');
// Scrape profile
const profile = await scrapeProfile(page, 'elonmusk');
// Scrape followers with progress
const followers = await scrapeFollowers(page, 'elonmusk', {
limit: 1000,
onProgress: ({ scraped, limit }) => console.log(`${scraped}/${limit}`)
});
// Export data
await exportToJSON(followers, 'followers.json');
await exportToCSV(followers, 'followers.csv');
await browser.close();
// Profile
scrapeProfile(page, username)
// Followers & Following
scrapeFollowers(page, username, { limit, onProgress })
scrapeFollowing(page, username, { limit, onProgress })
// Tweets
scrapeTweets(page, username, { limit, includeReplies, onProgress })
searchTweets(page, query, { limit, filter: 'latest'|'top' })
scrapeThread(page, tweetUrl)
scrapeHashtag(page, hashtag, { limit, filter })
// Media
scrapeMedia(page, username, { limit })
scrapeLikes(page, tweetUrl, { limit })
// Lists
scrapeListMembers(page, listUrl, { limit })
// Export
exportToJSON(data, filename)
exportToCSV(data, filename)
Visit xactions.app for a no-code solution
Use browser scripts · Copy-paste console scripts · View tutorials
100% Free. No API keys, no payments, no limits.
Rate Limiting: Built-in 1-3s delays, human-like scrolling, auto-pause on rate limits
Auth Token: x.com → DevTools (F12) → Application → Cookies → copy auth_token
[!CAUTION] Do: Use 2–5s delays · Mix automated with manual activity · Test with small batches
Don't: Mass-follow thousands/day · Run 24/7 · Spam comments
Every top-level directory, so nothing here is a surprise.
src/ The library. cli/ mcp/ scrapers/ client/ automation/ agents/
analytics/ streaming/ workflows/ plugins/ portability/ graph/
a2a/ spaces/ ai/ auth/ scheduler/ notifications/, plus the
browser console scripts that sit at the top level
api/ Express REST API: routes/ services/ middleware/ realtime/
bin/ Legacy command name (unfollowx), forwards to the CLI
packages/ xactions-mcp, the thin MCP wrapper published to npm
skills/ 50 Agent Skills, one directory each
extension/ Chrome and Edge extension (Manifest V3)
integrations/ Third-party glue (n8n and friends)
worker/ Cloudflare Worker entry point
functions/ Cloudflare Pages Functions for the /api/* edge surface
site/ The marketing landing page served at /
dashboard/ The signed-in app shell at /dashboard, plus the generated
docs, guides, skills and script pages the site serves
public/ Static assets: OG images, robots.txt, sitemap
playground/ Standalone in-browser playground
docs/ Documentation source (Markdown)
tutorials/ Guided walkthroughs
examples/ Runnable programs, from a profile lookup to the MCP draft gate
prompts/ Prompt library for coding agents
tests/ Vitest suite
scripts/ The 95 browser console scripts, plus build, docs and
maintenance tooling. twitter/ holds standalone console variants
config/ Agent, niche and persona configuration
prisma/ Database schema and migrations
deploy/ Cloudflare and GCP deployment assets
types/ TypeScript declarations
data/ Runtime output (gitignored, keeps a .gitkeep)
archive/ Retired code, kept for reference. Do not modify
python/ xeepy, the Python twin of the library
xspace-agents/ The Spaces agent monorepo
Both python/ and xspace-agents/ are self-contained projects that live in this
repository but build on their own. Start from their READMEs, not this one.
Contributions welcome. See CONTRIBUTING.md, and AGENTS.md for the repository map and the three runtime contexts.
git clone https://github.com/nirholas/xactions.git
cd xactions && npm install
npm run cli -- profile elonmusk # run the CLI from the source tree
npm run mcp # run the MCP server
Node.js 22.12 or newer is required (engines.node is >=22.12); CI runs the
suite on 22 and 24. Three commands before you open a PR, all of which run in CI:
npm test # the whole suite, offline, under a minute
npm run lint # ESLint over the repo
npm run docs:check # dead links, stale counts, invented CLI commands
Thanks to everyone whose code, bug reports and investigations made XActions better, including @RandyLu87, @ni3a, @nelsongallardo, @azeezalhajj570-ai, @stone-w4tch3r and @avner-assistant. The full list, with what each person found or built, is in CONTRIBUTORS.md. A precise bug report earns a place there as surely as a merged PR.
If XActions saved you from paying $100/mo for Twitter's API, star the repo: it's how open source grows.
XActions is 100% free and open source. Visit xactions.app for interactive tutorials.
NEW! Run scripts without any coding knowledge:
No console, no code, no setup!
stdio is the default transport and is what a local client wants. For a remote
or hosted client, the same server speaks
MCP Streamable HTTP
on /mcp, with the same 154 tools and the same tool-group filtering:
npx xactions-mcp --http --port 3000
# or: MCP_TRANSPORT=http PORT=3000 npx xactions-mcp
Require a token on it by setting XACTIONS_MCP_TOKEN; clients then send
Authorization: Bearer <token>.
{
"mcpServers": {
"xactions": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Deploying it somewhere public? Run it behind TLS with XACTIONS_MCP_TOKEN set,
and prefer a narrow tool set (--tools read,analytics) over the full list.
Dockerfile and docs/deployment.md cover
Railway, Fly.io, Docker and Cloudflare.
Extended feature-by-feature comparison with every alternative.
Comparison reflects each project's public README at time of writing (August 2026); open an issue if a column is out of date.
Full documentation site: https://nirholas.github.io/XActions/
If XActions saves you time, star it on GitHub. Stars are how other developers and AI agents find the repositories worth trusting, and they cost you one click.
Know someone who would use it? Post on X · Share on Bluesky · Share on LinkedIn · Submit to Hacker News · Share on Reddit
Coding agents and LLM tooling can read this repo directly: AGENTS.md, llms.txt, llms-full.txt. Point an agent at https://github.com/nirholas/XActions and it has the context it needs.
X/Twitter automation toolkit: scrapers, CLI and an MCP server with approval-gated write actions, no paid API.
{ "mcpServers": { "nirholas-xactions": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "X_COOKIES": "<secret>", "X_USERNAME": "<value>", "X_PASSWORD": "<secret>" } } }}Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
El publicador indica estas variables de entorno: X_COOKIES, X_USERNAME, X_PASSWORD.
XActions se ejecuta localmente por stdio.
Última comprobación: 2026-11-14. X/Twitter automation toolkit: scrapers, CLI and an MCP server with approval-gated write actions, no paid API.