CLI/mcpdo: a timeout above 2147483647 ms fires after 1 ms, and the error says to raise it further
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nodejs, typescript
- 領域
- cli
調査の方向性
clients/cli/src/cli.ts の 1581-1589 行目付近にある --connect-timeout のパーサから始めてください。このパーサは値が有限で非負であることしか確認していません。また、カタログの connectionTimeout と --wait-for-auth の値が setTimeout にどのように渡されるかも確認してください。2147483647 ms を超える値が上限に丸められるか、usage エラーで拒否され、ポーリング中に TimeoutOverflowWarning が表示されなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Which version line?
v2 — current (@modelcontextprotocol/inspector@latest)
Which client?
CLI
Inspector version
2.17.0 (main @ 2069a1a, built from source)
Node version
v22.23.5
Operating system (and browser, for the web client)
Linux
Transport
stdio
MCP server under inspection
Minimal echo server (probe-echo.mjs), SDK 2.4.0:
import * as z from "zod/v4";
import { McpServer } from "@modelcontextprotocol/server";
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
const server = new McpServer({ name: "probe-echo", version: "1.0.0" });
server.registerTool("echo_raw", { description: "Echo raw arguments", inputSchema: z.object({}).passthrough() },
async (args) => ({ content: [{ type: "text", text: JSON.stringify(args) }] }));
server.registerPrompt("echo_prompt", { description: "Echo", argsSchema: { a: z.string().optional(), b: z.string().optional() } },
async (args) => ({ messages: [{ role: "user", content: { type: "text", text: JSON.stringify(args) } }] }));
await server.connect(new StdioServerTransport());
Steps to reproduce
mcp-inspector --cli node probe-echo.mjs --method tools/list --connect-timeout 2147483648
Also:
"connectionTimeout": 2147483648in a--config/ catalog entrymcpdo connect @h --connect-timeout 2147483648 -- node server.mjs--wait-for-auth 3000000(seconds, > 2^31 ms)
Expected behavior
Clamp to 2^31-1 ms (≈24.8 days, effectively unbounded) or reject values above it as a usage error. A huge value means "very long"; 0 already means "no timeout".
Actual behavior
Exits 4 after ~0.4 s against a healthy server:
(node) TimeoutOverflowWarning: 2147483648 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
{"error":{"code":"unreachable","message":"Connection timed out after 2147483648 ms. To accommodate a slower server, pass a larger --connect-timeout <ms>, or set connectionTimeout on the server's catalog or config entry."}}
The remedy makes it worse. 2147483647 works. The config connectionTimeout and mcpdo connect fail the same way (mcpdo after ~2 s). --wait-for-auth 3000000 does not fail but prints a TimeoutOverflowWarning on every poll (40 in 20 s), flooding the stderr that carries the one-line envelope.
Logs, errors, or screenshots
Cause: the --connect-timeout parser (clients/cli/src/cli.ts:1581–1589) only checks Number.isFinite(n) && n >= 0; the catalog connectionTimeout is not range-checked either. Node's setTimeout treats anything above 2^31-1 as 1.
Already prototyped a fix?
No response
Before you submit
- I searched existing issues and this is not a duplicate.
- This is not a security vulnerability report (those go through the private advisory process).
- 主要言語
- TypeScript
- スター
- 11.3k
- フォーク
- 1.6k
- 平均マージ
- 2時間 28分
- マージ済み PR(30日)
- 111
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/inspector のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
modelcontextprotocol/inspector#3073 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
modelcontextprotocol/inspector#3072 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/inspector#3069 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/inspector#3067 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/inspector#3066 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/inspector の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MetaMask/eth-phishing-detect#317371 ·
メンテナーはふだん 1 日以内に返信
-
android:player ios:player
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
erkamyaman/rust-anything#963 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
メンテナーはふだん 1 日以内に返信
-
bug(worker): detector run is marked failed and never retried when span download fails対応中かも @jagrutgarg が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
traceroot-ai/traceroot#3434 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信