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
π¦ 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.
A powerful integration that allows AI models to post directly to X (formerly Twitter) using the Model Context Protocol (MCP) π€β¨
Setup follows the usual MCP pattern β install or clone the server, register it in your client's configuration file, restart the client.
Once π¦ X is connected, these are the calls the assistant has available:
Prerequisites β The Prerequisites tool exposed by this serverServer β 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 toClient β The client component connects to the MCP server and provides an interface for interacting with Google's Gemini AI models. It translates user requestsYou 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.
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.
| Tool | What it does |
|---|---|
| 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 X. The server uses Server-Sent Events (SSE) for communication with cli |
| 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 into AI-generated content and can call the server's tools to post to X |
| Variable | Description | Required |
|---|---|---|
| TWITTER_API_KEY | Credential the server authenticates with. | Yes |
| TWITTER_API_SECRET | Credential the server authenticates with. | Yes |
| TWITTER_ACCESS_TOKEN | Credential the server authenticates with. | Yes |
| TWITTER_ACCESS_SECRET | Credential the server authenticates with. | Yes |
| GEMINI_API_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs β version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server β drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server β repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation β Linear's official hosted server with OAuth and zero install.
Local repository surgery β status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI β current time anywhere and correct conversions, without the model doing date math.