🐦 X MCP Server

A Model Context Protocol (MCP) server that allows interaction with the X API, along with a client to interact with the server using Google's Gemini

Local serverstdioTypeScript

What is the 🐦 X MCP server?

🐦 X MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. A Model Context Protocol (MCP) server that allows interaction with the X API, along with a client to interact with the server using Google's Gemini AI.

What you get

A powerful integration that allows AI models to post directly to X (formerly Twitter) using the Model Context Protocol (MCP) πŸ€–βœ¨

Setting it up

Setup follows the usual MCP pattern β€” install or clone the server, register it in your client's configuration file, restart the client.

What the assistant can call

Once 🐦 X is connected, these are the calls the assistant has available:

  • Prerequisites β€” The Prerequisites tool exposed by this server
  • Server β€” The server component is built with Express and implements the Model Context Protocol. It exposes a tool called createPost that can be used to post to
  • Client β€” The client component connects to the MCP server and provides an interface for interacting with Google's Gemini AI models. It translates user requests

Configuration and credentials

You will need 5 environment variables: TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_SECRET, GEMINI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Bun v1.2.5 or later - X (Twitter) API credentials - Google Gemini API key

Before you rely on it

  • 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.
  • Missing credentials fail quietly in some clients β€” if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the 🐦 x mcp server does with a few real requests.

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. 🐦 X's toolset β€” Prerequisites, Server, Client β€” is a fair guide to whether it matches your workflow. It is maintained by subhadeeproy3902; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live β€” if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
PrerequisitesThe Prerequisites tool exposed by this server.
ServerThe server component is built with Express and implements the Model Context Protocol. It exposes a tool called createPost that can be used to post to X. The server uses Server-Sent Events (SSE) for communication with cli
ClientThe client component connects to the MCP server and provides an interface for interacting with Google's Gemini AI models. It translates user requests into AI-generated content and can call the server's tools to post to X

Configuration

  • Bun v1.2.5 or later - X (Twitter) API credentials - Google Gemini API key
VariableDescriptionRequired
TWITTER_API_KEYCredential the server authenticates with.Yes
TWITTER_API_SECRETCredential the server authenticates with.Yes
TWITTER_ACCESS_TOKENCredential the server authenticates with.Yes
TWITTER_ACCESS_SECRETCredential the server authenticates with.Yes
GEMINI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • β€œUse 🐦 X to Prerequisites.”
  • β€œUse 🐦 X to Server.”
  • β€œUse 🐦 X to Client.”

Frequently asked questions

It allows AI models (via Gemini) to post to X (Twitter) by exposing a MCP tool called `createPost`. Users interact through a chat client that translates requests into AI-generated tweets.