CLI and mcpdo JSON error envelopes drop the structured Retry-After data from a 429
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start in core/cli/error-handler.ts and read how it builds the shared JSON error envelope, then trace AnnotatedRateLimitData in core/mcp/rateLimit.ts. Follow each CLI's output path and add or update tests for both clients, including parsed, malformed, and missing Retry-After values. Done means both envelopes preserve the structured data consistently and the issue's open decision about a dedicated code and exit code is resolved.
索引モデルが issue の本文から書いたものです。
説明
Found during the v2.12.0 release smoke (#2764), while verifying #2442 / PR #2737.
Problem
#2737 annotates a throttled request's error with structured rate-limit data on error.data (AnnotatedRateLimitData in core/mcp/rateLimit.ts: method, retryAfter, retryAfterMs). That is so "any consumer that wants a countdown or JSON output" can act on it. The CLIs' JSON error envelopes drop it, so a script driving them can only scrape the prose message:
# one-shot CLI, tools/list answered with 429 + Retry-After: 30
{"error":{"code":"error","message":"Rate limited by the server (HTTP 429) on tools/list. The server asked to retry after 30s. Error POSTing to endpoint: slow down","cause":"Error POSTing to endpoint: slow down","status":429}}
# mcpdo, same server
{"error":{"code":"error","message":"Rate limited by the server (HTTP 429) on tools/list. The server asked to retry after 30s. Error POSTing to endpoint: slow down"}}
The envelope is built in core/cli/error-handler.ts, which both CLIs share (#2461).
Expected
When the error carries rate-limit data, the envelope adds the structured fields alongside the existing ones, for example:
{"error":{"code":"rate_limited","message":"…","status":429,"method":"tools/list","retryAfter":"30","retryAfterMs":30000}}
retryAfteris the header as sent, whichAnnotatedRateLimitDataalready preserves verbatim for a malformed value.retryAfterMsis present only when the header parsed.- A missing header omits both fields rather than emitting
null, or emitsnullconsistently, whichever the envelope's existing conventions favor. - Whether a dedicated
code(and exit code) is worth adding for rate limiting is part of this issue to decide. The current"error"/ exit 1 is the fallback.
Both CLIs need tests, since the envelope is shared but each client's output path is separate.
- 主要言語
- TypeScript
- スター
- 11.1k
- フォーク
- 1.6k
- 平均マージ
- 5時間 29分
- マージ済み PR(30日)
- 158
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/inspector のほかの issue
-
CLI tests seed the developer's real ~/.mcp-inspector/mcp.json (cli.test.ts, completion.test.ts)オープンbug v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/inspector#2765 ·
メンテナーはふだん 1 日以内に返信
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/inspector#2752 ·
メンテナーはふだん 1 日以内に返信
-
bug v2
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
modelcontextprotocol/inspector#2768 ·
メンテナーはふだん 1 日以内に返信
-
enhancement v2
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
modelcontextprotocol/inspector#2766 ·
メンテナーはふだん 1 日以内に返信
-
documentation v2
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
modelcontextprotocol/inspector#2755 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/inspector の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
cursor/community-plugins#465 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vetro-protocol/vetro-monorepo#978 ·
メンテナーはふだん 1 日以内に返信
-
ai-generated bug category:security effort:s priority:p3
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
LanternOps/breeze#9697 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
maniator/verticopolis#1303 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
components-web-app/docs#297 ·