opentwitter by 6551team/opentwitter-mcp
npx skills add https://github.com/6551team/opentwitter-mcp --skill opentwitter从 6551 平台 REST API 查询 Twitter/X 数据。所有端点都需要通过 $TWITTER_TOKEN 提供 Bearer 令牌。
获取您的令牌 : https://6551.io/mcp
基础 URL : https://ai.6551.io
所有请求都需要以下请求头:
Authorization: Bearer $TWITTER_TOKEN
通过用户名获取用户个人资料。
curl -s -X POST "https://ai.6551.io/open/twitter_user_info" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
通过数字 ID 获取用户个人资料。
curl -s -X POST "https://ai.6551.io/open/twitter_user_by_id" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId": "44196397"}'
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
获取用户的近期推文。
curl -s -X POST "https://ai.6551.io/open/twitter_user_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "maxResults": 20, "product": "Latest"}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
username | string | 必需 | Twitter 用户名(不带 @) |
maxResults | integer | 20 | 最大推文数 (1-100) |
product | string | "Latest" | "Latest" 或 "Top" |
includeReplies | boolean | false | 包含回复推文 |
includeRetweets | boolean | false | 包含转推 |
使用各种过滤器搜索推文。
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": "bitcoin", "maxResults": 20, "product": "Top"}'
从特定用户搜索:
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fromUser": "VitalikButerin", "maxResults": 20}'
按话题标签搜索:
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hashtag": "crypto", "minLikes": 100, "maxResults": 20}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
keywords | string | - | 搜索关键词 |
fromUser | string | - | 来自特定用户的推文 |
toUser | string | - | 发送给特定用户的推文 |
mentionUser | string | - | 提及用户的推文 |
hashtag | string | - | 按话题标签过滤(不带 #) |
excludeReplies | boolean | false | 排除回复推文 |
excludeRetweets | boolean | false | 排除转推 |
minLikes | integer | 0 | 最小点赞数阈值 |
minRetweets | integer | 0 | 最小转推数阈值 |
minReplies | integer | 0 | 最小回复数阈值 |
sinceDate | string | - | 开始日期 (YYYY-MM-DD) |
untilDate | string | - | 结束日期 (YYYY-MM-DD) |
lang | string | - | 语言代码(例如 "en", "zh") |
product | string | "Top" | "Top" 或 "Latest" |
maxResults | integer | 20 | 最大推文数 (1-100) |
获取用户的新关注者或取消关注者。
# 获取新关注者
curl -s -X POST "https://ai.6551.io/open/twitter_follower_events" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "isFollow": true, "maxResults": 20}'
# 获取取消关注者
curl -s -X POST "https://ai.6551.io/open/twitter_follower_events" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "isFollow": false, "maxResults": 20}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
username | string | 必需 | Twitter 用户名(不带 @) |
isFollow | boolean | true | true=新关注者, false=取消关注者 |
maxResults | integer | 20 | 最大动态数 (1-100) |
获取用户已删除的推文。
curl -s -X POST "https://ai.6551.io/open/twitter_deleted_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "maxResults": 20}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
username | string | 必需 | Twitter 用户名(不带 @) |
maxResults | integer | 20 | 最大推文数 (1-100) |
获取哪些 KOL(关键意见领袖)关注了某个用户。
curl -s -X POST "https://ai.6551.io/open/twitter_kol_followers" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
username | string | 必需 | Twitter 用户名(不带 @) |
通过 ID 获取 Twitter 文章。
curl -s -X POST "https://ai.6551.io/open/twitter_article_by_id" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "article_id"}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
id | string | 必需 | Twitter 文章 ID |
获取当前用户的所有 Twitter 监控用户。
curl -s -X POST "https://ai.6551.io/open/twitter_watch" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
将 Twitter 用户添加到监控列表。
curl -s -X POST "https://ai.6551.io/open/twitter_watch_add" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
username | string | 必需 | Twitter 用户名(不带 @) |
从监控列表中删除 Twitter 用户。
curl -s -X POST "https://ai.6551.io/open/twitter_watch_delete" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": 123}'
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
id | integer | 必需 | 要删除的监控记录 ID |
端点 : wss://ai.6551.io/open/twitter_wss?token=YOUR_TOKEN
订阅您监控的 Twitter 账户的实时动态。
{
"jsonrpc": "2.0",
"id": 1,
"method": "twitter.subscribe"
}
响应 :
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"success": true
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "twitter.unsubscribe"
}
当监控账户有活动时,服务器会推送:
{
"jsonrpc": "2.0",
"method": "twitter.event",
"params": {
"id": 123456,
"twAccount": "elonmusk",
"twUserName": "Elon Musk",
"profileUrl": "https://twitter.com/elonmusk",
"eventType": "NEW_TWEET",
"content": "...",
"ca": "0x1234...",
"remark": "自定义备注",
"createdAt": "2026-03-06T10:00:00Z"
}
}
注意 : content 字段的结构因动态类型而异(见下文)。
**动态类型与内容结构**:
#### 推文动态
- `NEW_TWEET` - 发布新推文
- `NEW_TWEET_REPLY` - 新回复推文
- `NEW_TWEET_QUOTE` - 新引用推文
- `NEW_RETWEET` - 转推
- `CA` - 包含 CA 地址的推文
推文动态的内容结构:
```json
{
"id": "1234567890",
"text": "推文内容...",
"createdAt": "2026-03-06T10:00:00Z",
"language": "en",
"retweetCount": 100,
"favoriteCount": 500,
"replyCount": 20,
"quoteCount": 10,
"viewCount": 10000,
"userScreenName": "elonmusk",
"userName": "Elon Musk",
"userIdStr": "44196397",
"userFollowers": 170000000,
"userVerified": true,
"conversationId": "1234567890",
"isReply": false,
"isQuote": false,
"hashtags": ["crypto", "bitcoin"],
"media": [
{
"type": "photo",
"url": "https://...",
"thumbUrl": "https://..."
}
],
"urls": [
{
"url": "https://...",
"expandedUrl": "https://...",
"displayUrl": "example.com"
}
],
"mentions": [
{
"username": "VitalikButerin",
"name": "Vitalik Buterin"
}
]
}
NEW_FOLLOWER - 新关注者NEW_UNFOLLOWER - 取消关注动态关注者动态的内容结构(数组):
[
{
"id": 123,
"twId": 44196397,
"twAccount": "elonmusk",
"twUserName": "Elon Musk",
"twUserLabel": "已验证",
"description": "用户简介...",
"profileUrl": "https://...",
"bannerUrl": "https://...",
"followerCount": 170000000,
"friendCount": 500,
"createdAt": "2026-03-06T10:00:00Z"
}
]
UPDATE_NAME - 用户名更改(内容:新名字字符串)UPDATE_DESCRIPTION - 简介更新(内容:新简介字符串)UPDATE_AVATAR - 头像更改(内容:新头像 URL 字符串)UPDATE_BANNER - 横幅图片更改(内容:新横幅 URL 字符串)TWEET_TOPPING - 推文置顶DELETE - 推文删除SYSTEM - 系统动态TRANSLATE - 推文翻译CA_CREATE - CA 代币创建{
"userId": "44196397",
"screenName": "elonmusk",
"name": "Elon Musk",
"description": "...",
"followersCount": 170000000,
"friendsCount": 500,
"statusesCount": 30000,
"verified": true
}
{
"id": "1234567890",
"text": "推文内容...",
"createdAt": "2024-02-20T12:00:00Z",
"retweetCount": 1000,
"favoriteCount": 5000,
"replyCount": 200,
"userScreenName": "elonmusk",
"hashtags": ["crypto", "bitcoin"],
"urls": [{"url": "https://..."}]
}
curl -s -X POST "https://ai.6551.io/open/twitter_user_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "VitalikButerin", "maxResults": 10}'
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": "bitcoin", "minLikes": 1000, "product": "Top", "maxResults": 20}'
每周安装量
472
代码仓库
GitHub 星标数
380
首次出现
12 天前
安全审计
安装于
codex461
kimi-cli460
gemini-cli460
amp460
github-copilot460
opencode460
Query Twitter/X data from the 6551 platform REST API. All endpoints require a Bearer token via $TWITTER_TOKEN.
Get your token : https://6551.io/mcp
Base URL : https://ai.6551.io
All requests require the header:
Authorization: Bearer $TWITTER_TOKEN
Get user profile by username.
curl -s -X POST "https://ai.6551.io/open/twitter_user_info" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
Get user profile by numeric ID.
curl -s -X POST "https://ai.6551.io/open/twitter_user_by_id" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId": "44196397"}'
Get recent tweets from a user.
curl -s -X POST "https://ai.6551.io/open/twitter_user_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "maxResults": 20, "product": "Latest"}'
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | required | Twitter username (without @) |
maxResults | integer | 20 | Max tweets (1-100) |
product | string | "Latest" | "Latest" or "Top" |
includeReplies | boolean | false | Include reply tweets |
Search tweets with various filters.
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": "bitcoin", "maxResults": 20, "product": "Top"}'
Search from specific user:
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fromUser": "VitalikButerin", "maxResults": 20}'
Search by hashtag:
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hashtag": "crypto", "minLikes": 100, "maxResults": 20}'
| Parameter | Type | Default | Description |
|---|---|---|---|
keywords | string | - | Search keywords |
fromUser | string | - | Tweets from specific user |
toUser | string | - | Tweets to specific user |
mentionUser | string | - | Tweets mentioning user |
Get new followers or unfollowers for a user.
# Get new followers
curl -s -X POST "https://ai.6551.io/open/twitter_follower_events" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "isFollow": true, "maxResults": 20}'
# Get unfollowers
curl -s -X POST "https://ai.6551.io/open/twitter_follower_events" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "isFollow": false, "maxResults": 20}'
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | required | Twitter username (without @) |
isFollow | boolean | true | true=new followers, false=unfollowers |
maxResults | integer | 20 | Max events (1-100) |
Get deleted tweets from a user.
curl -s -X POST "https://ai.6551.io/open/twitter_deleted_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk", "maxResults": 20}'
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | required | Twitter username (without @) |
maxResults | integer | 20 | Max tweets (1-100) |
Get which KOLs (Key Opinion Leaders) are following a user.
curl -s -X POST "https://ai.6551.io/open/twitter_kol_followers" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | required | Twitter username (without @) |
Get Twitter article by ID.
curl -s -X POST "https://ai.6551.io/open/twitter_article_by_id" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "article_id"}'
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | required | Twitter article ID |
Get all Twitter monitoring users for the current user.
curl -s -X POST "https://ai.6551.io/open/twitter_watch" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Add a Twitter user to monitoring list.
curl -s -X POST "https://ai.6551.io/open/twitter_watch_add" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
| Parameter | Type | Default | Description |
|---|---|---|---|
username | string | required | Twitter username (without @) |
Delete a Twitter user from monitoring list.
curl -s -X POST "https://ai.6551.io/open/twitter_watch_delete" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": 123}'
| Parameter | Type | Default | Description |
|---|---|---|---|
id | integer | required | Monitoring record ID to delete |
Endpoint : wss://ai.6551.io/open/twitter_wss?token=YOUR_TOKEN
Subscribe to real-time events from your monitored Twitter accounts.
{
"jsonrpc": "2.0",
"id": 1,
"method": "twitter.subscribe"
}
Response :
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"success": true
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "twitter.unsubscribe"
}
When a monitored account has activity, the server pushes:
{
"jsonrpc": "2.0",
"method": "twitter.event",
"params": {
"id": 123456,
"twAccount": "elonmusk",
"twUserName": "Elon Musk",
"profileUrl": "https://twitter.com/elonmusk",
"eventType": "NEW_TWEET",
"content": "...",
"ca": "0x1234...",
"remark": "Custom note",
"createdAt": "2026-03-06T10:00:00Z"
}
}
Note : The content field structure varies by event type (see below).
**Event Types and Content Structure**:
#### Tweet Events
- `NEW_TWEET` - New tweet posted
- `NEW_TWEET_REPLY` - New reply tweet
- `NEW_TWEET_QUOTE` - New quote tweet
- `NEW_RETWEET` - Retweeted
- `CA` - Tweet with CA address
Content structure for tweet events:
```json
{
"id": "1234567890",
"text": "Tweet content...",
"createdAt": "2026-03-06T10:00:00Z",
"language": "en",
"retweetCount": 100,
"favoriteCount": 500,
"replyCount": 20,
"quoteCount": 10,
"viewCount": 10000,
"userScreenName": "elonmusk",
"userName": "Elon Musk",
"userIdStr": "44196397",
"userFollowers": 170000000,
"userVerified": true,
"conversationId": "1234567890",
"isReply": false,
"isQuote": false,
"hashtags": ["crypto", "bitcoin"],
"media": [
{
"type": "photo",
"url": "https://...",
"thumbUrl": "https://..."
}
],
"urls": [
{
"url": "https://...",
"expandedUrl": "https://...",
"displayUrl": "example.com"
}
],
"mentions": [
{
"username": "VitalikButerin",
"name": "Vitalik Buterin"
}
]
}
NEW_FOLLOWER - New followerNEW_UNFOLLOWER - Unfollower eventContent structure for follower events (array):
[
{
"id": 123,
"twId": 44196397,
"twAccount": "elonmusk",
"twUserName": "Elon Musk",
"twUserLabel": "Verified",
"description": "User bio...",
"profileUrl": "https://...",
"bannerUrl": "https://...",
"followerCount": 170000000,
"friendCount": 500,
"createdAt": "2026-03-06T10:00:00Z"
}
]
UPDATE_NAME - Username changed (content: new name string)UPDATE_DESCRIPTION - Bio updated (content: new description string)UPDATE_AVATAR - Profile picture changed (content: new avatar URL string)UPDATE_BANNER - Banner image changed (content: new banner URL string)TWEET_TOPPING - Tweet pinnedDELETE - Tweet deletedSYSTEM - System eventTRANSLATE - Tweet translationCA_CREATE - CA token created{
"userId": "44196397",
"screenName": "elonmusk",
"name": "Elon Musk",
"description": "...",
"followersCount": 170000000,
"friendsCount": 500,
"statusesCount": 30000,
"verified": true
}
{
"id": "1234567890",
"text": "Tweet content...",
"createdAt": "2024-02-20T12:00:00Z",
"retweetCount": 1000,
"favoriteCount": 5000,
"replyCount": 200,
"userScreenName": "elonmusk",
"hashtags": ["crypto", "bitcoin"],
"urls": [{"url": "https://..."}]
}
curl -s -X POST "https://ai.6551.io/open/twitter_user_tweets" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username": "VitalikButerin", "maxResults": 10}'
curl -s -X POST "https://ai.6551.io/open/twitter_search" \
-H "Authorization: Bearer $TWITTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords": "bitcoin", "minLikes": 1000, "product": "Top", "maxResults": 20}'
Weekly Installs
472
Repository
GitHub Stars
380
First Seen
12 days ago
Security Audits
Gen Agent Trust HubPassSocketFailSnykWarn
Installed on
codex461
kimi-cli460
gemini-cli460
amp460
github-copilot460
opencode460
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
40,800 周安装
includeRetweets| boolean |
| false |
| Include retweets |
hashtag| string |
| - |
| Filter by hashtag (without #) |
excludeReplies | boolean | false | Exclude reply tweets |
excludeRetweets | boolean | false | Exclude retweets |
minLikes | integer | 0 | Minimum likes threshold |
minRetweets | integer | 0 | Minimum retweets threshold |
minReplies | integer | 0 | Minimum replies threshold |
sinceDate | string | - | Start date (YYYY-MM-DD) |
untilDate | string | - | End date (YYYY-MM-DD) |
lang | string | - | Language code (e.g. "en", "zh") |
product | string | "Top" | "Top" or "Latest" |
maxResults | integer | 20 | Max tweets (1-100) |