Labsco
serima logo

Twitter MCP Server

โ˜… 1

from serima

Accurately count Twitter/X post characters and optimize posts.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Twitter MCP Server

An MCP (Model Context Protocol) server for Claude to accurately count Twitter/X post characters and optimize posts.

Features

  • Accurate Character Counting: Calculate character count based on Twitter/X's official counting method
  • Post Validation: Check character limits and other constraints
  • Post Optimization: Suggestions for optimizing posts that are too long
  • Entity Extraction: Extract and analyze URLs, mentions, and hashtags

Development

# Start in development mode
npm run dev

# Build
npm run build

# Start in production
npm start

API Details

count_tweet_characters

  • Input: text (string) - Text to count
  • Output: Detailed information including character count, remaining characters, validity

validate_tweet

  • Input: text (string) - Text to validate
  • Output: Validity, issues, entity information

optimize_tweet

  • Input:
    • text (string) - Text to optimize
    • maxLength (number, optional) - Maximum character count (default: 280)
  • Output: Optimized text and suggestions

extract_entities

  • Input: text (string) - Text to extract entities from
  • Output: Lists of URLs, mentions, and hashtags

Tech Stack

  • TypeScript: Type safety and better development experience
  • @modelcontextprotocol/sdk: MCP server implementation
  • twitter-text: Official Twitter character counting library

Support

If you have any issues or questions, please report them in GitHub Issues.