MCP TypeScript SDK 2.0.0 发布:协议对齐与认证增强
原标题:@modelcontextprotocol/server@2.0.0
AI 摘要
MCP TypeScript SDK 发布 2.0.0 版本,包含多项重要更新:导出 Protocol 基类和 mergeCapabilities 以恢复 v1 导入兼容性;将 schema 模块移至 @modelcontextprotocol/core 以统一依赖;对齐 2026-07-28 规范最终修订,调整 serverInfo 和 clientInfo 字段;支持 Standard Schema 用于 inputRequired.elicit();新增可配置 SSE keep-alive 和 Bearer 认证。这些变更影响 MCP 客户端和服务器的互操作性及开发体验。
正文节选
### Minor Changes - [#2501](https://github.com/modelcontextprotocol/typescript-sdk/pull/2501) [`1480241`](https://github.com/modelcontextprotocol/typescript-sdk/commit/1480241e2a2a7f0ceee8e7723b2adcf88579bb36) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Export the `Protocol` base class and `mergeCapabilities` from the `@modelcontextprotocol/client` and `@modelcontextprotocol/server` package roots, restoring the v1 import for consumers that subclass `Protocol` (e.g. the MCP