LocalFree server, account needed

X (Twitter) MCP server

Role1776/mcp-x

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

2 GitHub stars1 forks

Install X (Twitter) in Claude Code

Docker

Claude Code
claude mcp add role1776-x-twitter -e X_API_KEY=... -e X_API_KEY_SECRET=... -e X_ACCESS_TOKEN=... -e X_ACCESS_TOKEN_SECRET=... -e MEDIA_ROOT=... -- docker run -i --rm -e X_API_KEY -e X_API_KEY_SECRET -e X_ACCESS_TOKEN -e X_ACCESS_TOKEN_SECRET -e MEDIA_ROOT ghcr.io/role1776/mcp-x:0.1.1
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
{
  "mcpServers": {
    "role1776-x-twitter": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "X_API_KEY",
        "-e",
        "X_API_KEY_SECRET",
        "-e",
        "X_ACCESS_TOKEN",
        "-e",
        "X_ACCESS_TOKEN_SECRET",
        "-e",
        "MEDIA_ROOT",
        "ghcr.io/role1776/mcp-x:0.1.1"
      ],
      "env": {
        "X_API_KEY": "...",
        "X_API_KEY_SECRET": "...",
        "X_ACCESS_TOKEN": "...",
        "X_ACCESS_TOKEN_SECRET": "...",
        "MEDIA_ROOT": "..."
      }
    }
  }
}

MCP Bundle (.mcpb)

Claude Code
curl -LO https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_darwin_amd64.mcpb
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
Download mcp-x_0.1.1_darwin_amd64.mcpb and double-click it to install in Claude Desktop.

MCP Bundles install in one click in Claude Desktop. Download the file, then open it.

MCP Bundle (.mcpb)

Claude Code
curl -LO https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_darwin_arm64.mcpb
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
Download mcp-x_0.1.1_darwin_arm64.mcpb and double-click it to install in Claude Desktop.

MCP Bundles install in one click in Claude Desktop. Download the file, then open it.

MCP Bundle (.mcpb)

Claude Code
curl -LO https://github.com/Role1776/mcp-x/releases/download/v0.1.1/mcp-x_0.1.1_linux_amd64.mcpb
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
Download mcp-x_0.1.1_linux_amd64.mcpb and double-click it to install in Claude Desktop.

MCP Bundles install in one click in Claude Desktop. Download the file, then open it.

Replace each ... with your own value.

Frequently asked questions

What does the X (Twitter) MCP server do?

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

Is the X (Twitter) MCP server free?

The server is free, but you will likely need an account. The server itself is free, but it connects to a service that needs an account or API key, which may have paid tiers. Check the provider for current pricing.

Does X (Twitter) run locally or remotely?

Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.

How do I add X (Twitter) to Claude Code?

Run: claude mcp add role1776-x-twitter -e X_API_KEY=... -e X_API_KEY_SECRET=... -e X_ACCESS_TOKEN=... -e X_ACCESS_TOKEN_SECRET=... -e MEDIA_ROOT=... -- docker run -i --rm -e X_API_KEY -e X_API_KEY_SECRET -e X_ACCESS_TOKEN -e X_ACCESS_TOKEN_SECRET -e MEDIA_ROOT ghcr.io/role1776/mcp-x:0.1.1

More search & web scraping MCP servers

View all