MCP server/communication

XMCP Server

The most comprehensive MCP server for X/Twitter with 70+ tools

★ 18vibeforge1111/xmcp ↗by vibeforge1111updated
1

Add it to Claude Code

claude mcp add -e "TWITTER_API_KEY=${TWITTER_API_KEY}" -e "TWITTER_API_SECRET=${TWITTER_API_SECRET}" -e "TWITTER_ACCESS_TOKEN=${TWITTER_ACCESS_TOKEN}" -e "TWITTER_ACCESS_TOKEN_SECRET=${TWITTER_ACCESS_TOKEN_SECRET}" -e "TWITTER_BEARER_TOKEN=${TWITTER_BEARER_TOKEN}" xmcp -- xmcp-server
Required:TWITTER_API_KEYTWITTER_API_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETTWITTER_BEARER_TOKEN+ 1 optional
2

Make your agent remember this setup

xmcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • 70+ tools covering research, engagement, publishing, and account management
  • Permission-based access control with runtime enforcement
  • Playwright-powered article fetching for X articles
  • Full engagement metrics and thread support
  • Customizable profiles for different use cases like research or automation

Tools 6

search_twitterSearch for tweets with full engagement metrics
get_articleFetch article content using Playwright
post_tweetPost a tweet with media, tags, or as a reply
get_user_by_screen_nameLook up a user by their @handle
get_conversationRetrieve a complete thread or conversation
favorite_tweetLike a specific tweet

Environment Variables

TWITTER_API_KEYrequiredX API Key
TWITTER_API_SECRETrequiredX API Secret
TWITTER_ACCESS_TOKENrequiredX Access Token
TWITTER_ACCESS_TOKEN_SECRETrequiredX Access Token Secret
TWITTER_BEARER_TOKENrequiredX Bearer Token
X_MCP_PROFILEPermission profile (researcher, creator, manager, automation, custom)

Try it

Search for recent tweets about AI developments and summarize the sentiment.
Fetch the content of this X article link: [url] and provide a bulleted summary.
Get the full conversation thread for this tweet ID: [id].
Post a new tweet saying 'Hello world!' to my followers.
Find the user profile for @handle and list their recent engagement metrics.
Original README from vibeforge1111/xmcp

XMCP

The most comprehensive MCP server for X/Twitter with permission-based access control, 70+ tools, and Playwright-powered article fetching.

Highlights

  • 70+ tools across research, engagement, publishing, social, lists, DMs
  • Permission profiles with runtime enforcement
  • Playwright-powered article fetching for X articles
  • Full engagement metrics and thread support
  • Broad MCP client compatibility

Quick Start

1. Install

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.

2. Get API Keys (Required)

XMCP requires X/Twitter API credentials to run. If you see errors about missing API keys, follow this quick guide:

  1. Go to https://developer.twitter.com and sign in.
  2. Create a Project and App (or open an existing one).
  3. In the App Keys and Tokens tab, generate:
    • API Key and API Secret
    • Access Token and Access Token Secret
    • Bearer Token
  4. Copy .env.example to .env and paste your keys.

Common error messages and fixes:

  • "Missing required environment variable" -> add the missing key to .env or your MCP config.
  • "403 Forbidden" / "Error 453" -> your X API access tier does not include that endpoint.

Get your credentials from developer.twitter.com:

  • API Key & Secret
  • Access Token & Secret
  • Bearer Token

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.

3. Configure

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.

4. Use

"Search for tweets about AI"        -> search_twitter
"Read this article: x.com/..."      -> get_article (Playwright)
"Post: Hello world!"                -> post_tweet (requires creator profile)

Permission Profiles

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

Setting a Profile

"env": {
  "X_MCP_PROFILE": "creator"
}

Permissions are evaluated at runtime. You can switch profiles or groups without restarting the server.

Custom Profile

"env": {
  "X_MCP_PROFILE": "custom",
  "X_MCP_GROUPS": "research,engage,publish"
}

Tool Groups

research (18 tools) - Read-only, safe

Search, user lookup, tweet details, timelines, trends, article fetching

engage (9 tools) - Low risk

Like, unlike, bookmark, retweet, unretweet

publish (7 tools) - Medium risk

Post tweet, delete, quote, create thread, polls

social (8 tools) - Medium-high risk

Follow, unfollow, block, unblock, mute, unmute

conversations (5 tools) - Safe

Get full threads, replies, quote tweets, hide/unhide replies

lists (14 tools) - Low risk

Create, delete, manage lists and members

dms (3 tools) - High risk

Send and read direct messages

account (1 tool) - High risk

Get authenticated user profile


Key Tools

Search & Discovery

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)

User & Tweet Info

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

Engagement

Tool Description
favorite_tweet Like
retweet Retweet
bookmark_tweet Bookmark
quote_tweet Quote with comment

Publishing

Tool Description
post_tweet Post with media, tags, reply
create_thread Post mult

Frequently Asked Questions

What are the key features of XMCP?

70+ tools covering research, engagement, publishing, and account management. Permission-based access control with runtime enforcement. Playwright-powered article fetching for X articles. Full engagement metrics and thread support. Customizable profiles for different use cases like research or automation.

What can I use XMCP for?

Monitoring and analyzing trends on X for research purposes. Automating content publishing and thread creation. Managing account engagement including likes, retweets, and bookmarks. Extracting and summarizing long-form content from X articles. Performing deep-dive analysis on user profiles and conversation threads.

How do I install XMCP?

Install XMCP by running: pip install "xmcp[articles] @ git+https://github.com/vibeforge1111/xmcp.git" && python -m playwright install chromium

What MCP clients work with XMCP?

XMCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep XMCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest