Cover image
Try Now
2025-02-14

Twitter MCP服务器的存储库

3 years

Works with Finder

1

Github Watches

1

Github Forks

3

Github Stars

Twitter MCP Server

A powerful Twitter integration for AI agents that leverages the Model Context Protocol (MCP) standard, providing a comprehensive set of Twitter functionality through a clean and consistent interface.

Overview

This server provides access to Twitter's features through MCP tools, allowing seamless integration with AI assistants and other MCP-compatible clients. It's built on top of the agent-twitter-client library and provides robust error handling, rate limiting, and consistent response formatting.

Features

Basic Reading

  • Get tweets from users with media support
  • Fetch user profiles with detailed information
  • Search tweets by hashtags or keywords
  • Filter search results by latest/top
  • Rate limiting (max 50 tweets per request)

User Interactions

  • Like/Unlike tweets
  • Retweet/Undo retweet
  • Post tweets with:
    • Text content
    • Media attachments (images, videos)
    • Reply functionality
    • Quote tweet capability

Advanced Features

  • Get user relationships (followers/following)
  • Fetch trending topics
  • Access different timeline types:
    • Home timeline
    • Following timeline
    • User timeline
  • List management (fetch list tweets)

Media & Advanced Interactions

  • Media handling:
    • Image upload (JPEG, PNG, GIF)
    • Video upload (MP4)
    • Alt text support
  • Thread creation
  • Follow/Unfollow users

Tools

Reading Tools

  • get_tweets - Fetch recent tweets from a user
  • get_profile - Get a user's profile information
  • search_tweets - Search for tweets by hashtag or keyword

Interaction Tools

  • like_tweet - Like or unlike a tweet
  • retweet - Retweet or undo retweet
  • post_tweet - Post a new tweet with optional media
  • create_thread - Create a Twitter thread

Timeline Tools

  • get_timeline - Get tweets from different timeline types
  • get_list_tweets - Get tweets from a Twitter list
  • get_trends - Get current trending topics

User Management Tools

  • get_user_relationships - Get followers or following list
  • follow_user - Follow or unfollow a user

Installation

  1. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. Configure environment variables:
# Required: Twitter Account Credentials (for user authentication)
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
TWITTER_EMAIL=your_email

# Twitter API Authentication (Optional)
TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET_KEY=your_api_secret_key
TWITTER_ACCESS_TOKEN=your_access_token
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret
  1. Add the server config to your MCP client:

On MacOS:

~/Library/Application Support/Claude/claude_desktop_config.json

On Windows:

%APPDATA%/Claude/claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "twitter-mcp-server": {
      "command": "/path/to/twitter-mcp-server/build/index.js"
    }
  }
}

Development

For development with auto-rebuild:

npm run watch

Debugging

Since MCP servers communicate over stdio, you can use the MCP Inspector for debugging:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Error Handling

The server implements comprehensive error handling:

  • Input validation for all parameters
  • Rate limiting protection
  • Detailed error messages
  • Proper error propagation
  • Logging for debugging

Response Format

All tools return responses in a consistent format:

{
  content: [{
    type: "text",
    text: string // JSON stringified response or error message
  }]
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

    Reviews

    3 (1)
    Avatar
    user_QrbW9C0R
    2025-04-15

    Parquet_mcp_server by MCP-Mirror is a highly efficient and reliable server management tool. It simplifies data processing and storage with ease, ensuring seamless performance. The interface is user-friendly, making it accessible for both beginners and experienced users. Highly recommend for anyone looking to optimize their server management!