Tutorial: Setting Up XActions MCP Server with Claude
You are helping me set up the XActions MCP server so I can control my X/Twitter account directly from this Claude chat. Walk me through every step like I'm a beginner. Be thorough but friendly.
Context
XActions is an open-source X/Twitter automation toolkit (https://github.com/nirholas/XActions). It includes an MCP (Model Context Protocol) server that gives you, Claude, the ability to directly interact with X/Twitter — scrape profiles, manage followers, post tweets, search, and more — all through natural conversation with me.
The MCP server is located at src/mcp/server.js in the XActions package.
What I Need You To Do
Step 1: Installation
Walk me through installing XActions. Cover both methods:
npm install xactions(for using as a package)- Cloning the repo from GitHub
Make sure I have Node.js 18+ installed. If I don't, help me install it.
Step 2: Claude Desktop Configuration
Help me configure my claude_desktop_config.json file. The location depends on my OS:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
The config should look like this:
{
"mcpServers": {
"xactions": {
"command": "npx",
"args": ["xactions", "mcp"],
"env": {}
}
}
}
Or if installed from source:
{
"mcpServers": {
"xactions": {
"command": "node",
"args": ["/full/path/to/xactions/src/mcp/server.js"],
"env": {}
}
}
}
Remind me to restart Claude Desktop after saving.
Step 3: Getting My Auth Token
Walk me through getting my auth_token cookie from X.com:
- Open x.com in my browser and make sure I'm logged in
- Open Developer Tools (F12 or Cmd+Option+I on Mac)
- Go to Application tab → Cookies → x.com
- Find
auth_tokenand copy the value - Warn me: never share this publicly, it gives full access to my account
Step 4: First Connection Test
Once the MCP server is connected, have me test with these commands:
- Login: "Login to X with this auth token: [my_token]"
- Get my profile: "Get my X profile for [my_username]"
- Check followers: "How many followers do I have?"
Step 5: Show Me What's Possible
After setup is confirmed working, give me a tour of ALL 12 core MCP tools:
x_login— Authenticate with session cookiex_get_profile— Get any user's profile infox_get_followers— Scrape a user's followers listx_get_following— See who someone followsx_get_non_followers— Find people who don't follow you backx_get_tweets— Scrape recent tweets from any accountx_search_tweets— Search tweets with advanced operatorsx_follow/x_unfollow— Follow or unfollow usersx_post_tweet— Post a tweetx_like— Like a tweet by URLx_retweet— Retweet by URL
And the extended tools:
x_post_thread— Post multi-tweet threadsx_create_poll— Create pollsx_schedule_post— Schedule future postsx_reply— Reply to tweetsx_bookmark/x_get_bookmarks/x_clear_bookmarks— Bookmark managementx_auto_like— Auto-like by keywordsx_get_trends/x_get_explore— Discover trending contentx_get_notifications— Read notificationsx_send_dm/x_get_conversations/x_export_dms— DM managementx_grok_query/x_grok_summarize— Grok AI integrationx_update_profile— Edit your profilex_brand_monitor— Monitor brand mentions with sentimentx_competitor_analysis— Compare competitor accountsx_get_analytics/x_get_post_analytics— Engagement analyticsx_creator_analytics— Creator dashboard statsx_publish_article— Publish long-form articlesx_get_spaces/x_scrape_space— Spaces discoveryx_stream_start/x_stream_stop— Real-time event streaming
Give me 3 quick example prompts for each category so I can start using them immediately.
Step 6: Troubleshooting
Cover common issues:
- "Server not connecting" → Check config path, restart Claude Desktop, verify Node.js version
- "Authentication failing" → Cookie may have expired, get a fresh one
- "Empty results" → Account might be private, or rate limited
- "Cannot find module" → Run
npm installin the xactions directory
Important Notes
- The MCP server uses Puppeteer (headless Chrome) for browser automation
- It includes built-in rate limiting with human-like delays
- My auth_token is only stored in memory during the session
- All operations are free — no Twitter API key needed
Please walk me through this step by step, checking in with me after each step before moving on.
⚡ Explore XActions
100% free and open-source. No API keys, no fees, no signup.
Browse All Documentation