@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.
Why this signal matters
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.
Actionable summary
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 usefulness
- 89/100
- Confidence
- 96%
- Canonical data
- JSON + Markdown
What builders should check
- 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.