CLI: an unsupported --method plus a method-specific flag reports the flag error, not "Unsupported method"
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 67/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
Issue 指出了单次运行 CLI 的方法验证和针对各方法的 flag 检查,但没有提到文件或测试。先追踪 --method 支持在哪里检查,以及 --uri 和 --event-name 等 flag 在哪里验证;然后找到相关的 CLI 测试。当不支持的方法会先被报告为不受支持,再出现方法专属 flag 错误,并且现有的退出行为得以保留时,工作即告完成。
由索引模型根据 Issue 内容生成。
描述
Found during the v2.18.0 release smoke (#3127), driving #3073 / PR #3081.
Problem
PR #3081 says events/stream and resources/subscribe, which the one-shot CLI does not support, "are rejected as unsupported first". That holds only when no method-specific flag is passed. Given one, the flag's error wins, and it reads as if the method existed:
$ mcp-inspector --cli node srv.mjs --method resources/subscribe --uri file:///x
--uri applies only to --method resources/read, --method resources/directory/read or --method skills/get; it has no effect with --method resources/subscribe.
$ mcp-inspector --cli … --method events/stream --event-name x
--event-name applies only to --method events/poll; it has no effect with --method events/stream.
Without the flag, the CLI correctly prints Unsupported method: resources/subscribe. Supported --cli methods: …. Every case exits 1, so scripts are unaffected; only the message misleads.
Expected
An unsupported --method is reported as unsupported before the per-method flag checks run.
- 主要语言
- TypeScript
- 星标
- 11.4k
- 派生
- 1.6k
- 平均合并
- 2 小时 27 分钟
- 30 天内合并 PR
- 121
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/inspector 的其他 Issue
-
documentation v2
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/inspector#3139 · 1 条评论 ·
维护者通常 1 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/inspector#3136 · 1 条评论 ·
维护者通常 1 天内回复
-
bug v2
难度 1/5 1 小时以内 新手友好度 86/100
modelcontextprotocol/inspector#3132 · 1 条评论 ·
维护者通常 1 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 80/100
modelcontextprotocol/inspector#3131 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
modelcontextprotocol/inspector#3111 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/inspector 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 95/100
amosblomqvist/learnharness#1141 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
ranxianglei/billion-context#8319 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
tencent-connect/dsh-qqbot#148 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
JimLiu/open-artifact#126 ·
-
难度 2/5 1-3 小时 新手友好度 78/100