TypeScript client accepts an unknown `resultType` in the first `server/discover` reply

未关闭 适合新手
#3,235 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Tidehyc 已经在做这个了。

开始于 2026年11月27日。

  • #3244 来自 @Tidehyc —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

先追踪 TypeScript 客户端如何解析 server/discover 的第一条回复并验证 resultType;issue 没有指定文件或测试。为 "partial" 这类无法识别的值添加测试覆盖,并确认客户端会按规范要求拒绝该回复。

由索引模型根据 Issue 内容生成。

描述

v2

In @modelcontextprotocol/client 2.4.0, the client appears to accept any unrecognized resultType string in the first server/discover reply. In my test, it accepted "partial" and used the capabilities listed in the reply.

The client should reject the reply because it doesn’t recognize "partial". The spec says, “A resultType of any value unrecognized by the client MUST be considered invalid.”

主要语言
TypeScript
星标
13.8k
派生
2.5k
平均合并
6 天 23 小时
30 天内合并 PR
2

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/typescript-sdk 的其他 Issue

查看 modelcontextprotocol/typescript-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。