CLI: warn when a misspelled Inspector flag after a stdio target is forwarded to the server (--tool-agr → "did you mean --tool-arg?")
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cli, node.js, typescript
- Bereich
- cli
Rechercherichtung
The payload names no source file, so start with the CLI argument parsing that forwards unknown -- tokens to the server argv, and with docs/cli-smoke-testing.md for the CI context. Add a check that compares each forwarded token against the Inspector's own option names by edit distance 1-2, and print one stderr warning. Done when the example command still exits 0 and prints the "did you mean --tool-arg?" line, and a test covers both a near-miss and an unrelated forwarded flag.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Which client?
CLI
The problem
A one-letter typo in an Inspector flag after a stdio target is silently forwarded to the server's argv, and the run still passes:
mcp-inspector --cli node server.mjs --method tools/call --tool-name echo --tool-agr a=1
Exit 0; the tool is called with {} and --tool-agr a=1 is appended to the server's arguments. Forwarding unknown flags is documented and intentional, but in CI (docs/cli-smoke-testing.md) this gives a green job that tested nothing. A tool with only optional arguments never reveals the mistake. Verified on 2.17.0 (main @ 2069a1a), Linux, Node v22.23.5.
Solution you have in mind (optional)
Keep forwarding as is, but when a forwarded token starts with -- and is within edit distance 1–2 of an Inspector option, print one stderr line:
warning: --tool-agr was passed to the server; did you mean --tool-arg?
Optionally add --strict-flags (or an env var) to make it a usage error for CI. The same check would help mcpdo's positional forwarding.
Alternatives or workarounds you have tried
Placing -- between the target and the Inspector options makes ordering explicit, but it doesn't catch typos: a misspelled option after -- is still unknown to the Inspector.
Already built it locally?
No response
Before you submit
- I searched existing issues and this is not a duplicate.
- This is a request for the Inspector itself, not for the MCP specification or an SDK.
- 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 62/100
modelcontextprotocol/inspector#3073 ·
Maintainer antworten meist innerhalb von 1 Tag
-
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
Alle Issues in modelcontextprotocol/inspector
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
danielmiessler/LifeOS#3028 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Koenkk/zigbee2mqtt#33855 ·
Maintainer antworten meist innerhalb von 1 Tag