XActions MCP Server
The definitive free Twitter/X MCP server. 153 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
xgetprofile, xgetfollowers, xgetfollowing, xgetnonfollowers, xgettweets, xsearchtweets, xgetthread, xdownload_video
Actions
xfollow, xunfollow, xunfollownonfollowers, xposttweet, xlike, xretweet, xdeletetweet, xreply, xbookmark, xgetbookmarks, xclearbookmarks, xautolike, xengage
Analysis
xdetectunfollowers, xbesttimetopost, xanalyzesentiment, xmonitorreputation, xreputationreport, xcompetitoranalysis, xbrandmonitor
Profile & Settings
xupdateprofile, xgetsettings, xtoggleprotected, xgetblocked, xcheckpremium
Content
xpostthread, xcreatepoll, xschedulepost, xpublisharticle
Discovery
xgettrends, xgetexplore
Messaging
xsenddm, xgetconversations, xexportdms
AI (requires OPENROUTERAPIKEY)
xanalyzevoice, xgeneratetweet, xrewritetweet, xsummarizethread
Advanced
- Streaming:
xstreamstart/stop/list/pause/resume/status/history
- Workflows:
xworkflowcreate/run/list/actions
- Social Graph:
xgraphbuild/analyze/recommendations/list
- Portability:
xexportaccount/migrateaccount/diffexports
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 |
XACTIONSSESSIONCOOKIE |
Yes |
X auth_token for authentication |
OPENROUTERAPIKEY |
No |
Enables AI tools (voice analysis, tweet generation) |
Full Documentation
See docs/mcp-setup.md for complete setup guide with troubleshooting.