x-mcp-playwright
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@x-mcp-playwrightsearch for tweets about #AI from @OpenAI with at least 50 likes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
x-mcp-playwright v1.3.0
Stealth Twitter/X MCP server powered by Patchright (stealth Playwright fork), persistent multi-profile sessions, WebRTC leak protection, and humanized keystroke dynamics.
9 grouped tools - 33 actions preserved, zero functionality lost.
Features
Stealth & Anti-Detection: Patchright engine with WebRTC leak prevention, randomized keystroke intervals (
human_type), and browser fingerprint masking.Proxy Support (HTTP/HTTPS/SOCKS5): Route all traffic through custom proxies or
ssh-mcpSOCKS5 tunnels (X_MCP_PROXY="socks5://127.0.0.1:1080").Fast Media Route Blocking: Automatically aborts images, heavy media, fonts, and telemetry during search and scraping operations for up to 3x speedup and 75% RAM reduction.
Multi-Profile Session Management: Easily switch between accounts via
X_MCP_PROFILE="account_name".9 Grouped Tools: Posting, engagement, search, feed browsing, tweet analytics, DMs, list management, session status.
Related MCP server: X MCP Server
Installation
Option 1: Instant via uvx (Recommended)
Add directly to your MCP client configuration (claude_desktop_config.json, opencode.json, etc.):
{
"mcpServers": {
"x-twitter": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Steph-ux/x-mcp-playwright.git", "x-mcp-server"],
"env": {
"X_MCP_HEADLESS": "1"
}
}
}
}Option 2: Via pip install
pip install git+https://github.com/Steph-ux/x-mcp-playwright.git
patchright install chromiumThen in your MCP config:
{
"mcpServers": {
"x-twitter": {
"command": "x-mcp-server",
"env": {
"X_MCP_HEADLESS": "1"
}
}
}
}Option 3: Local Clone
git clone https://github.com/Steph-ux/x-mcp-playwright.git
cd x-mcp-playwright
pip install -e .
patchright install chromiumOne-Time Interactive Login
To authenticate your session:
x-mcp-login [optional_profile_name]
# or: python login.py [optional_profile_name]This opens a browser window. Log into your X/Twitter account (complete 2FA if enabled). Once you reach x.com/home, the session is automatically saved to ~/.x-mcp-playwright/profiles/<profile_name>/.
Environment Variables
Variable | Default | Description |
|
|
|
|
| Name of the active profile directory |
|
| Proxy URL (ex: |
|
| Default page navigation timeout in milliseconds |
|
| Debug screenshot directory |
|
|
|
Tool Catalog (9 Tools, 33 Actions)
1. x_post - Publish Tweets & Threads (6 Actions)
post: Post single tweet (text)thread: Post connected thread (tweetslist)post_media: Post with images/video (text,media_paths)reply: Reply to tweet (tweet_url,reply_text)quote: Quote tweet (tweet_url,comment)delete: Delete own tweet (tweet_url)
2. x_engage - Interact with Tweets (4 Actions)
like: Like/unlike (tweet_url,on=True|False)retweet: RT/un-RT (tweet_url,on=True|False)bookmark: Save/remove bookmark (tweet_url,on=True|False)pin: Pin/unpin (tweet_url,on=True|False)
3. x_user - User & Profile Operations (6 Actions)
profile: Fetch user bio and stats (handle)timeline: Fetch user tweets (handle,tab="tweets"|"likes"|"media",limit)connections: Fetch followers/following (handle,kind="followers"|"following",limit)follow: Follow/unfollow user (handle,on=True|False)block: Block user (handle)mute: Mute user (handle)
4. x_search - Simple & Advanced Search
Search query with filters (
query,filter="top"|"latest"|"people"|"media",from_user,to_user,since,until,min_likes,min_retweets,lang,limit)
5. x_feed - Browse Timelines & Notifications (4 Actions)
home: Home timeline (tab="for_you"|"following",limit)bookmarks: Saved bookmarks (limit)notifications: Mentions, likes, follows (limit)trending: Current trends (limit)
6. x_tweet - Tweet Details & Metrics (4 Actions)
details: Full tweet metrics and text (tweet_url)replies: Thread replies under tweet (tweet_url,limit)analytics: Impressions & engagement data for own tweets (tweet_url)engagers: Who liked or retweeted (tweet_url,kind="likes"|"retweets")
7. x_list - List Operations
User lists and list feeds (
list_id,handle,limit)
8. x_dm - Direct Messages (3 Actions)
send: Send direct message with human keystrokes (handle,message)conversations: List active DM conversations (limit)messages: Read conversation messages (handle,limit)
9. x_session - Session & Diagnostic Operations
check: Validate login status and active account handlescreenshot: Capture debug screenshot of any page (url,full_page)
Testing
python -m unittest tests.test_smoke -vLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native
X (Twitter) data for AI agents: tweets, profiles, followers, search, trends + social listening.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Related MCP Servers
FlicenseNot gradedqualityFmaintenanceA local MCP server that exposes the X API (formerly Twitter API) as tools, enabling operations like posting, searching, user management, and more via natural language commands.856-- AlicenseBqualityDmaintenanceMCP server for interacting with the X platform (Twitter) via MCP clients like Claude, Cursor AI, and Windsurf AI.2011 npm6MIT
- AlicenseNot gradedqualityDmaintenanceProvides programmatic X (Twitter) engagement via MCP, offering 24 tools for search, timelines, notifications, bookmarks, profiles, and tweet actions through a headless browser.MIT
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X read API, enabling search, user profiles, tweets, followers, and more via natural language.94303 npmMIT