Skip to content

build(deps-dev): Bump @modelcontextprotocol/client from 2.0.0 to 2.1.0 - #226

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/modelcontextprotocol/client-2.1.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/modelcontextprotocol/client-2.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Bumps @modelcontextprotocol/client from 2.0.0 to 2.1.0.

Release notes

Sourced from @​modelcontextprotocol/client's releases.

@​modelcontextprotocol/client@​2.1.0

Minor Changes

  • #2629 dcc0102 Thanks @​gbshankar! - Add DPoP (RFC 9449 / SEP-1932) sender-constrained access token support to the client.
    • Opt in by implementing OAuthClientProvider.dpop() returning a DpopSession (new, along with generateDpopKeyPair, accessTokenHash, isDpopNonceChallenge). auth() / exchangeAuthorization / refreshAuthorization / fetchToken then sign a DPoP proof into token requests (retrying once on an authorization-server use_dpop_nonce challenge, with client authentication re-applied per attempt), and StreamableHTTPClientTransport, SSEClientTransport and withOAuth present a token_type: "DPoP" access token as Authorization: DPoP <token> plus a fresh per-request proof, retry a resource-server use_dpop_nonce challenge once, and pick up a DPoP-Nonce delivered on any response. Tokens the AS issued as Bearer are still presented as Bearer.
    • DPoP is applied at the fetch layer: the transports wrap their resource-server fetch (including a caller-supplied fetch / eventSourceInit.fetch) with the new withDpopFromProvider(provider) middleware, so proofs are always bound to the request actually sent. withDpop(session, getToken) is exported for callers that manage tokens themselves (e.g. alongside a minimal AuthProvider); the AuthProvider interface itself is unchanged.
    • auth() now recovers from invalid_dpop_proof on refresh (e.g. a refresh token bound to a key that is no longer held) by discarding the tokens and re-authorizing, like invalid_grant. OAuthErrorCode gains InvalidDpopProof and UseDpopNonce; extractWWWAuthenticateParams recognizes the DPoP challenge scheme; OAuthMetadataSchema gains dpop_signing_alg_values_supported.

Patch Changes

  • #2726 6fa4227 Thanks @​LuckTerence! - SdkError and SdkHttpError accept standard ErrorOptions as an optional fourth constructor argument and forward it to Error, so a wrapped error is reachable through the standard Error.cause chain. Version-negotiation probe failures (SdkErrorCode.EraNegotiationFailed) now use it: the underlying TypeError: fetch failed and the DNS or socket error beneath it surface via error.cause, so pino, Sentry, and util.inspect render ENOTFOUND / ECONNREFUSED / ETIMEDOUT instead of stopping at the SdkError (#2657). The previous error.data.cause slot is still populated for compatibility but is deprecated and slated for removal; read error.cause instead.

  • #2654 03842cd Thanks @​pshah19! - Treat request id 0 as a real id. Two guards tested a RequestId for truthiness, so the legal JSON-RPC ids 0 and '' were read as absent. Id 0 is not a corner case: the outbound request counter is zero-based, so it is the first id every peer assigns, which on the server→client leg is the first sampling/createMessage, elicitation/create, or roots/list a server sends.

    • notifications/cancelled carrying id 0 was ignored, and the in-flight handler ran to completion with its AbortSignal never fired.
    • A notification sent with relatedRequestId: 0 wrongly passed the debounce gate (for methods opted into debouncedNotificationMethods). Because the pending set is keyed by method alone, a second such notification in the same tick was silently dropped rather than sent.

    Absent is now the only value that means "no id".

  • #2043 c4248a9 Thanks @​ChrisJr404! - On Windows, stdio servers spawned by StdioClientTransport now also inherit COMSPEC, PATHEXT, PROGRAMDATA, PROGRAMFILES(X86), PROGRAMW6432, and WINDIR (added to DEFAULT_INHERITED_ENV_VARS). Programs a server launches can depend on them: PowerShell finds no native executables without PATHEXT, and Windows OpenSSH exits 255 without ProgramData.

  • #2668 3e90449 Thanks @​KKonstantinov! - Stop sending notifications/cancelled for the initialize handshake. The spec is explicit that a client MUST NOT attempt to cancel its initialize request, but the outbound cancel path fired for any in-flight request: aborting the AbortSignal passed to connect(), or letting the handshake hit its timeout, put a forbidden cancellation on the wire naming the initialize request id.

    The local behaviour is unchanged — the caller's promise still rejects with the same abort/timeout error, and connect() still tears the connection down. Only the wire notification is suppressed. Every other method keeps the existing cancellation path.

  • #2475 b654261 Thanks @​sanjibani! - StreamableHTTPClientTransport and SSEClientTransport now give their transport-managed headers precedence over same-named entries in requestInit.headers: Authorization when authProvider yields a token, mcp-protocol-version, and (Streamable HTTP) mcp-session-id. Header names compare case-insensitively and every HeadersInit form is covered (plain object, tuple array, Headers instance). Previously the caller-supplied value won, so a static Authorization placeholder (e.g. an env-var API key) kept overriding the OAuth token even after the provider obtained one and the fallback-to-OAuth flow never completed; a Headers instance or lowercase key produced a combined Bearer <fresh>, Bearer <stale> value instead. A configured Authorization is still sent while the provider has no token, and other configured headers pass through unchanged. Closes #2208.

  • #2581 5119ee7 Thanks @​hugosmoreira! - Preserve the exact OAuth resource indicator from protected resource metadata when building authorization and token requests. Previously a pathless resource such as https://example.com was normalized to https://example.com/ via URL.href, which breaks authorization servers that require the resource parameter to match the published value exactly (Microsoft Entra ID rejects it with AADSTS9010010). The exported OAuth helpers (startAuthorization, exchangeAuthorization, refreshAuthorization, fetchToken, executeTokenRequest) now also accept a string for resource; selectResourceURL still returns a URL, and a provider's validateResourceURL result is used unchanged. Fixes #1968.

  • 3924de9 - Let saveTokens failures surface after a successful token refresh. In auth(), one try wrapped both refreshAuthorization() and the provider.saveTokens() that persists its result, and the catch deliberately swallows anything that is not an OAuthError — plus ServerError — so that a failed refresh falls through to a fresh authorization request. A persistence error thrown by the provider landed in that same branch: it was discarded with no log and no rethrow, and auth() continued to startAuthorization() and returned 'REDIRECT'.

    Against an authorization server that rotates refresh tokens (the OAuth 2.1 default, and Keycloak's) this loses credentials rather than merely hiding an error. The exchange has already succeeded server-side, so the old refresh token is invalidated at the moment the new one is issued; dropping the new token set leaves nothing usable on either side. On a headless or CLI client, where redirectToAuthorization is typically a no-op, the fallthrough is silent and the client is left with stale tokens and no indication of why.

    The try/catch now covers only refreshAuthorization(). Persisting the result happens after it, on an unguarded path, so a provider's I/O error propagates to the caller.

    Refresh-request failures keep their existing control flow exactly: a ServerError or an unknown error still falls through to a new authorization flow, a non-ServerError OAuthError is still rethrown, and InsecureTokenEndpointError is still surfaced. The SEP-2352 issuer stamp written with the refreshed tokens is unchanged.

... (truncated)

Commits
  • 9517506 Version Packages (#2808)
  • 6a05402 fix(server): close StdioServerTransport when stdin ends or closes (#2494)
  • c4248a9 fix(client): add missing Windows env vars to DEFAULT_INHERITED_ENV_VARS (#2043)
  • 0b403f0 chore(changesets): only bump peer dependents when out of range (#2819)
  • 6032170 feat(server): add request-time OAuth scope challenges (#1624)
  • b654261 fix(client): let OAuth-derived Authorization override caller-supplied header ...
  • 5ecc791 fix(codemod): only count real module specifiers in project-type inference (#2...
  • 5119ee7 fix: preserve exact OAuth resource indicators (#2581)
  • 6fa4227 fix(client): surface underlying network error via Error.cause on probe failur...
  • dcc0102 feat(client): add DPoP (RFC 9449) sender-constrained token support (#2629)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Sep 27, 2026
@dependabot
dependabot Bot requested a review from mbeacom as a code owner September 27, 2026 00:39
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Sep 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/bun/modelcontextprotocol/client-2.1.0 branch from ebf6d3a to b188f20 Compare September 27, 2026 17:52
@mbeacom

mbeacom commented Sep 27, 2026

Copy link
Copy Markdown
Owner

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/bun/modelcontextprotocol/client-2.1.0 branch from b188f20 to e531569 Compare September 27, 2026 17:58
Bumps [@modelcontextprotocol/client](https://github.com/modelcontextprotocol/typescript-sdk) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/@modelcontextprotocol/client@2.0.0...@modelcontextprotocol/client@2.1.0)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/client"
  dependency-version: 2.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/bun/modelcontextprotocol/client-2.1.0 branch from e531569 to 339530e Compare September 28, 2026 02:31
mbeacom added a commit that referenced this pull request Sep 28, 2026
…gether (#242)

* build(deps): move @modelcontextprotocol/server and client to 2.1.0 together

Dependabot split the bump into #225 (server) and #226 (client), but both
depend on @modelcontextprotocol/core, so they have to move as one. Both stay
exact-pinned. bun.lock changes only in the three SDK entries.

2.1.0 includes typescript-sdk#2494: StdioServerTransport now closes when stdin
ends, and requests still in flight are aborted and not answered. That broke
two raw-pipe tests in bin.test.ts that wrote every frame and then closed stdin
before reading anything; this is #225's CI failure. Those tests now read the
responses they wait for before closing stdin, as the smoke scripts already
did, and they assert a clean exit (0, empty stderr) on EOF. A new case covers
a client hanging up with a request in flight. The shutdown and
read-before-close assertions were each observed failing under a mutation
(ADR-0016).

Records the dual-era re-verification in ADR-0018: headless MCP Inspector
2.8.0 on default, modern and auto; all four tools; byte-identical across eras
and against a 2.0.0 build. Adds a changelog entry and a README note on the
stdin-EOF lifecycle.

Signed-off-by: Mark Beacom <m@beacom.dev>

* docs: note Inspector 2.8.0's --protocol-era flag; narrow the subscriptions/listen claim

Signed-off-by: Mark Beacom <m@beacom.dev>

* test(mcp): kill the child when a raw exchange fails; scope the hang-up test to what it proves

Signed-off-by: Mark Beacom <m@beacom.dev>

* docs(adr): ratify ADR-0018's amendment for SDK 2.1.0

@mbeacom accepted the stdin-close change in review of #242. Record it as
a marked amendment rather than rewriting ratified text:
- the exact pin moves to 2.1.0; 2.0.0 named the adopted version, not a
  ceiling, and each bump still needs the two-era Inspector run appended;
- 'client' in 'How we would know this was wrong' means one following the
  MCP stdio binding. A writer that closes stdin at once can lose trailing
  responses since typescript-sdk#2494; that is accepted as outside the
  guarantee, because avoiding it means replacing serveStdio.
Pointers are added beside the two passages amended.

Signed-off-by: Mark Beacom <m@beacom.dev>

---------

Signed-off-by: Mark Beacom <m@beacom.dev>
@mbeacom

mbeacom commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Superseded by #242, which moved @modelcontextprotocol/server and @modelcontextprotocol/client to 2.1.0 together, so that one @modelcontextprotocol/core resolves. It also repeated ADR-0018's Inspector run on both protocol eras. Separately, this bump could not pass: SDK 2.1.0 closes the stdio transport on EOF (typescript-sdk#2494), which broke two tests that closed stdin before reading replies. #242 fixed those tests and recorded the change in ADR-0018.

@mbeacom mbeacom closed this Sep 28, 2026
@dependabot @github

dependabot Bot commented on behalf of github Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/bun/modelcontextprotocol/client-2.1.0 branch September 28, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant