MCP TypeScript SDK 2.2.0
MCP TypeScript SDK 2.2.0 updates list methods to automatically paginate through all results, adds OAuth provider checks, and resolves various client/server bugs including CommonJS type-checking.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
MCP TypeScript SDK version 2.2.0 has been released across multiple packages including @modelcontextprotocol/client, @modelcontextprotocol/server, @modelcontextprotocol/core, @modelcontextprotocol/server-legacy, and @modelcontextprotocol/codemod. List methods (listTools, listPrompts, listResources, listResourceTemplates) now automatically follow nextCursor to return entire result lists unless capped by listMaxPages. Machine-to-machine OAuth providers (ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, CrossAppAccessProvider) now deprecate construction without expectedIssuer and validate authorization server alignment in fetchToken(). Other fixes include inlining jose types for CommonJS TypeScript compatibility, fixing unhandled rejections and hangs in Client.listen(), preventing stack overflows in createMcpHandler when server instances are reused, and supporting .localhost subdomains as loopback addresses.
可执行摘要
Upgraded MCP TypeScript SDK packages (@modelcontextprotocol/client, server, core, server-legacy, codemod) to 2.2.0. listTools, listPrompts, listResources, and listResourceTemplates now auto-paginate via nextCursor when called without a cursor. Machine-to-machine OAuth providers deprecate omitting expectedIssuer and throw AuthorizationServerMismatchError on authorization server mismatch. CommonJS TypeScript type…
- Agent 实用度
- 94/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Update @modelcontextprotocol/ dependencies to version 2.2.0.
- Pass expectedIssuer when constructing ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, or CrossAppAccessProvider to avoid deprecation warnings.
- Verify that code calling listTools, listPrompts, listResources, or listResourceTemplates expects full-list pagination behavior, or configure listMaxPages/explicit cursors accordingly.