Skip to main content
Glama
x-post-mcp

x-post-mcp

by discountry

x-post-mcp

A minimal MCP server for posting tweets to X (Twitter) via API v2. Zero runtime dependencies.

Installation

npm install -g x-post-mcp
# or
npx x-post-mcp

Related MCP server: x-mcp

Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "x-post-mcp": {
      "command": "npx",
      "args": ["x-post-mcp"],
      "env": {
        "X_BEARER_TOKEN": "<your-bearer-token>"
      }
    }
  }
}

Getting a Bearer Token

See the detailed step-by-step guide: English | 中文

Quick overview:

  1. Go to X Developer Portal

  2. Create a project and app

  3. Configure User Authentication with Read and write permission

  4. Generate OAuth 2.0 Token with tweet.read, tweet.write, users.read, offline.access scopes

Recommended: Use auto-refresh configuration with X_CLIENT_ID, X_CLIENT_SECRET, and X_REFRESH_TOKEN to avoid manual token refresh every 2 hours.

Tool

send_tweet

Post a new tweet to X.

Parameter

Type

Required

Description

text

string

✓

Tweet content

reply_to_tweet_id

string

Tweet ID to reply to

quote_tweet_id

string

Tweet ID to quote

Skill Example

You can create a skill file to help AI agents use this MCP. Save as .claude/skills/post-tweet.md:

# Post Tweet Skill

Post a tweet to X (Twitter) using the x-post-mcp server.

## Instructions

1. Confirm the tweet content with the user before posting
2. Call the `send_tweet` tool with the user's message
3. Report the result back to the user

## Examples

**Simple tweet:**
User: 帮我发一条推文:Hello World!
Assistant: [calls send_tweet with text: "Hello World!"]

**Reply to a tweet:**
User: 回复这条推文 1234567890:感谢分享!
Assistant: [calls send_tweet with text: "感谢分享!", reply_to_tweet_id: "1234567890"]

**Quote tweet:**
User: 引用推文 1234567890 并评论:这个观点很有意思
Assistant: [calls send_tweet with text: "这个观点很有意思", quote_tweet_id: "1234567890"]

License

MIT

Available Tools

1 tool
send_tweetA

Post a new tweet to X (Twitter)

Inputs: text (required), quote_tweet_id, reply_to_tweet_id.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlapping purposes. The tool's purpose is clear and unique.

    Naming Consistency5/5

    The single tool name 'send_tweet' follows a clear verb_noun pattern and is consistent. With only one tool, there are no inconsistencies to evaluate.

    Tool Count4/5

    One tool is slightly below the typical well-scoped range, but it is reasonable for a narrowly focused posting service. The count feels minimal yet sufficient for the stated purpose.

    Completeness4/5

    The tool covers the core action of posting a tweet, which is the server's stated purpose. Minor gaps exist, such as no ability to delete or read tweets, but these are not essential for a post-only tool and can be worked around.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for interacting with the Twitter/X API v2, enabling AI assistants to retrieve tweets, post content, reply, quote, and more programmatically.
      2,105 npm
      13
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server for interacting with X/Twitter, enabling posting tweets, searching, user info, timeline, liking, retweeting, and deleting tweets.
      7
      12 npm
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables posting tweets, reading timelines, searching posts, and interacting with X (Twitter) API.
      18 npm
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Node.js MCP server for X/Twitter that enables user profile queries, tweet search, tweet detail retrieval, and media downloads (images, videos, GIFs) via X's Web GraphQL API.
      6
      2
      ISC