Get the FREE Ultimate OpenClaw Setup Guide →

x

MCP server from DataWhisker/x-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio datawhisker-x-mcp-server node %USERPROFILE%/Projects/MCP Basket/x-server/build/index.js \
  --env TWITTER_API_KEY="paste-your-api-key-here" \
  --env TWITTER_API_SECRET="paste-your-api-secret-here" \
  --env TWITTER_ACCESS_TOKEN="paste-your-access-token-here" \
  --env TWITTER_ACCESS_SECRET="paste-your-access-token-secret-here"

How to use

This MCP server, named X, provides a set of tools to read from your X (Twitter) timeline and to create, reply to, or delete tweets directly through the MCP interface. It includes support for optional image attachments and built-in rate-limit handling for X's free tier. The available tools (get_home_timeline, create_tweet, reply_to_tweet, delete_tweet) let you fetch recent tweets, post new content with or without media, respond to existing tweets with optional media, and remove tweets by ID. The server is designed to work with Claude desktop, enabling seamless integration between Claude workflows and X API actions. To use the tools, call use_mcp_tool with the appropriate server_name set to x and specify the tool_name and arguments as shown in the documentation examples. The server enforces rate limits and provides clear feedback when limits are reached, including exponential backoff behavior where applicable.

How to install

Prerequisites:

  • Node.js v16 or higher installed on your system
  • Internet access to install dependencies
  • An X (Twitter) developer account with API keys (API Key, API Key Secret, Access Token, Access Token Secret)

Installation steps:

  1. Clone the repository (replace with your actual repo URL): git clone [your-repo-url] cd datawhisker-x-mcp-server

  2. Install dependencies: npm install

  3. Build the server (TypeScript to JavaScript): npm run build

  4. Start the MCP server: npm start

Optional, for development with live TS compilation: npm run dev

Note: Ensure your Twitter API credentials are configured before starting the server (see Configuration section in README).

Additional notes

Tips and considerations:

  • Keep your Twitter API keys and tokens secure; do not share them publicly. The config example shows placeholders that you should replace with your actual credentials.
  • The server includes built-in rate limiting for the free X tier (monthly quotas for posts and reads). Monitor usage to avoid hitting limits; the server will back off and retry when appropriate.
  • If you plan to run Claude desktop integration, ensure the Claude config JSON matches your environment and points to the built server path. The provided example uses a Windows-style path; adjust as needed for your OS.
  • Image attachments are limited to PNG, JPEG, GIF, and WEBP with a maximum size (as described in the tools section). Ensure your image_path points to a valid file within these constraints.
  • When using the Claude configuration snippet, replace all placeholder credential values with real keys and tokens and keep them secure.

Related MCP Servers

Sponsor this space

Reach thousands of developers