X MCP Server

Enhanced MCP server for X with OAuth 2.0 support, media uploads, and comprehensive rate limiting.

Local serverstdioTypeScript

What is the X MCP Server?

X mcp server connects X to AI assistants that speak the Model Context Protocol. Enhanced MCP server for X with OAuth 2.0 support, media uploads, and comprehensive rate limiting.

What X does

An enhanced Model Context Protocol (MCP) server for X that adds OAuth 2.0 support, v2 API media uploads, and comprehensive rate limiting to the original implementation.

Key capabilities

  • v1.1 — Legacy API, being phased out but still works with OAuth 1.0a
  • v2 — Modern API with better features but some endpoints have issues
  • Media — OAuth 2.0 tokens cannot access v1.1 media endpoints, must use v2
  • Delete — v2 delete endpoint currently has issues (500 errors), v1.1 works as fallback

Practical notes

  • Maintained by mbelinky, written in TypeScript.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
post_tweetPost a new tweet with optional media attachments and replies.
search_tweetsExample prompts: - "Search for tweets about #MachineLearning" - "Find 50 recent tweets mentioning @ClaudeAI" - "Search for tweets about TypeScript tutorials"
delete_tweetExample prompts: - "Delete tweet with ID 1234567890" - "Remove my last tweet (provide the ID)"

How to install the X MCP Server

claude mcp add x --env API_KEY=your-value --env API_SECRET_KEY=your-value --env ACCESS_TOKEN=your-value --env ACCESS_TOKEN_SECRET=your-value --env AUTH_TYPE=your-value --env OAUTH2_CLIENT_ID=your-value --env OAUTH2_CLIENT_SECRET=your-value --env OAUTH2_ACCESS_TOKEN=your-value -- npx -y npm

Configuration

VariableDescriptionRequired
API_KEYCredential the server authenticates with.Yes
API_SECRET_KEYCredential the server authenticates with.Yes
ACCESS_TOKENCredential the server authenticates with.Yes
ACCESS_TOKEN_SECRETCredential the server authenticates with.Yes
AUTH_TYPEConfiguration value read at startup.Optional
OAUTH2_CLIENT_IDConfiguration value read at startup.Optional
OAUTH2_CLIENT_SECRETCredential the server authenticates with.Yes
OAUTH2_ACCESS_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • “Use X to post tweet.”
  • “Use X to search tweets.”
  • “Use X to delete tweet.”

Frequently asked questions

Enhanced MCP server for X with OAuth 2.0 support, media uploads, and comprehensive rate limiting. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.