Feedback

X/Twitter MCP Server

@barresider Claim

Basic information

Runtime
node
Version
0.8.0
Category
License
MIT
Transports
stdio
Author
barresider
Submitted by
Community
Quality
35
Stars
8

About X/Twitter MCP Server

An MCP Server to interact with X/Twitter besides the official API.

X/Twitter MCP Server is a MCP server in the Other category listed in the AddMCP.net directory, published by Barresider. It exposes 22 tools, including login, tweet, thread, scrape_posts and more. Supported transport: stdio. Runtime: node. License: MIT. The repository has 8 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "x-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@barresider/x-mcp"
            ],
            "env": {
                "TWITTER_USERNAME": "your_twitter_username",
                "TWITTER_PASSWORD": "your_twitter_password"
            }
        }
    }
}

X/Twitter MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "x-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@barresider/x-mcp"
            ],
            "env": {
                "TWITTER_USERNAME": "your_twitter_username",
                "TWITTER_PASSWORD": "your_twitter_password"
            }
        }
    }
}

X/Twitter MCP Server tools

  • login — Login to Twitter/X
    (no parameters)
  • tweet — Post a tweet to Twitter/X
    text:string*, media:array
  • thread — Post a thread of tweets
    tweets*
  • scrape_posts — Scrape posts from current page
    maxPosts:number
  • scrape_profile — Scrape a user profile
    username:string*, maxPosts:number
  • scrape_comments — Scrape comments from a post
    postUrl:string*, maxComments:number
  • search_twitter — Search for tweets
    query:string*, maxPosts:number
  • search_viral — Search for viral posts
    query:string*, minLikes:number, maxPosts:number
  • scrape_timeline — Scrape posts from timeline
    type:string, maxPosts:number
  • scrape_trending — Get trending topics
    (no parameters)
  • like_post — Like a specific post
    postUrl:string*
  • unlike_post — Unlike a specific post
    postUrl:string*
  • bookmark_post — Bookmark a specific post
    postUrl:string*
  • unbookmark_post — Remove bookmark from a specific post
    postUrl:string*
  • retweet_post — Retweet/repost a specific post
    postUrl:string*
  • unretweet_post — Remove retweet/repost of a specific post
    postUrl:string*
  • quote_tweet — Quote tweet a post with custom text
    postUrl:string*, quoteText:string*
  • reply_to_post — Reply to a post with a comment
    postUrl:string*, replyText:string*
  • like_comment_by_id — Like a comment by its direct URL
    commentUrl:string*
  • unlike_comment_by_id — Unlike a comment by its direct URL
    commentUrl:string*
  • reply_to_comment_by_id — Reply to a comment with a comment
    commentUrl:string*, replyText:string*
  • replace_comment_by_id — Replace/edit a comment by its direct URL (Note: Twitter/X may not support comment editing)
    commentUrl:string*, newText:string*

Overview

What is X/Twitter MCP Server?

X/Twitter MCP Server is a Model Context Protocol (MCP) server that provides unofficial X/Twitter API access through browser automation using Playwright. It enables AI agents and applications to programmatically interact with X/Twitter for content creation, scraping, and social media automation.

How to use X/Twitter MCP Server?

Add the server configuration to your Claude Desktop config file with your X/Twitter credentials as environment variables (TWITTER_USERNAME, TWITTER_PASSWORD). Optionally, provide a PROXY_URL. Restart Claude Desktop to begin using the 25+ MCP tools. For standalone use, run npm run cli login to authenticate.

Key features of X/Twitter MCP Server

  • Post tweets, threads, and interact with posts
  • Scrape timelines, profiles, and search tweets
  • Like, retweet, bookmark, and reply to posts
  • Upload images, videos, and GIFs to tweets
  • Supports stdio and HTTP/SSE transport
  • 25+ MCP tools for X/Twitter automation

Use cases of X/Twitter MCP Server

  • Automate posting tweets and threads from AI agents
  • Scrape trending topics and hashtags for analysis
  • Search for viral content with minimum engagement filters
  • Monitor and interact with comments on posts
  • Extract comprehensive user profiles and recent posts

Frequently asked questions

1 What are the prerequisites for X/Twitter MCP Server?

Node.js 18+ and valid X/Twitter account credentials are required. Docker is optional for containerized deployment.

2 How does authentication work?

Credentials are provided via TWITTER_USERNAME and TWITTER_PASSWORD environment variables. Run npm run cli login to store a session in the directory specified by AUTH_DIR (default playwright/.auth).

3 Does the server support proxies?

Yes, it supports HTTP/HTTPS proxies configured via the PROXY_URL environment variable, with optional authentication, useful for rotating IPs or accessing restricted networks.

4 What are common troubleshooting steps?

Verify credentials, re-authenticate, check for UI updates, reduce request frequency, and ensure proper environment variables for Docker.

5 Is this tool official or affiliated with X/Twitter?

No, this is an unofficial tool using browser automation and is not affiliated with X/Twitter. Use responsibly and respect X/Twitter's terms of service.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬