X

X (Twitter)

MCP server · by Role1776

Developer Tools Dockermcpb v0.1.1

Search, read and publish X posts and manage users, lists and media via the X API v2.

View source ↗ Website ↗ Generate config for multiple servers More servers

Install

unavailable — the image reference already carries a tag

Docker
docker run -i --rm ghcr.io/role1776/mcp-x:0.1.1
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_darwin_amd64.mcpb
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_darwin_arm64.mcpb
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_linux_amd64.mcpb
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_linux_arm64.mcpb
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_windows_amd64.mcpb
mcpb
https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_windows_arm64.mcpb

Setup by client

Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.

claude_desktop_config.json

{
  "mcpServers": {
    "mcp-x": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/role1776/mcp-x:0.1.1"
      ],
      "env": {
        "X_API_KEY": "<YOUR_X_API_KEY>",
        "X_API_KEY_SECRET": "<YOUR_X_API_KEY_SECRET>",
        "X_ACCESS_TOKEN": "<YOUR_X_ACCESS_TOKEN>",
        "X_ACCESS_TOKEN_SECRET": "<YOUR_X_ACCESS_TOKEN_SECRET>",
        "MEDIA_ROOT": "<YOUR_MEDIA_ROOT>"
      }
    }
  }
}

Format verified against the official Claude Desktop docs ↗.

Environment variables

Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.

  • X_API_KEY required secret — OAuth 1.0a consumer key. developer.x.com -> your project -> your app -> Keys and tokens.
  • X_API_KEY_SECRET required secret — OAuth 1.0a consumer secret, issued together with X_API_KEY.
  • X_ACCESS_TOKEN required secret — User access token. Set the app permissions to Read and Write BEFORE generating it: a token keeps the permissions it was created with, and a read-only one fails every write until it is regenerated.
  • X_ACCESS_TOKEN_SECRET required secret — User access token secret, issued together with X_ACCESS_TOKEN.
  • MEDIA_ROOT required — Absolute path to an existing directory - the only one x_media_upload may read files from. Anything outside it is refused, symlinks included. Checked at startup.
  • MCP_TRANSPORT — stdio (client spawns the process) or http (streamable HTTP listener).
  • MCP_NAME — Server name reported in the MCP initialize handshake.
  • MCP_PATH — HTTP path the MCP endpoint is served on. Used only when MCP_TRANSPORT=http.

GitHub

⭐ 2 stars · 最近更新于 49 天前 · MIT license

About this server

mcp x An MCP server that gives an LLM the X (Twitter) API: read and search posts, manage users and lists, upload media, and publish — as the account whose keys it runs on.…

Summary from the project README — github.com/Role1776/mcp-x

Distributed as Docker, mcpb, listed under Developer Tools. Review our MCP security guide before granting access to real data.

Frequently asked questions

What does the X (Twitter) MCP server do?

mcp x An MCP server that gives an LLM the X (Twitter) API: read and search posts, manage users and lists, upload media, and publish — as the account whose keys it runs on.

How do I install X (Twitter)?

Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.

Is X (Twitter) free to use?

The MCP server itself is free to install. The source is public on https://github.com/Role1776/mcp-x. Any third-party service it calls may require its own API key and account.

Which clients support X (Twitter)?

Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.

Add this badge

Publish this server? Link back with a badge on your README or site — copy either snippet.

Listed on MCPNav

Markdown

[![Listed on MCPNav](https://mcpnav.net/badge/mcp-x.svg)](https://mcpnav.net/server/mcp-x/)

HTML

<a href="https://mcpnav.net/server/mcp-x/"><img src="https://mcpnav.net/badge/mcp-x.svg" alt="Listed on MCPNav" height="20"></a>