Skip to main content
Glama

mcp-x MCP server

MCP project to connect Claude with X API. Built on top of X API v2

Demo

video-demo

Supported Features

  • Post tweets

Configuration

Getting Started with X

  • Go to X Developer Platform and login with your X account

  • Start with Basic plan

  • Store the Access Token, Secret, Client ID, Client Secret and Bearer token Docs: x-api-start

Related MCP server: X MCP Server

Set up

  • On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

  • On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "x": {
      "command": "uv",
      "args": [
        "--directory",
        "PROJECT_PATH/src/mcp_x",
        "run",
        "mcp-x"
      ],
      "env": {
        "X_API_KEY": "YOUR_API_KEY",
        "X_API_KEY_SECRET": "YOUR_API_KEY_SECRET",
        "X_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN",
        "X_ACCESS_TOKEN_SECRET": "YOUR_ACCESS_TOKEN_SECRET",
        "X_BEARER_TOKEN": "YOUR_BEARER_TOKEN",
        "LOGGING_PATH": "PROJECT_PATH/src/mcp_x/logs"
      }
    }
  }
}

TODO

  • Tests

  • Add Get tweets

  • Add Delete tweets

  • ...

Deployment

(todo)

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:

uv sync
  1. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

Available Tools

1 tool
x_PostTweetB

Post a tweet using the X API

Inputs: tweet_content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusing it with another. The purpose of x_PostTweet is clear and unambiguous.

    Naming Consistency4/5

    The tool name combines a prefix 'x_' with CamelCase 'PostTweet', which mixes conventions but is still readable and suggests a consistent pattern if more tools existed. As a single tool, its name is clear and not chaotic.

    Tool Count2/5

    A single tool is too few for a server purportedly for the X (Twitter) API, which has many operations. The server feels critically under-scoped, offering only posting functionality.

    Completeness1/5

    The tool surface covers only posting tweets, leaving out essential operations like reading, searching, or deleting tweets. This is severely incomplete for a server meant to interact with X.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables users to interact with X (Twitter) through the X API. Supports posting tweets, retrieving user timelines, searching tweets, and replying to tweets with comprehensive error handling.
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables creating, managing, and publishing X/Twitter posts, threads, and replies directly through Claude chat. Supports draft management with the ability to create, list, publish, and delete tweet drafts.
      10
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables seamless interaction with Twitter/X platform through Claude AI, allowing users to post tweets with images, search for tweets, and engage in conversations using natural language commands.
      10
      55 npm
      27
      MIT