X (Twitter) MCP Server

X (Twitter) MCP servers enable AI models to interact with X platforms, providing capabilities for tweet management, account operations, list organization, and content search.

October 19, 2026
MCP ServerContent & MediaX (Twitter) MCP Server
GitHub stars

Overview

The X (Twitter) MCP Server bridges AI models and the X platform by letting language models (LLMs) perform comprehensive X operations directly. It's part of the Model Context Protocol (MCP) system, providing a safe and standard way to connect AI with X platform functionalities.

Created by:

Developed by Dishant27

Key Features

πŸ“

Tweet Management

Post, search, and manage tweets with customizable result filtering

πŸ‘€

Account Operations

View profiles, update details, and manage follower relationships

πŸ“‹

List Organization

Create and manage public/private lists for content curation

πŸ”’

Secure Authentication

Uses official X API credentials to avoid account suspension risks

Available Tools

Quick Reference

ToolPurposeCategory
post_tweetPost new content to XWrite
search_tweetsSearch for content on XRead
get_profileGet user profile informationRead
update_profileUpdate authenticated user's profileWrite
follow_userFollow a user on XWrite
unfollow_userUnfollow a user on XWrite
list_followersList user followersRead
list_followingList accounts a user is followingRead
create_listCreate a new X listWrite
get_list_infoGet details about a specific listRead
get_user_listsGet all lists owned by authenticated userRead

Detailed Usage

post_tweetβ–Ά

Post new content (up to 280 characters) to the authenticated X account.

use_mcp_tool({
  server_name: "x-twitter",
  tool_name: "post_tweet",
  arguments: {
    text: "Hello from AI-powered MCP server!"
  }
});
search_tweetsβ–Ά

Search for X content using a query with customizable result count.

use_mcp_tool({
  server_name: "x-twitter",
  tool_name: "search_tweets",
  arguments: {
    query: "AI MCP server",
    count: 10
  }
});
get_profileβ–Ά

Get profile information for a specific user or the authenticated account.

use_mcp_tool({
  server_name: "x-twitter",
  tool_name: "get_profile",
  arguments: {
    screen_name: "Dishant27"
  }
});
create_listβ–Ά

Create a new public or private list for content curation.

use_mcp_tool({
  server_name: "x-twitter",
  tool_name: "create_list",
  arguments: {
    name: "AI Tools",
    description: "Curated list of AI tool developers",
    is_private: false
  }
});

Installation

The README documents install from source; no npm package or Docker image is published for it.

git clone https://github.com/Dishant27/twitter-mcp.git
cd twitter-mcp
npm install && npm run build

Then point your client at the built entry point:

{
  "mcpServers": {
    "x-twitter": {
      "command": "node",
      "args": ["/absolute/path/to/twitter-mcp/dist/index.js"],
      "env": {
        "TWITTER_API_KEY": "your_api_key",
        "TWITTER_API_SECRET": "your_api_secret",
        "TWITTER_ACCESS_TOKEN": "your_access_token",
        "TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret"
      }
    }
  }
}

All four environment variables are required; the server exits at startup if any is missing. Node.js 18 or higher is required. To use npm start instead, run it from inside the cloned repository, where it loads the same variables from the environment or a .env file.

Sources