跳到主内容
@wquguru
精选85MCP TypeScript SDK(GitHub Releases)AI 编程与模型

@modelcontextprotocol/[email protected] 新增 Skills 扩展及缓存字段变更

@modelcontextprotocol/[email protected]

原文
发到 X
推荐理由

涉及 MCP 核心协议扩展与缓存字段的强制要求变更,使用 MCP TypeScript SDK 的开发者需关注 2026-07-28 的生效节点以适配新规范。

Minor Changes

次要更改

  • #3047 46d9c99 Thanks @KKonstantinov, @tobi-oye, @mattzcarey! - Add the Skills extension (SEP-2640), reachable through new ext/skills subpaths; package root exports are unchanged.
  • @modelcontextprotocol/server/ext/skills: SkillsExtension (attach(server) serves skills/list, skills/get, resources/directory/read and a skill://{+path} resource template), SkillsExtension.load(files) returning a SkillCatalog with entries and reload(), the SkillFiles storage adapter with memorySkillFiles, SkillSource for generated catalogs, skillEntry, and SkillCatalogError. Invalid skills are skipped with a warning (onWarning), or fail under strict. A file whose bytes are valid UTF-8 is served as text, whatever its MIME type; any other file as a base64 blob.
  • @modelcontextprotocol/server/ext/skills/node: loadSkills(folder) and nodeSkillFiles(folder).
  • @modelcontextprotocol/client/ext/skills: SkillsClient with list() (throws on an invalid entry; skipInvalid: true keeps the valid ones and returns the rest in invalid), get(), read(skill, path?) (size, digest and SKILL.md frontmatter verified, SkillVerificationError on a mismatch; a copy from the response cache that fails a check is fetched once more with cacheMode: 'refresh' first) and readDirectory().
  • @modelcontextprotocol/core/ext/skills: schemas, types and constants, including SKILL_LIMITS. The result schemas follow the stable spec, so ttlMs and cacheScope are required.
  • SkillsExtension.attach is @experimental: how an extension is wired to a server may change in a minor release. The rest of the Skills API is stable.
  • Works on 2025-11-25 and 2026-07-28. On 2026-07-28 only, the server sends the caching fields (ttlMs, cacheScope), and SkillsClient requires them and returns them from list(), get() and readDirectory().
  • #3047 46d9c99 感谢 @KKonstantinov、@tobi-oye、@mattzcarey! - 添加 Skills 扩展(SEP-2640),可通过新的 ext/skills 子路径访问;包根级导出保持不变。
  • @modelcontextprotocol/server/ext/skills: SkillsExtension(attach(server) 提供 skills/list、skills/get、resources/directory/read 以及 skill://{+path} 资源模板),SkillsExtension.load(files) 返回带有 entries 和 reload() 方法的 SkillCatalog,以及包含 memorySkillFiles 的 SkillFiles 存储适配器、用于生成目录的 SkillSource、skillEntry 和 SkillCatalogError。无效的技能会被跳过并附带警告(onWarning),或在严格模式下失败。字节为有效 UTF-8 的文件将作为文本提供服务,无论其 MIME 类型如何;任何其他文件则作为 base64 blob 提供服务。
  • @modelcontextprotocol/server/ext/skills/node: loadSkills(folder) 和 nodeSkillFiles(folder)。
  • @modelcontextprotocol/client/ext/skills: SkillsClient,包含 list()(遇到无效条目时抛出异常;skipInvalid: true 会保留有效条目,并将其余条目作为 invalid 返回)、get()、read(skill, path?)(验证 size、digest 和 SKILL.md frontmatter,不匹配时抛出 SkillVerificationError;如果从响应缓存中获取的副本检查失败,会先以 cacheMode: 'refresh' 模式重新获取一次)以及 readDirectory()。
  • @modelcontextprotocol/core/ext/skills: schemas、types 和 constants,包括 SKILL_LIMITS。结果 schema 遵循稳定规范,因此 ttlMs 和 cacheScope 是必填项。
  • SkillsExtension.attach 属于 @experimental:扩展与服务器连接的方式可能在次要版本中发生变化。Skills API 的其余部分是稳定的。
  • 适用于 2025-11-25 和 2026-07-28。仅在 2026-07-28 上,服务器会发送缓存字段(ttlMs、cacheScope),且 SkillsClient 要求提供这些字段,并从 list()、get() 和 readDirectory() 返回它们。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件