Repository navigation
fix(client): version-neutral capability discovery and retryable MCP negotiation failures - #3860
Merged
bokelley merged 7 commits intoDec 5, 2026
Merged
Conversation
…egotiation failures Discovery is the call that establishes the version, so get_adcp_capabilities now goes out without adcp_version / adcp_major_version for every client pin, not only for a preview one (#3856). A strict AdCP 3.0 seller that refuses a versioned discovery call no longer fails discovery from a GA buyer. When the unpinned answer lists the client's exact release but echoes another one, the client re-probes once at its pin. An explicit envelope (versionEnvelope: 'auto') still sends the versioned probe and is not retried. A 408/425/429/500/502/503/504 answer to the MCP client's negotiated connect is a transport failure, not a negotiation result (#3858). The MCP error is rethrown unchanged (code, name, status) and marked transient/retryable with retryAfterMs. isTransientMCPNegotiationFailure() matches it without instanceof. Failed task results carry MCPNegotiationTransportError as errorInstance, and MCP endpoint discovery throws it instead of blaming agent_uri. The root entry re-exports MCPSdkError, MCPSdkHttpError, MCPSdkErrorCode and MCPStreamableHTTPError. Closes #3856 Closes #3858 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The internal capability probe now goes out unpinned for every client pin, and an unpinned push_notification_config falls back to the pre-3.1 shape with no application-layer registration. The probe is a synchronous read sent before the client knows the seller's release, so it carries no webhook, as preview probes already did. An explicitly pinned probe keeps the caller's webhook policy. Tests that asserted a pinned probe (its webhook registration, the pinned-then-unpinned retry, a major-only first request) now assert the version-neutral probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lass re-exports Review follow-ups: - Re-probe condition: negotiate from the unpinned answer's supported_versions and re-probe at the negotiated release whenever it differs from the release the seller echoed. A 3.3 client and a seller listing ['3.2', '4.0'] keep the 3.2 answer, never the 4.0 one; a 3.1 client and ['3.0', '3.2', '3.3'] get the 3.0 answer (major-only), as in 17.0. Still at most two calls; a failed re-probe keeps the unpinned answer. - Drop the MCPSdkError / MCPSdkHttpError / MCPSdkErrorCode / MCPStreamableHTTPError re-exports. @modelcontextprotocol/client brands its errors, so instanceof works across copies. - getAdcpCapabilities JSDoc, migration guide and changeset describe the unversioned first discovery call and the possible second, pinned one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bokelley
deleted the
fix/version-neutral-discovery-and-negotiation-errors
branch
December 5, 2026 16:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two negotiation fixes from moving a TS 17.0.0 buyer and a Python 10.0.0 seller to AdCP 3.3 GA.
#3856: capability discovery is version-neutral for every client
get_adcp_capabilitiesdiscovery now goes out withoutadcp_version/adcp_major_versionfor every client pin. Before, only a preview pin did. Discovery establishes the version, AdCP 3.3 says a buyer sends a release only after the peer lists it, and a strict 3.0 seller that refuses a versioned discovery call failed discovery from a 17.0 buyer.Re-probe. The client negotiates from the unpinned answer's
supported_versions(negotiateAdcpRelease). When that differs from the release the seller echoed, it re-probes once at the negotiated release and keeps that answer. This is what 17.0 effectively did by pinning:['3.2','4.0']: the 4.0 answer is replaced by the 3.2 answer;['3.0','3.2','3.3']: the 3.0 answer, sent major-only;There are never more than two calls, and a failed re-probe (429) keeps the unpinned answer. An answer with no echo is kept, because it marks a 3.0-era seller; the exception is an exactly listed preview pin.
Other details.
push_notification_configfalls back to the pre-3.1 shape with no registration.versionEnvelope: 'auto'still sends the versioned call, and it is not retried.#3858: transient failures during MCP version negotiation are marked
A 408/425/429/500/502/503/504 answer to
@modelcontextprotocol/client's negotiated connect still throws the MCP client'sSdkHttpErrorunchanged (code,name,status), and addstransient: true,retryable: trueandretryAfterMs.isTransientMCPNegotiationFailure()matches withoutinstanceof.MCPNegotiationTransportError(code: 'MCP_NEGOTIATION_TRANSPORT_FAILED') is a failed task result'serrorInstance. MCP endpoint discovery also throws it, instead of blamingagent_uri, when the registered URL answered that way. 429, and 503 with Retry-After, still throwAgentRateLimitedError.@modelcontextprotocol/client2.3 brands its errors, soinstanceof SdkHttpErrorholds across copies; the test asserts it.Tests
New and updated cases:
['3.2','4.0'],['3.0','3.2','3.3'], already-served, throttled re-probe and no-common-release cases;errorInstance, and endpoint discovery.The 12 related files pass (216 tests), and the full local
npm testpasses on this head.Changeset: minor.
Closes #3856
Closes #3858
🤖 Generated with Claude Code