CLI: method-specific flags given to another method are silently ignored (--cursor / --tool-arg on tools/list, …)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 62/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- nodejs, typescript
- Bereich
- cli
Rechercherichtung
Die Flags werden in der CLI-Argumentbehandlung für den --cli-Modus des Inspectors geparst, wo --load-scenario und --advertise-apps bereits inkompatible Flags mit einem Usage-Fehler ablehnen. Beginne dort und suche nach der bestehenden Validierung von Methode zu Flag. Füge eine ähnliche Prüfung hinzu, damit --cursor, --tool-arg und die anderen methodenspezifischen Flags mit einer Meldung fehlschlagen, die die Methoden nennt, für die sie gelten. Fertig, wenn tools/list --cursor abc mit einem Exit-Code ungleich null und dieser Meldung endet und die gültigen Kombinationen weiterhin laufen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 --cursor abc # exit 0, full list
mcp-inspector --cli node probe-echo.mjs --method tools/list --tool-arg a=1 # exit 0
Expected behavior
A usage error naming the methods the flag applies to. The CLI already follows this rule elsewhere: --advertise-apps and --strict are rejected where they would be ignored (the code comment: an invocation "cannot accept the flag and ignore it"), and --load-scenario rejects --tool-name / --tool-arg because they "would be silently overridden".
Actual behavior
Exit 0; the flag has no effect. This matters most for --cursor: tools/list, resources/list and prompts/list take a cursor in MCP, so a script paging with --cursor appears to work but gets the same page every time.
Logs, errors, or screenshots
Suggested fix: a table from each method-specific flag (--tool-name, --tool-arg, --tool-args-json, --tool-metadata, --prompt-name, --prompt-args, --uri, --cursor, --event-name, --event-arg, --log-level) to the methods that use it, rejecting any other combination. Alternatively, support --cursor on the */list methods.
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).
- Vorherrschende Sprache
- TypeScript
- Sterne
- 11.3k
- Forks
- 1.6k
- Ø Merge
- 2 Std. 28 Min.
- Gemergte PRs (30 T.)
- 111
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus modelcontextprotocol/inspector
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
modelcontextprotocol/inspector#3072 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CLI/mcpdo: a timeout above 2147483647 ms fires after 1 ms, and the error says to raise it furtherOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
modelcontextprotocol/inspector#3071 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
modelcontextprotocol/inspector#3069 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CLI --tool-args-json silently sends 1e400 as null (round-trip guard missing; mcpdo rejects it)Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
modelcontextprotocol/inspector#3067 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
modelcontextprotocol/inspector#3066 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in modelcontextprotocol/inspector
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
MetaMask/eth-phishing-detect#317371 ·
Maintainer antworten meist innerhalb von 1 Tag
-
android:player ios:player
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
erkamyaman/rust-anything#963 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug(worker): detector run is marked failed and never retried when span download failsEvtl. vergeben @jagrutgarg hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
traceroot-ai/traceroot#3434 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag