
Twitter MCP 服务器的仓库
概览
一个强大的 Twitter 集成,利用模型上下文协议(MCP)标准,通过简洁一致的界面提供全面的 Twitter 功能。 该服务器通过MCP工具访问Twitter功能,实现与AI助手及其他兼容MCP客户端的无缝集成。它建立在代理-推特-客户端库之上,提供强大的错误处理、速率限制和一致的响应格式。 - 获取支持媒体用户的推文 - 获取包含详细信息的用户资料 - 通过话题标签或关键词搜索推文 - 按最新/热门筛选搜索结果 - 限制速率(每次请求最多50条推文) - 点赞/不点赞推文 - 转推/撤销转推 - 发布推文内容:- 文本内容 - 媒体附件(图片、视频)- 回复功能 - 引用推文功能 - 获取用户关系(关注者/关注者)- 获取热门话题 - 访问不同时间线类型:- 主页时间线-...
概述(AI 翻译)
一个强大的 Twitter 集成,利用模型上下文协议(MCP)标准,通过简洁一致的界面提供全面的 Twitter 功能。
概述
该服务器通过MCP工具访问Twitter功能,实现与AI助手及其他兼容MCP客户端的无缝集成。它建立在agent-twitter-client库之上,提供强大的错误处理、速率限制和一致的响应格式。
特色
基础阅读
- 获取有媒体支持用户的推文
- 获取包含详细信息的用户档案
- 通过话题标签或关键词搜索推文
- 按最新/顶部筛选搜索结果
- 速率限制(每个请求最多50条推文)
用户互动
- 点赞/不喜欢推文
- 转发/撤销转推
- 发布推文:
- 文本内容
- 媒体附件(图片、视频)
- 回复功能
- 引用推文功能
高级功能
- 获取用户关系(粉丝/关注者)
- 热门话题
- 访问不同时间线类型:
- 主场时间线
- 以下时间线
- 用户时间线
- 列表管理(抓取列表推文)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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 userget_profile- Get a user’s profile informationsearch_tweets- Search for tweets by hashtag or keyword
Interaction Tools
like_tweet- Like or unlike a tweetretweet- Retweet or undo retweetpost_tweet- Post a new tweet with optional mediacreate_thread- Create a Twitter thread
Timeline Tools
get_timeline- Get tweets from different timeline typesget_list_tweets- Get tweets from a Twitter listget_trends- Get current trending topics
User Management Tools
get_user_relationships- Get followers or following listfollow_user- Follow or unfollow a user
Installation
- Install dependencies:
npm install
- Build the server:
npm run build
- 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
- 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:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"twitter-mcp-server": {
"command": "/path/to/twitter-mcp-server/build/index.js"
}
}
}