CLI: warn when a misspelled Inspector flag after a stdio target is forwarded to the server (--tool-agr → "did you mean --tool-arg?")
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cli, node.js, typescript
- Ambito
- cli
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 11.3k
- Fork
- 1.6k
- Merge medio
- 2h 28m
- PR unite (30g)
- 111
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/inspector
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
modelcontextprotocol/inspector#3073 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
modelcontextprotocol/inspector#3072 ·
I maintainer di solito rispondono entro 1 giorno
-
CLI/mcpdo: a timeout above 2147483647 ms fires after 1 ms, and the error says to raise it furtherApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/inspector#3071 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelcontextprotocol/inspector#3069 ·
I maintainer di solito rispondono entro 1 giorno
-
CLI --tool-args-json silently sends 1e400 as null (round-trip guard missing; mcpdo rejects it)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelcontextprotocol/inspector#3067 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelcontextprotocol/inspector
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#3028 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Koenkk/zigbee2mqtt#33855 ·
I maintainer di solito rispondono entro 1 giorno