loading…
Search for a command to run...
loading…
A comprehensive MCP server for X/Twitter featuring over 70 tools for research, engagement, and publishing with granular permission-based access control. It incl
A 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.
The most comprehensive MCP server for X/Twitter with permission-based access control, 70+ tools, and Playwright-powered article fetching.
pip install "xmcp[articles] @ git+https://github.com/vibeforge1111/xmcp.git"
python -m playwright install chromium
Note: The package name is xmcp and the server command is xmcp-server.
XMCP requires X/Twitter API credentials to run. If you see errors about missing API keys, follow this quick guide:
.env.example to .env and paste your keys.Common error messages and fixes:
.env or your MCP config.Get your credentials from developer.twitter.com:
You can store them in a local .env file:
# Windows (PowerShell)
copy .env.example .env
# macOS/Linux
cp .env.example .env
Do not commit .env. It is ignored by default.
Add to your Claude settings (~/.claude.json):
{
"mcpServers": {
"xmcp": {
"type": "stdio",
"command": "xmcp-server",
"env": {
"TWITTER_API_KEY": "your_key",
"TWITTER_API_SECRET": "your_secret",
"TWITTER_ACCESS_TOKEN": "your_token",
"TWITTER_ACCESS_TOKEN_SECRET": "your_token_secret",
"TWITTER_BEARER_TOKEN": "your_bearer",
"X_MCP_PROFILE": "researcher"
}
}
}
}
If you name the server xmcp, tools will appear as mcp__xmcp__* in clients that show tool prefixes.
"Search for tweets about AI" -> search_twitter
"Read this article: x.com/..." -> get_article (Playwright)
"Post: Hello world!" -> post_tweet (requires creator profile)
Choose what capabilities to enable:
| Profile | Tools | Use Case |
|---|---|---|
| researcher | 23 | Monitoring, analysis, research (read-only) |
| creator | 41 | Content creation, audience engagement |
| manager | 55 | Full account management |
| automation | 70 | Bots, full automation (including DMs) |
| custom | varies | Pick exactly what you need |
"env": {
"X_MCP_PROFILE": "creator"
}
Permissions are evaluated at runtime. You can switch profiles or groups without restarting the server.
"env": {
"X_MCP_PROFILE": "custom",
"X_MCP_GROUPS": "research,engage,publish"
}
Search, user lookup, tweet details, timelines, trends, article fetching
Like, unlike, bookmark, retweet, unretweet
Post tweet, delete, quote, create thread, polls
Follow, unfollow, block, unblock, mute, unmute
Get full threads, replies, quote tweets, hide/unhide replies
Create, delete, manage lists and members
Send and read direct messages
Get authenticated user profile
| Tool | Description |
|---|---|
search_twitter |
Search with full engagement metrics |
search_articles |
Find tweets containing X articles |
get_trends |
Worldwide trending topics |
get_article |
Fetch article content (Playwright) |
| Tool | Description |
|---|---|
get_user_by_screen_name |
User by @handle |
get_user_profile |
User by ID with metrics |
get_tweet_details |
Full tweet info |
get_conversation |
Complete thread |
get_replies |
Replies to a tweet |
| Tool | Description |
|---|---|
favorite_tweet |
Like |
retweet |
Retweet |
bookmark_tweet |
Bookmark |
quote_tweet |
Quote with comment |
| Tool | Description |
|---|---|
post_tweet |
Post with media, tags, reply |
create_thread |
Post multiple tweets as thread |
create_poll_tweet |
Create a poll |
| Tool | Description |
|---|---|
follow_user / unfollow_user |
Follow management |
block_user / unblock_user |
Block management |
mute_user / unmute_user |
Mute management |
This MCP is designed to improve research and workflows, not to replace human judgment.
Publishing tools return an advisory field that recommends a human review for posts and replies.
You can drive real-time workflows by polling tools on a schedule from your client or a cron job. Common patterns:
get_trendssearch_twittersearch_articles + get_articleThis keeps the server simple while still enabling real-time visibility.
X articles require JavaScript to render. This MCP uses Playwright.
# Correct - uses Playwright internally
result = await get_article("https://x.com/user/status/123")
# Returns: {title, author, content, url}
# WRONG - will fail
WebFetch("https://x.com/...") # Returns empty content
pip install playwright
python -m playwright install chromium
| Variable | Description | Default |
|---|---|---|
X_MCP_PROFILE |
Permission profile | researcher |
X_MCP_GROUPS |
Groups for custom profile | research |
X_MCP_DISABLED_TOOLS |
Tools to disable | none |
X_MCP_ENABLED_TOOLS |
Tools to force-enable | none |
Credentials are read locally and only used to authenticate requests to X/Twitter.
Research only (safest):
"X_MCP_PROFILE": "researcher"
Content creator:
"X_MCP_PROFILE": "creator"
Custom - research + likes only:
"X_MCP_PROFILE": "custom",
"X_MCP_GROUPS": "research,engage",
"X_MCP_DISABLED_TOOLS": "retweet,unretweet"
Permissions are evaluated at runtime. This means you can:
Errors return a consistent envelope:
{
"ok": false,
"error": {
"type": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"status": 429,
"details": {
"action_type": "tweet_actions",
"retry_after_seconds": 10
}
},
"tool": "post_tweet",
"timestamp": "2026-02-03T12:00:00+00:00"
}
Built-in protection:
| Action | Limit | Window |
|---|---|---|
| Tweets | 300 | 15 min |
| Likes | 1000 | 24 hours |
| Follows | 400 | 24 hours |
| DMs | 1000 | 15 min |
Note: These limits are local guardrails, not official Twitter API limits.
get_user_followers_you_know and get_highlights_tweets are simulated with available API datavote_on_poll returns not_supported because the API does not support programmatic votingWorks with all major MCP clients. See COMPATIBILITY.md for full setup guides.
| Client | Config Location | Status |
|---|---|---|
| Claude Desktop | ~/.claude.json |
Native |
| Claude Code | CLAUDE.md |
Native |
| Cursor | .cursorrules |
Native |
| Cline | .clinerules |
Native |
| Windsurf | .windsurfrules |
Native |
| Continue.dev | .continue/mcpServers/ |
Native |
| OpenClaw | ~/.openclaw/skills/ |
Native |
| Zed | .zed/settings.json |
Native |
| ChatGPT Desktop | ~/.chatgpt/mcp.json |
Native |
| Sourcegraph Cody | OpenCTX | Native |
| Firebase Genkit | genkitx-mcp plugin | Plugin |
| Taal | taal.yaml (sync all) |
Sync |
| VS Code + OpenMCP | Extension settings | Plugin |
| Ollama + Continue | Continue config | Native |
Ready-to-use configs in configs/ directory:
configs/
|-- continue.yaml # Continue.dev (YAML)
|-- continue.json # Continue.dev (JSON)
|-- openclaw-skill.yaml # OpenClaw skill
|-- zed-settings.json # Zed editor
|-- chatgpt-mcp.json # ChatGPT Desktop
|-- taal.yaml # Taal cross-client sync
|-- sourcegraph-openctx.json # Sourcegraph Cody
|-- genkit-plugin.ts # Firebase Genkit
`-- vscode-openmcp.json # VS Code OpenMCP
This package includes rules files for AI code editors:
| File | Editor |
|---|---|
.cursorrules |
Cursor |
.clinerules |
Cline |
.windsurfrules |
Windsurf |
CLAUDE.md |
Claude Code |
LLM_CONTEXT.md |
Any LLM (copy to prompt) |
docs/AGENT_RULES.md |
Comprehensive rules |
Key rule: Use get_article for X URLs, not WebFetch.
For cloud deployments:
xmcp-http # Runs on port 8081
PORT=8080 xmcp-http # Custom port
pip install "xmcp[articles] @ git+https://github.com/vibeforge1111/xmcp.git"
pip install xmcp[articles]
git clone https://github.com/vibeforge1111/xmcp.git
cd xmcp
pip install -e .[articles]
python -m playwright install chromium
| Document | Description |
|---|---|
| README.md | This file - full documentation |
| QUICKSTART.md | 5-minute setup guide |
| CLAUDE.md | Instructions for AI agents |
| LLM_CONTEXT.md | Context block for LLM prompts |
| docs/AGENT_RULES.md | Rules for all AI editors |
Built on the upstream project by Rafal Janicki:
https://github.com/rafaljanicki/x-twitter-mcp-server
See CHANGELOG.md for a summary of enhancements made in XMCP.
Enhanced by VibeShip with:
MIT License - see LICENSE
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"xmcp": {
"command": "npx",
"args": []
}
}
}