Get the FREE Ultimate OpenClaw Setup Guide →

twitter

Twitter client MCP Server where you only have to connect your account or auth token and let everything else be handled for you

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio touchmeangel-twitter-mcp-server docker run -i --rm --name twitter-mcp-server touchmeangel/twitter-mcp-server \
  --env APP_PORT="Port for the HTTP server (default 3000)"

How to use

This MCP server provides a Twitter client interface through the MCP protocol. It exposes tools to read tweets and profiles, search tweets, manage interactions (like, retweet, post), fetch timelines and trends, and manage follow status. To use it, configure your MCP client to connect to the server via Docker (or the included http server option) and authorize with your Twitter cookie-based token. After connecting, you can call tools like get_tweets, get_profile, search_tweets, like_tweet, retweet, post_tweet, get_timeline, get_trends, and follow_user to perform actions on your Twitter account through the MCP abstraction without exposing raw API calls in your client.

How to install

Prerequisites:

  • Docker installed and running on your machine (or use a compatible MCP runtime).
  • Access to the network to pull the image touchmeangel/twitter-mcp-server from Docker Hub.

Installation steps:

  1. Pull and run the server container directly:

    docker run -i --rm --name twitter-mcp-server -e APP_PORT=3000 -p 3000:3000 touchmeangel/twitter-mcp-server

    This runs the MCP server in a Docker container and exposes port 3000 for HTTP access.

  2. Alternative: add to your MCP client config (as shown in the README):

    { "mcpServers": { "twitter-mcp-server": { "command": "docker", "args": [ "run", "-i", "--rm", "--name", "twitter-mcp-server", "touchmeangel/twitter-mcp-server" ], "env": { "APP_PORT": "3000" } } } }

  3. If you prefer using docker-compose, you can deploy with a compose file similar to the one in the README, ensuring APP_PORT is set to the desired port (default 3000) and mapping 3000:3000.

Additional notes

  • Authentication relies on Twitter cookies (Authorization: Bearer <auth_token>:<ct0>). Ensure you supply valid tokens in your client request headers.
  • The server exposes endpoints under /mcp; use http://<host>:<port>/mcp to connect from your MCP client. If you run in Docker, map the host port to your desired port (default 3000).
  • If you encounter rate limiting or authentication errors, verify your auth_token and ct0 cookies, and ensure your account permissions allow the requested actions.
  • You can test the available tools using the MCP inspector as noted in the README: npx @modelcontextprotocol/inspector.
  • For production deployments, consider running behind a reverse proxy and enabling TLS in front of the MCP endpoint.

Related MCP Servers

Sponsor this space

Reach thousands of developers