Server scenarios fail servers for capabilities they never declared
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 40/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- testing-qa
调研方向
Examine the conformance test suite structure, likely in a src/ or tests/ directory. Look for scenario definitions and how they are gated or filtered. The issue mentions specific scenario categories like prompts-* and resources-*. Find where server capabilities from the initialize method are read and used to determine test applicability. Understanding the test runner and reporting logic is key to implementing the suggested gating.
由索引模型根据 Issue 内容生成。
描述
The same minimal server as above declares only tools. Against it, server mode reports 6 passed, 24 failed. Nearly all of the 24 are not conformance failures:
| Cause | Scenarios |
|---|---|
Capability not declared; -32601 Method not found is the correct answer |
prompts-* (5), resources-* (6), logging-set-level, tools-call-with-logging, completion-complete |
Fixture tool not present (test_image_content, test_tool_with_progress, …) |
tools-call-image, -audio, -embedded-resource, -mixed-content, -with-progress, -sampling, -elicitation, elicitation-sep1034-defaults, elicitation-sep1330-enums |
| Genuine | dns-rebinding-protection (served a foreign Host/Origin with 200) |
For comparison, @modelcontextprotocol/server-everything 2026.8.31 scores 13 passed, 19 failed on 0.1.16.
This is expected for a suite built to test SDKs against the everything-server. The result is still that the suite cannot be pointed at a production server to answer "is this server conformant?", which is the question most operators and registries are asking. A correct server scores 6/30, and its only real defect is buried among 23 false ones.
Suggestions, cheapest first:
- Gate on declared capabilities. Read
capabilitiesfrominitializeand report prompts, resources, logging and completions scenarios as not applicable when the capability is absent. Answering-32601for an undeclared capability is what the spec says to do. - Mark fixture-dependent scenarios (those that call
test_*tools ortest://resources) as needing the fixture, and report them as not applicable when the tool is missing fromtools/list, rather than failing them. - A capability-agnostic suite (e.g.
--suite production) holding only the scenarios that apply to any server: initialize, ping,tools/listshape, unknown-method and invalid-params handling, session handling, protocol-version header validation, and DNS-rebinding protection. That would let registries and operators cite the official suite for a real server.
Happy to contribute scenarios for (3) if that direction is welcome.
- 主要语言
- TypeScript
- 星标
- 127
- 派生
- 101
- 平均合并
- 4 天 7 小时
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/conformance 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/conformance#315 · 1 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/conformance#312 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 65/100
查看 modelcontextprotocol/conformance 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100