Agent 基础设施官方发布自动监测

@modelcontextprotocol/core@2.2.0

MCP TypeScript SDK release 2.2.0 deprecates constructing several OAuth credential providers without an expectedIssuer, adds issuer mismatch validation in fetchToken(), and updates OAuth storage schemas.

原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。

人类阅读

为什么值得关注

In @modelcontextprotocol/core@2.2.0, constructing ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, or CrossAppAccessProvider without an expectedIssuer is marked @deprecated and emits a console.warn. Users are expected to pass the authorization server issuer where the credentials were registered. Additionally, fetchToken() now throws AuthorizationServerMismatchError before dispatching requests if client information is bound to a differing authorization server. The error message has been adjusted to remove the assumption of an authorization-code callback, while retaining existing fields. Finally, OAuthTokensSchema and OAuthClientInformationSchema now accept an optional issuer stamp to preserve it across storage reads, which auth() overwrites on each save.

Agent 解析

可执行摘要

Version 2.2.0 of @modelcontextprotocol/core deprecates constructors for ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, and CrossAppAccessProvider when omitted without expectedIssuer. fetchToken() now pre-emptively throws AuthorizationServerMismatchError on authorization server mismatch, and schemas have been updated to support the issuer field.

Agent 实用度
89/100
可信度
96%
机器格式
JSON + Markdown
下一步

开发者应核对什么

  • Update ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider, and CrossAppAccessProvider instantiations to explicitly pass expectedIssuer.
  • Handle AuthorizationServerMismatchError during fetchToken() calls where client configuration might not match the authorization server.
分类

标签与路由

mcpsdktypescript
相关信号

继续阅读