mp2rss-x
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemp2rss-x Skill
mp2rss-x Skill
通过 Mp2rss CLI 管理 X(Twitter)信息源的只读访问 —— 列出已订阅 X 账号、按 xUserId 拉推文与长文。
Provides read-only access to X (Twitter) feeds through the Mp2rss CLI — list subscribed X accounts and fetch posts and long-form articles by xUserId.
Prerequisites
Prerequisites
- 二进制已安装(参考
mp2rss的 Prerequisites)mp2rss-auth - 已登录:显示
mp2rss auth status(首次使用先跑loggedIn: true)mp2rss auth login - 要操作的 X 账号已在 Web 控制台订阅(CLI 不支持 )
subscribe
- The binary is installed (see the Prerequisites for
mp2rss)mp2rss-auth - You are logged in: displays
mp2rss auth status(runloggedIn: truebefore first use)mp2rss auth login - The X account you want to work with has already been subscribed to via the Web console (the CLI does not support )
subscribe
范围边界(重要)
Scope boundaries (important)
| 操作 | CLI 是否支持 | 去哪里做 |
|---|---|---|
| ✅ | 本 skill |
| ✅ | 本 skill |
| ✅ | 本 skill |
| ❌ | https://mp2rss.bugcode.dev Web 控制台 |
| ❌ | https://mp2rss.bugcode.dev Web 控制台 |
| ❌ | https://mp2rss.bugcode.dev Web 控制台 |
用户说「订阅这个 X 账号」/「把 X 上的 xxx 加进来」/「搜一下 X 上的 xxx」时,不要尝试构造之类的命令(不存在),直接告诉用户去 Web 控制台操作。mp2rss x subscribe
| Operation | Supported by CLI | Where to do it |
|---|---|---|
| ✅ | This skill |
| ✅ | This skill |
| ✅ | This skill |
| ❌ | https://mp2rss.bugcode.dev Web console |
| ❌ | https://mp2rss.bugcode.dev Web console |
| ❌ | https://mp2rss.bugcode.dev Web console |
When users say “Subscribe to this X account” / “Add xxx from X” / “Search for xxx on X,” do not attempt to construct commands such as(they do not exist); simply tell the user to use the Web console.mp2rss x subscribe
Commands
Commands
List subscribed X accounts
List subscribed X accounts
mp2rss x list [-q <keyword>] [-p <page>] [--page-size <n>] [-o json]| Flag | Default | Description |
|---|---|---|
| — | 按 displayName / username 模糊搜索(仅 server 支持时生效;不支持时退化为客户端筛 X 项) |
| 1 | 页码 |
| 20 | 每页条数(最大 50) |
| table | |
bash
mp2rss x list
mp2rss x list -q claude
mp2rss x list -p 2 --page-size 50
mp2rss x list -o json | jq '.items[].xDisplayName'底层调 ;若 server 不识别 ,CLI 客户端会兜底剔除 mp 项。
GET /open-api/subscriptions?sourceType=xsourceTypeJSON shape:
json
{
"items": [
{
"sourceType": "x",
"xUserId": "44196397",
"xUsername": "elonmusk",
"xDisplayName": "Elon Musk",
"xAvatarUrl": "https://...",
"xVerified": true,
"xLastItemAt": 1705000050000,
"createdAt": 1705000000000
}
],
"total": 12,
"page": 1,
"pageSize": 20
}mp2rss x list [-q <keyword>] [-p <page>] [--page-size <n>] [-o json]| Flag | Default | Description |
|---|---|---|
| — | Fuzzy search by displayName / username (only effective when supported by the server; otherwise, it falls back to filtering X items on the client) |
| 1 | Page number |
| 20 | Number of items per page (maximum 50) |
| table | |
bash
mp2rss x list
mp2rss x list -q claude
mp2rss x list -p 2 --page-size 50
mp2rss x list -o json | jq '.items[].xDisplayName'Calls internally; if the server does not recognize , the CLI client falls back to removing mp items.
GET /open-api/subscriptions?sourceType=xsourceTypeJSON shape:
json
{
"items": [
{
"sourceType": "x",
"xUserId": "44196397",
"xUsername": "elonmusk",
"xDisplayName": "Elon Musk",
"xAvatarUrl": "https://...",
"xVerified": true,
"xLastItemAt": 1705000050000,
"createdAt": 1705000000000
}
],
"total": 12,
"page": 1,
"pageSize": 20
}List posts (推文流)
List posts (post feed)
mp2rss x posts <xUserId> [-p <page>] [--page-size <n>] [-o json]按 分页拉某个已订阅 X 账号的推文。
postedAt DESC| Flag | Default | Description |
|---|---|---|
| 1 | 页码 |
| 20 | 每页条数(最大 50) |
| table | |
bash
mp2rss x posts 44196397
mp2rss x posts 44196397 -p 2 --page-size 50
mp2rss x posts 44196397 -o json | jq '.items[].content'JSON shape:
json
{
"items": [
{
"postId": "1234567890",
"content": "推文正文",
"media": [{"url": "https://...", "type": "image"}],
"retweetedPost": null,
"quotedPost": null,
"threadPosts": [],
"postedAt": 1705000000000
}
],
"total": 87,
"page": 1,
"pageSize": 20
}字段说明:
- —— 推文附带的图片 / 视频,
media取值如type/imagevideo - /
retweetedPost—— 原始推文的嵌套对象(可能为quotedPost)null - —— 同一作者的线程后续推文(可能为空数组)
threadPosts - 未订阅的 返回 404
xUserId(exit codeX account is not subscribed)4
mp2rss x posts <xUserId> [-p <page>] [--page-size <n>] [-o json]Retrieves the post feed of a subscribed X account in pages, sorted by .
postedAt DESC| Flag | Default | Description |
|---|---|---|
| 1 | Page number |
| 20 | Number of items per page (maximum 50) |
| table | |
bash
mp2rss x posts 44196397
mp2rss x posts 44196397 -p 2 --page-size 50
mp2rss x posts 44196397 -o json | jq '.items[].content'JSON shape:
json
{
"items": [
{
"postId": "1234567890",
"content": "推文正文",
"media": [{"url": "https://...", "type": "image"}],
"retweetedPost": null,
"quotedPost": null,
"threadPosts": [],
"postedAt": 1705000000000
}
],
"total": 87,
"page": 1,
"pageSize": 20
}Field descriptions:
- — Images or videos attached to the post;
mediacan be a value such astype/imagevideo - /
retweetedPost— Nested objects for the original post (may bequotedPost)null - — Follow-up posts by the same author in the same thread (may be an empty array)
threadPosts - An unsubscribed returns 404
xUserId(exit codeX account is not subscribed)4
List articles (长文流)
List articles (X Articles feed)
mp2rss x articles <xUserId> [-p <page>] [--page-size <n>] [-o json]按 分页拉某个已订阅 X 账号的长文(X Articles)。
publishedAt DESC| Flag | Default | Description |
|---|---|---|
| 1 | 页码 |
| 20 | 每页条数(最大 50) |
| table | |
bash
mp2rss x articles 44196397
mp2rss x articles 44196397 -p 2 --page-size 50
mp2rss x articles 44196397 -o json | jq '.items[].title'JSON shape:
json
{
"items": [
{
"url": "https://x.com/.../article/...",
"title": "长文标题",
"description": "长文摘要",
"contentMarkdown": "# Markdown 正文(可能为 null)",
"coverUrl": "https://...",
"publishedAt": 1705000000000
}
],
"total": 3,
"page": 1,
"pageSize": 20
}- 未订阅的 返回 404
xUserId(exit codeX account is not subscribed)4 - 是上游推送的 markdown 原文,可能为
contentMarkdownnull
mp2rss x articles <xUserId> [-p <page>] [--page-size <n>] [-o json]Retrieves the long-form article feed (X Articles) of a subscribed X account in pages, sorted by .
publishedAt DESC| Flag | Default | Description |
|---|---|---|
| 1 | Page number |
| 20 | Number of items per page (maximum 50) |
| table | |
bash
mp2rss x articles 44196397
mp2rss x articles 44196397 -p 2 --page-size 50
mp2rss x articles 44196397 -o json | jq '.items[].title'JSON shape:
json
{
"items": [
{
"url": "https://x.com/.../article/...",
"title": "长文标题",
"description": "长文摘要",
"contentMarkdown": "# Markdown 正文(可能为 null)",
"coverUrl": "https://...",
"publishedAt": 1705000000000
}
],
"total": 3,
"page": 1,
"pageSize": 20
}- An unsubscribed returns 404
xUserId(exit codeX account is not subscribed)4 - is the original Markdown content supplied by the upstream provider and may be
contentMarkdownnull
Agent Usage Notes
Agent Usage Notes
- 是字符串(X 平台原生数字 ID,序列化为 string),不要按 number 解析;
xUserId那边的mp2rss mp才是 int64mpId - 解析批量输出统一加
-o json - 时间字段均为 unix 毫秒数(number):/
createdAt/xLastItemAt/postedAtpublishedAt - 字段命名统一 camelCase:/
xUserId/xUsername/xDisplayName/xAvatarUrl/xVerified/xLastItemAt/sourceType/postId/coverUrlcontentMarkdown - 不存在的子命令:/
x subscribe/x remove—— 用户提相关需求时直接引导去 Web 控制台 https://mp2rss.bugcode.dev,不要去 CLI 里找替代命令x search - /
x posts都带分页元数据(x articles/total/page)—— 这一点与pageSize(无分页字段)不同,按mp articles判断是否还有下一页即可total - 三个命令一致上限 50;超过会返回
--page-size(exit code参数错误)2 - 限流:与 mp 命令共用每个 Feed Key 60 次/分钟的额度;CLI 自动间隔 ≥ 1.2s 并按 等待重试一次,仍被拒时 envelope 带
Retry-After,不要立刻重试"kind":"rate_limited" - 的
x list -q <kw>走服务端模糊搜索 displayName / username;若服务端不识别,CLI 会退化为按-q客户端过滤(即sourceType=x失效,但不会报错)-q - 拿到 的常规链路:先跑
xUserId从mp2rss x list -o json取,再喂给items[].xUserId/x postsx articles - 错误 JSON 形态:;
{"error":{"message":"...","code":<int>}}优先用 HTTP 状态码(来自上游),否则回退到 CLI exit code(参数 / 鉴权类错误)code - Exit codes:成功;
0通用错误(网络);1参数错误(含2越界);--page-size鉴权失败 → 引导用户跑3(参考mp2rss auth loginskill);mp2rss-auth资源不存在(4未订阅或不存在);xUserId上游不可用5
- is a string (the native numeric ID on the X platform, serialized as a string); do not parse it as a number.
xUserIdon thempIdside is int64mp2rss mp - Use consistently when parsing bulk output
-o json - All time fields are Unix timestamps in milliseconds (number): /
createdAt/xLastItemAt/postedAtpublishedAt - Field names consistently use camelCase: /
xUserId/xUsername/xDisplayName/xAvatarUrl/xVerified/xLastItemAt/sourceType/postId/coverUrlcontentMarkdown - Nonexistent subcommands: /
x subscribe/x remove— when users request these actions, direct them to the Web console at https://mp2rss.bugcode.dev; do not look for alternatives in the CLIx search - Both and
x postsinclude pagination metadata (x articles/total/page). This differs frompageSize(which has no pagination fields); usemp articlesto determine whether another page existstotal - has a maximum of 50 across all three commands; exceeding it returns
--page-size(exit code参数错误)2 - Rate limiting: the x and mp commands share a quota of 60 requests per minute per Feed Key. The CLI automatically spaces requests by at least 1.2 seconds and waits according to for one retry. If the request is still rejected, the envelope contains
Retry-After; do not retry immediately"kind":"rate_limited" - For ,
x list -q <kw>performs a server-side fuzzy search by displayName / username. If the server does not recognize it, the CLI falls back to client-side filtering by-q(meaningsourceType=xhas no effect, but no error is reported)-q - Standard flow for obtaining an : first run
xUserId, retrievemp2rss x list -o json, and then pass it toitems[].xUserId/x postsx articles - Error JSON shape: ; prioritize the HTTP status code for
{"error":{"message":"...","code":<int>}}when supplied by the upstream service, and otherwise fall back to the CLI exit code (parameter / authentication errors)code - Exit codes: success;
0generic error (network);1invalid parameters (including an out-of-range2);--page-sizeauthentication failure → direct the user to run3(see themp2rss auth loginskill);mp2rss-authresource not found (4is unsubscribed or does not exist);xUserIdupstream service unavailable5