CLI/mcpdo: a timeout above 2147483647 ms fires after 1 ms, and the error says to raise it further
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nodejs, typescript
- Área
- cli
Línea de trabajo
Empieza con el parser de --connect-timeout en clients/cli/src/cli.ts, alrededor de las líneas 1581-1589, que solo comprueba que el valor sea finito y no negativo. Revisa también cómo se pasan connectionTimeout del catálogo y el valor de --wait-for-auth a setTimeout. Se considera terminado cuando los valores superiores a 2147483647 ms se limitan o se rechazan con un error de uso, y no aparece ninguna TimeoutOverflowWarning durante el polling.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- TypeScript
- Estrellas
- 11.3k
- Forks
- 1.6k
- Merge medio
- 2 h 28 min
- PR fusionados (30 d)
- 111
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/inspector
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
modelcontextprotocol/inspector#3073 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
modelcontextprotocol/inspector#3072 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/inspector#3069 ·
Los mantenedores suelen responder en 1 día
-
CLI --tool-args-json silently sends 1e400 as null (round-trip guard missing; mcpdo rejects it)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/inspector#3067 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/inspector#3066 ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/inspector
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MetaMask/eth-phishing-detect#317371 ·
Los mantenedores suelen responder en 1 día
-
android:player ios:player
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
erkamyaman/rust-anything#963 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
Los mantenedores suelen responder en 1 día
-
bug(worker): detector run is marked failed and never retried when span download failsPosiblemente ocupada @jagrutgarg la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
traceroot-ai/traceroot#3434 · 1 comentario ·
Los mantenedores suelen responder en 1 día