Creativity · MCP — server

MCP Twitter / X Server

The MCP Twitter / X Server is a community-maintained Model Context Protocol server wrapping the X (Twitter) v2 API. Given a Bearer token or OAuth user context, it lets an LLM client search recent tweets, pull user timelines, and post on behalf of the authenticated account.

MCP facts

Kind
server
Ecosystem
anthropic-mcp
Language
TypeScript / Node.js
Transports
stdio

Capabilities

  • Tools: search_recent_tweets, post_tweet, get_user_timeline, get_user_by_username, reply_to_tweet
  • Resources: x://tweet/{id} and x://user/{handle} URIs
  • Auth: bearer token for reads, OAuth 1.0a or 2.0 PKCE for writes

Install

npx -y @modelcontextprotocol/server-x

Configuration

{
  "mcpServers": {
    "x": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-x"],
      "env": {
        "X_BEARER_TOKEN": "...",
        "X_CONSUMER_KEY": "...",
        "X_CONSUMER_SECRET": "...",
        "X_ACCESS_TOKEN": "...",
        "X_ACCESS_SECRET": "..."
      }
    }
  }
}

Frequently asked questions

Is this server official?

No — it is community-maintained. X does not publish a first-party MCP server.

Can I use the free X API tier?

The free tier only allows authenticated posting and a very small read quota. Search and timeline endpoints generally require the paid Basic or Pro tier.

How do I avoid posting accidentally?

Run the server without post_tweet enabled, or wrap destructive tools with a client-side confirmation prompt. Review each tool call before approving it.

Sources

  1. X API v2 docs — accessed 2026-04-20
  2. MCP community servers — accessed 2026-04-20