xengager-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xengager-mcp
X (Twitter) engagement via Model Context Protocol — programmatic access through a headless browser.
24 tools across 6 domains: search, timelines, notifications, bookmarks, profiles, and tweet interactions. Designed for Claude Code, Cursor, and any MCP-compatible client.
Features
Domain | Tools | Description |
Timeline |
| Home feed, following feed, explore tab, trending topics |
Search |
| Full-text search with operators ( |
Notifications |
| All notifications or filtered to mentions, with pagination |
Bookmarks |
| Authenticated user's saved tweets |
Profile |
| Full profile access including media, articles, and social graph |
Tweet Actions |
| Read, engage, compose, and post threads |
All tools are idempotent and return errors inside the JSON payload — never as MCP protocol errors.
Related MCP server: X Twitter Scraper
Architecture
┌──────────────────────────────────────────┐
│ MCP Client (Claude Code, Cursor, etc.) │
└──────────────────┬───────────────────────┘
│ Streamable HTTP / stdio
┌──────────────────▼───────────────────────┐
│ xengager-mcp Server │
│ ┌──────────┐ ┌──────────────────────┐ │
│ │ GraphQL │ │ DOM Scraping │ │
│ │ (primary) │ │ (Puppeteer fallback) │ │
│ └──────────┘ └──────────────────────┘ │
│ ┌──────────────────────────────────────┐│
│ │ Puppeteer + stealth plugin ││
│ │ (anti-bot detection evasion) ││
│ └──────────────────────────────────────┘│
└──────────────────────────────────────────┘GraphQL-first: Most read operations use X's internal GraphQL API for speed and reliability
DOM fallback: Actions (like, repost, reply) use Puppeteer with randomized delays and human-like mouse movement
Single browser instance: All tools share one page — calls are serialized naturally via MCP transport
Prerequisites
Bun ≥ 1.1
Chrome/Chromium (auto-installed by Puppeteer, or use system Chrome in Docker)
X (Twitter) account with valid auth cookies
Obtaining X Credentials
Log into x.com in Chrome
Open DevTools → Application → Cookies → x.com
Copy the values for
auth_tokenandct0
Quick Start
# Clone and install
git clone https://github.com/YOUR_USERNAME/xengager-mcp.git
cd xengager-mcp
bun install
# Configure credentials
cp .env.example .env
# Edit .env — paste your X_AUTH_TOKEN and X_CT0 values
# Run (stdio transport — for local MCP integration)
bun run stdio
# Or run as HTTP server (for remote/Cloudflare Tunnel setups)
bun run startDocker
# With Cloudflare Tunnel (public MCP endpoint, requires CLOUDFLARE_TUNNEL_TOKEN in .env)
docker compose up
# Without tunnel
docker compose up mcpThe Cloudflare Tunnel URL is configured via TUNNEL_HOSTNAME in .env and printed on startup. Point your MCP client at it.
MCP Client Configuration
Claude Code
{
"mcpServers": {
"xengager": {
"command": "bun",
"args": ["run", "stdio"],
"cwd": "/path/to/xengager-mcp"
}
}
}Remote (Cloudflare Tunnel)
{
"mcpServers": {
"xengager": {
"type": "http",
"url": "https://your-tunnel.yourdomain.com/mcp",
"headers": {
"Authorization": "Bearer your-mcp-api-key"
}
}
}
}Set MCP_API_KEY in .env to enable Bearer token authentication on the HTTP server.
Quick Usage Examples
"What's trending?" → x_trends
"Search for AI news" → x_search("AI news", tab: "top")
"Show me @OpenAI's tweets" → x_user_posts("OpenAI")
"Get my notifications" → x_notifications
"Like and bookmark this" → x_like(url) → x_bookmark(url)
"Post a thread" → x_post_tweet(["Part 1", "Part 2", "Part 3"])See SKILL.md for the complete agent usage guide with response shapes, pagination patterns, and workflow recipes.
Environment Variables
Variable | Required | Description |
| Yes | X.com |
| Yes | X.com |
| No | HTTP server port (default: 3000) |
| No | Bearer token for HTTP auth |
| No | Comma-separated CORS origins (default: *) |
| No | Tunnel token from Cloudflare Zero Trust dashboard |
| No | Static hostname for the tunnel (e.g., |
Testing
bun testTests cover browser lifecycle, pagination logic, GraphQL client/parser/cache, and individual tools.
License
MIT © [Your Name]
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server from TwitterAPI.io that gives AI agents read-only access to Twitter/X data. 12 tools: tweet search with X operators, user profiles, a user's latest tweets, followers and followings, replies, quotes, retweeters, mentions and trends. Connect at https://mcp.twitterapi.io/mcp with a TwitterAPI.io API key or account sign-in; usage is paid per result returned.
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Live X/Twitter data: profiles, tweets, search, followers, lists and trends. 29 read-only tools.
Related MCP Servers
- AlicenseCqualityDmaintenanceA comprehensive MCP server for X/Twitter featuring over 70 tools for research, engagement, and publishing with granular permission-based access control. It includes specialized Playwright-powered tools for fetching X articles and supports extensive account management and thread operations.6319MIT
- AlicenseAqualityAmaintenanceReal-time X (Twitter) data platform with 2 MCP tools covering 120+ REST API endpoints. Search tweets, look up users, get timelines, extract followers/likes/retweets in bulk, monitor accounts, run giveaway draws, and perform write actions (tweet, like, retweet, follow, DM). OAuth 2.1 authentication with PKCE.2796 npm229MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to automate Twitter/X tasks (scraping, posting, following, etc.) via 140+ MCP tools, no API key required.440 npm1Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI agents to interact with X (Twitter) through its private GraphQL API using session cookies, supporting tweets, replies, likes, retweets, searches, direct messages, and more. Provides 24 MCP tools for full account automation.241,582 npm4MIT