X MCP Server

MCP server for X/Twitter — post tweets, search, follow, and monitor your account with Claude

Local serverstdioGo

What is the X MCP server?

Connect X to Claude, Cursor or any other MCP client and it stops being a tab you switch to. MCP server for X/Twitter — post tweets, search, follow, and monitor your account with Claude. The x mcp server is what makes that connection.

What the server does

A Model Context Protocol (MCP) server that enables Claude Desktop (and other MCP clients) to interact with X/Twitter — post tweets, read timelines, search content, manage follows, and monitor your account.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • x_get_timeline — Home timeline — recent posts from followed accounts
  • x_get_notifications — Mentions of the authenticated user
  • x_search_tweets — Search by keyword, hashtag, or from:username
  • x_get_tweet_thread — Fetch a tweet and its full conversation thread
  • x_get_profile — User profile by username
  • x_get_followers — Followers list for any account
  • x_get_user_tweets — Recent tweets from a specific user
  • x_search_users — Search for users by name or keyword
  • x_get_media_specs — X/Twitter media format specs (dimensions, size limits, formats)
  • x_create_tweet — Post a tweet (text, link card, image, or video)
  • x_reply — Reply to a tweet
  • x_create_thread — Post a series of connected tweets

Installation

Installation goes through your MCP client rather than a global install: point it at tsc on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Credentials and setup notes

Configuration is passed through the environment: X_APP_KEY, X_APP_SECRET, X_ACCESS_TOKEN, X_ACCESS_SECRET, X_BEARER_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Node.js 22.14 or higher - An X Developer account with an app created - Claude Desktop (or any MCP-compatible client)

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. X's toolset — x_get_timeline, x_get_notifications, x_search_tweets and 11 more — is a fair guide to whether it matches your workflow. It is maintained by raveenb; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against X's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch X.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
x_get_timelineHome timeline — recent posts from followed accounts
x_get_notificationsMentions of the authenticated user
x_search_tweetsSearch by keyword, hashtag, or from:username
x_get_tweet_threadFetch a tweet and its full conversation thread
x_get_profileUser profile by username
x_get_followersFollowers list for any account
x_get_user_tweetsRecent tweets from a specific user
x_search_usersSearch for users by name or keyword
x_get_media_specsX/Twitter media format specs (dimensions, size limits, formats)
x_create_tweetPost a tweet (text, link card, image, or video)
x_replyReply to a tweet
x_create_threadPost a series of connected tweets
x_quote_tweetQuote-tweet with commentary
x_likeLike a tweet

How to install the X MCP server

**Claude Desktop configuration:**

```json
{
  "mcpServers": {
    "x-twitter": {
      "command": "npx",
      "args": ["--yes", "@luminarylane/x-twitter-mcp-server"],
      "env": {
        "X_APP_KEY": "your-consumer-key",
        "X_APP_SECRET": "your-consumer-secret",
        "X_ACCESS_TOKEN": "your-access-token",
        "X_ACCESS_SECRET": "your-access-token-secret"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 22.14 or higher - An X Developer account with an app created - Claude Desktop (or any MCP-compatible client)
VariableDescriptionRequired
X_APP_KEYCredential the server authenticates with.Yes
X_APP_SECRETCredential the server authenticates with.Yes
X_ACCESS_TOKENCredential the server authenticates with.Yes
X_ACCESS_SECRETCredential the server authenticates with.Yes
X_BEARER_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use X to x get timeline.
  • Use X to x get notifications.
  • Use X to x search tweets.

Frequently asked questions

It connects X to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (x_get_timeline, x_get_notifications, x_search_tweets, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with X directly.