Zum Inhalt springen

Typescript SDK Updates & Release Notes

28 Einträge aus 1 Quelle. Zuletzt aktualisiert:

Folge Typescript SDK, um die Release Notes in deinen Feed zu holen.

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/core 2.2.0: expectedIssuer und Issuer-Prüfung

In @modelcontextprotocol/core 2.2.0 ist das Erstellen von ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider oder CrossAppAccessProvider ohne expectedIssuer veraltet, fetchToken() wirft bei abweichendem Authorization Server einen AuthorizationServerMismatchError, und die Schemas akzeptieren einen optionalen issuer-Stempel.

Minor Changes

  • #2887 edd12e2 Thanks @maxisbey! - Constructing ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider or CrossAppAccessProvider without expectedIssuer is deprecated: the constructor logs one console.warn and that call signature is marked @deprecated. Behaviour is otherwise unchanged. Pass the issuer of the authorization server the credentials were registered with.

    fetchToken() throws AuthorizationServerMismatchError, before sending anything, when the provider's client information is bound to a different authorization server than the one it is called with. The AuthorizationServerMismatchError message no longer assumes the authorization-code callback; its fields are unchanged.

    OAuthTokensSchema and OAuthClientInformationSchema accept the optional issuer stamp, so a provider that reads storage back through them keeps it. auth() overwrites it on every save.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/codemod 2.2.0: v1-to-v2 erhält Header und Direktiven

Der v1-to-v2-Codemod in @modelcontextprotocol/codemod 2.2.0 setzt umgeschriebene Imports an die Stelle des ersten v1-Imports, sodass Lizenz-Header und Direktiven wie 'use client' erhalten bleiben, wobei in einigen Fällen noch bekannte Lücken bestehen.

Patch Changes

  • #2582 f091897 Thanks @axits-lab! - The v1-to-v2 codemod now writes rewritten imports where the first v1 import stood, not at the top of the file, so a license header, // @ts-nocheck, /// <reference> or a 'use client' / 'use server' / 'use strict' directive above it stays in place. Known gap: when a later step of the codemod replaces or removes the import (for example a file whose only SDK import is ErrorCode or StreamableHTTPError), the new import can still land above or inside the header, and a /** */ header can be removed. Files already migrated with codemod 2.1.0 or earlier are not repaired; check the top of those files.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/client 2.2.0: expectedIssuer für Auth-Provider empfohlen

In @modelcontextprotocol/client 2.2.0 ist das Erstellen von ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider oder CrossAppAccessProvider ohne expectedIssuer veraltet, fetchToken() wirft bei abweichendem Authorization Server einen AuthorizationServerMismatchError, und die Schemas akzeptieren einen optionalen issuer-Stempel.

Minor Changes

  • #2887 edd12e2 Thanks @maxisbey! - Constructing ClientCredentialsProvider, PrivateKeyJwtProvider, StaticPrivateKeyJwtProvider or CrossAppAccessProvider without expectedIssuer is deprecated: the constructor logs one console.warn and that call signature is marked @deprecated. Behaviour is otherwise unchanged. Pass the issuer of the authorization server the credentials were registered with.

    fetchToken() throws AuthorizationServerMismatchError, before sending anything, when the provider's client information is bound to a different authorization server than the one it is called with. The AuthorizationServerMismatchError message no longer assumes the authorization-code callback; its fields are unchanged.

    OAuthTokensSchema and OAuthClientInformationSchema accept the optional issuer stamp, so a provider that reads storage back through them keeps it. auth() overwrites it on every save.

Patch Changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

TypeScript SDK Version 1.30.1: Body- und Batch-Limits, Auth-Fix

Version 1.30.1 des TypeScript SDK liest HTTP-Request-Bodys mit Größenlimit, begrenzt die Länge von JSON-RPC-Batches und behebt in der Authentifizierung den Verlust des Resource-URI ohne abschließenden Schrägstrich.

What's Changed

New Contributors

Full Changelog: https://github.com/modelcontextprotocol/typescript-sdk/compare/1.30.0...1.30.1

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/server 2.1.0: OAuth-Scope-Challenges per scopeChallenge

@modelcontextprotocol/server 2.1.0 fügt für Tools, Ressourcen, Resource Templates und Prompts anfragezeitliche OAuth-Scope-Challenges über einen scopeChallenge-Callback hinzu, die bei unzureichendem Scope vor der Verarbeitung eine HTTP-403-Antwort mit insufficient_scope liefern.

Minor Changes

  • #1624 6032170 Thanks @SamMorrowDrums! - Add request-time OAuth scope challenges for tools, resources, resource templates, and prompts. Each primitive's scopeChallenge callback receives the parsed request and verified authentication info, then either continues or returns the exact scope set for an insufficient_scope response. requireScopes provides a small helper for static all-of checks.

    createMcpHandler and Streamable HTTP transports return HTTP 403 with an insufficient_scope challenge before handler execution or SSE setup. The preflight is active whenever a registered primitive carries a scopeChallenge callback — there is no handler- or transport-level configuration. The challenge's WWW-Authenticate header is built by the same formatter as the bearer-auth 401/403 answers, and its resource_metadata parameter is derived from the verified AuthInfo: requireBearerAuth / verifyBearerToken now stamp their configured resourceMetadataUrl onto the AuthInfo they return (new optional AuthInfo.resourceMetadataUrl field), with a fallback to the well-known location for an HTTP(S) RFC 8707 resource identifier; the parameter is omitted when neither is available. …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/node 2.1.0: OAuth-Scope-Challenges per scopeChallenge

@modelcontextprotocol/node 2.1.0 fügt für Tools, Ressourcen, Resource Templates und Prompts anfragezeitliche OAuth-Scope-Challenges über einen scopeChallenge-Callback hinzu, die bei unzureichendem Scope vor der Verarbeitung eine HTTP-403-Antwort mit insufficient_scope liefern.

Minor Changes

  • #1624 6032170 Thanks @SamMorrowDrums! - Add request-time OAuth scope challenges for tools, resources, resource templates, and prompts. Each primitive's scopeChallenge callback receives the parsed request and verified authentication info, then either continues or returns the exact scope set for an insufficient_scope response. requireScopes provides a small helper for static all-of checks.

    createMcpHandler and Streamable HTTP transports return HTTP 403 with an insufficient_scope challenge before handler execution or SSE setup. The preflight is active whenever a registered primitive carries a scopeChallenge callback — there is no handler- or transport-level configuration. The challenge's WWW-Authenticate header is built by the same formatter as the bearer-auth 401/403 answers, and its resource_metadata parameter is derived from the verified AuthInfo: requireBearerAuth / verifyBearerToken now stamp their configured resourceMetadataUrl onto the AuthInfo they return (new optional AuthInfo.resourceMetadataUrl field), with a fallback to the well-known location for an HTTP(S) RFC 8707 resource identifier; the parameter is omitted when neither is available. …

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Typescript SDK von Model Context Protocol

@modelcontextprotocol/hono 2.0.1: Body-Größenlimit und Batch-Begrenzung

@modelcontextprotocol/hono 2.0.1 liest Streamable-HTTP-Request-Bodys nur noch mit einem Standardlimit von 4 MiB (konfigurierbar über maxRequestBodySize), antwortet bei Überschreitung mit 413 Payload Too Large und begrenzt JSON-RPC-Batches auf 100 Nachrichten.

Patch Changes

  • #2698 7b781ed Thanks @maxisbey! - Read Streamable HTTP request bodies with a size limit. Every SDK-owned body read — WebStandardStreamableHTTPServerTransport (and the Node transport built on it), createMcpHandler, toNodeHandler, and createMcpHonoApp's JSON pre-parse — now stops at 4 MiB by default (the limit the legacy SSE transport already uses; the Express adapter and stdio bound their reads too) and answers 413 Payload Too Large before anything is parsed. toWebRequest (when it reads the Node stream itself) now rejects once the body exceeds the limit with an error whose name is 'RequestBodyTooLargeError' and status is 413, and toNodeHandler answers that with 413; hand-wired callers of toWebRequest should handle the rejection or pass a pre-parsed body, and isLegacyRequest reports such a request as non-legacy so the modern handler answers it. JSON-RPC batch arrays are limited to 100 messages; a longer batch is answered 400 / -32600 and none of it is dispatched.

    The limit is configurable with a new maxRequestBodySize option (bytes, default DEFAULT_MAX_REQUEST_BODY_SIZE = 4 MiB, exported from @modelcontextprotocol/server) on …

Originalquelle(öffnet in neuem Tab)Problem melden