You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

x-post-mcp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-post-mcp

MCP server for posting tweets via X API v2

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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

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

  • Go to X Developer Portal
  • Create a project and app
  • Generate a User Authentication Token with tweet.read, tweet.write, users.read scopes

Tool

send_tweet

Post a new tweet to X.

ParameterTypeRequiredDescription
textstringTweet content
reply_to_tweet_idstringTweet ID to reply to
quote_tweet_idstringTweet 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

Keywords

mcp

FAQs

Package last updated on 12 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts