chore(deps-dev): bump @modelcontextprotocol/client from 2.0.0 to 2.3.1
Bumps @modelcontextprotocol/client from 2.0.0 to 2.3.1.
Release notes
Sourced from @modelcontextprotocol/client's releases.
@modelcontextprotocol/client@2.3.1Patch Changes
- Updated dependencies []:
@modelcontextprotocol/core@2.3.1
@modelcontextprotocol/client@2.3.0Minor Changes
- #2901
433eb41Thanks@claude! - The HTTP client transports and the OAuth client helpers now follow a redirect only when it stays within the origin of the request (same scheme, host and port, or http to https on the same host with default ports) and keeps the method (a 307 or 308, or any redirect of a GET). Any other redirect is not followed. A transport then fails the request with an error that names the target; the session is kept and later messages still send. OAuth metadata discovery moves on to the next well-known URL, and any other OAuth request fails with an error that gives the status. Same-origin redirects that keep the method keep working on Node, up to five in a row, and no code changes are needed there. If your endpoint redirects to another origin, configure the transport with the URL it redirects to. ArequestInit.redirectof'error'or'manual'is passed to fetch as it is for the requests a transport sends to the server (POST, GET and DELETE of the Streamable HTTP transport, POST of the SSE transport); for its OAuth requests, and for any other value,requestInit.redirectis not consulted by default. Browsers do not expose the target of a redirect to a page, so there a redirected request fails instead of being followed. SettingredirectPolicy: 'follow'on a transport leaves its redirects to the fetch implementation, as before this change.Patch Changes
#2599
5238fbaThanks@freya0926! - A server can now serve, and a client can now call,tasks/getandtasks/cancelof the Tasks extension (SEP-2663) on a 2026-07-28 connection, when the handler is registered and the request is sent with an explicit schema. Every other method that a protocol revision removed is still refused. If one server factory serves both eras and such a handler is meant for 2025-era clients only, register it only whenctx.era === 'legacy'.#2846
63c0fcaThanks@Sthreal! - Receiving a large message as a single SSE event over Streamable HTTP, such as a tool result of tens of megabytes, is now fast: a 50 MB result that took about 13 seconds arrives in under a second. The client now requireseventsource-parser3.0.8 or later.SSEClientTransportreads through theeventsourcepackage and gets the same speed-up once that also resolveseventsource-parser3.0.8 or later.#2908
633dd3eThanks@claude! - Thelicensefield of the package manifests is nowApache-2.0; theLICENSEfile shipped in each package carries the full terms, including the MIT text for earlier contributions. No code change.#2903
e765b3bThanks@claude! - WithversionNegotiationin'auto'or pin mode, aserver/discoverprobe answered with a 2xx that carries no usable reply (a body that is not JSON underapplication/json, a bare204, a missing or unaccepted content type) still rejectsconnect()withEraNegotiationFailed; an empty SSE stream or a202surfaces as the probe timeout instead. The message now saysthe server answered with an unusable reply (...)instead of reading like a network failure. To connect to a 2025 server behind a front that answers the probe this way, passconnect(transport, { prior: { kind: 'legacy' } })or usemode: 'legacy'.#2905
c0cd01aThanks@claude! -SSEClientTransportnow retries the SSE connection once afteronUnauthorized()resolves, as documented. If the retry is also answered with 401,start()rejects withSdkHttpError(ClientHttpAuthentication) instead of callingonUnauthorized()again. A 401 on a later reconnect of a stream that had opened still gets one refresh.Updated dependencies [
633dd3e]:
@modelcontextprotocol/core@2.3.0
@modelcontextprotocol/client@2.2.0Minor Changes
#2887
edd12e2Thanks@maxisbey! - ConstructingClientCredentialsProvider,PrivateKeyJwtProvider,StaticPrivateKeyJwtProviderorCrossAppAccessProviderwithoutexpectedIssueris deprecated: the constructor logs oneconsole.warnand that call signature is marked@deprecated. Behaviour is otherwise unchanged. Pass theissuerof the authorization server the credentials were registered with.
fetchToken()throwsAuthorizationServerMismatchError, before sending anything, when the provider's client information is bound to a different authorization server than the one it is called with. TheAuthorizationServerMismatchErrormessage no longer assumes the authorization-code callback; its fields are unchanged.
OAuthTokensSchemaandOAuthClientInformationSchemaaccept the optionalissuerstamp, so a provider that reads storage back through them keeps it.auth()overwrites it on every save.Patch Changes
#2885
9dd722fThanks@claude! - Sending a notification on a closed connection no longer produces a briefly unhandled promise rejection (seen asunhandledrejectionon Cloudflare Workers) in addition to the returned rejection.#2883
c0f7aecThanks@claude! - Fix a type-check failure for CommonJS TypeScript projects introduced in 2.1.0:dist/index.d.ctsimported types fromjose, which is ESM-only, sotscwithmodule: node16/node18andskipLibCheck: falsefailed with TS1479. The twojosetypes used by the DPoP API (CryptoKey,JWK) are now inlined into the declaration files. No runtime change.#2768
efebf5bThanks@web-abin! - Correct the JSDoc for insecure OAuth token endpoints. The TLS requirement comes from the MCP authorization specification's OAuth 2.1 communication-security rules, not SEP-2207, which covers OIDC-flavored refresh-token guidance. Documentation only; no runtime behavior change.#2729
a4ae2f9Thanks@claude! - Correct theregisterClient@deprecatednotice: Dynamic Client Registration was deprecated by spec PR modelcontextprotocol#2858 (Client ID Metadata Documents), not SEP-2577 (which deprecates roots, sampling, and logging). The notice now also names the earliest possible removal date under the feature lifecycle policy (2027-07-28) and clarifies that theclient_id_metadata_document_supportedgating lives in the built-inauth()flow —registerClientcalled directly always sends the registration request. Documentation only; no runtime behavior change.#2862
e780e13Thanks@SyedTashfin! - Preserve_metaoninput_requiredresults. The 2026-07-28 decode seam rebuilt the payload frominputRequestsandrequestStateonly, so result-level metadata a server sent on aninput_requiredresult (includingio.modelcontextprotocol/serverInfo) was dropped before anallowInputRequired: truecaller could see it.Result._metais a result-level field, soinput_requiredcarries it exactly like any other result.
... (truncated)
Commits
fcef852Version Packages (#2953)e8b7f05docs: one opening note in the server and client package READMEs (#2955)5a18673feat(server-legacy): add expectedResource to requireBearerAuth (#2952)3ab61c6docs: update the README banners (#2940)8aabbdctest(e2e): expect SdkHttpError after a second 401 from onUnauthorized (#2936)33fecfbtest(e2e): cover tools/call without arguments (#2933)818f782docs: state the principles in CLAUDE.md and shorten REVIEW.md (#2938)a202a36Version Packages (#2896)2d731fafix(client): refresh again when an SSE retry failed for a reason other than 4...b6e5c55test(e2e): cover prompts/get without arguments for prompts with a schema (#2928)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Summary by cubic
Bumps @modelcontextprotocol/client from 2.0.0 to 2.3.1 in dev dependencies, picking up client behavior changes around redirects, SSE reconnects, and message handling.
- Redirects are now only followed when they stay within the same origin and preserve the request method; cross-origin redirects fail the request with a descriptive error.
- SSE connections retry once after an auth refresh instead of failing immediately.
- Large single-SSE-event messages (for example, big tool results) are now received dramatically faster.
- Sending a notification on a closed connection no longer produces an unhandled promise rejection.
- Fixes a CommonJS type-check failure caused by ESM-only
josetypes.