Client-side 2026-07-28 support: .discover()/.adopt() + Client(mode=); request-metadata green by maxisbey · Pull Request #2950 · modelcontextprotocol/python-sdk · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cb9e260
Rename SUPPORTED_PROTOCOL_VERSIONS to HANDSHAKE_PROTOCOL_VERSIONS; co…
maxisbey Jun 22, 2026
e0990bf
Thread per-message headers from session to transport via CallOptions/…
maxisbey Jun 22, 2026
52546fa
ClientSession: install per-request stamp at connect time; transport b…
maxisbey Jun 22, 2026
1d33743
Client gains mode= and prior_discover= policy knobs (legacy and versi…
maxisbey Jun 22, 2026
1fbd075
ClientSession.discover() with the error ladder; Client mode='auto'
maxisbey Jun 22, 2026
46c0742
modern_on_request driver + Client in-process modern path via DirectDi…
maxisbey Jun 22, 2026
dcbe6e8
Sweep: route report_progress through DispatchContext.progress; bump L…
maxisbey Jun 22, 2026
a97459d
Add lifecycle:envelope/discover/mode requirement entries and interact…
maxisbey Jun 22, 2026
52f200b
Conformance client fixture: drive Client(mode='auto') for the modern leg
maxisbey Jun 22, 2026
b6be755
Transport: pre-session 404 maps to METHOD_NOT_FOUND; POSTs never read…
maxisbey Jun 23, 2026
a82042a
discover() returns DiscoverResult; fallback ladder moves to Client; e…
maxisbey Jun 23, 2026
cdfdfd1
migration.md: drop v2-only churn entries; document ctx.report_progres…
maxisbey Jun 23, 2026
b326347
Add named protocol-version scalars and replace tuple indexing
maxisbey Jun 23, 2026
bdcdeb0
serve_one returns dict; Client accessor and re-entry guard fixes
maxisbey Jun 23, 2026
78823d4
Move to_jsonrpc_response to the HTTP entry; tighten migration.md and …
maxisbey Jun 23, 2026
f9a15e1
Client: collapse _inproc_server/_transport into a single _connect clo…
maxisbey Jun 23, 2026
91c0224
Retag dispatcher-hook TODO with its ledger anchor
maxisbey Jun 25, 2026
eab740b
Restore pv header on dispatcher-written POSTs; widen auto-mode probe …
maxisbey Jun 25, 2026
a7d1275
Add negotiate_auto: denylist probe classifier for mode='auto'
maxisbey Jun 25, 2026
2d12b96
Flip Client default mode to 'auto'
maxisbey Jun 25, 2026
20a564e
DirectDispatcher: resync coverage tracer after each request
maxisbey Jun 25, 2026
0bb9ee7
Build send_discover params via DiscoverRequest; gate preconnect cance…
maxisbey Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 132 additions & 73 deletions .github/actions/conformance/client.py
25 changes: 1 addition & 24 deletions .github/actions/conformance/expected-failures.2026-07-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,13 @@
# milestone.

client:
# --- No stateless client path on main yet ---
# client.py drives the 2025 stateful lifecycle (initialize handshake +
# session). The 2026-mode mock server is stateless, so the call sequence
# never reaches the assertion. Unblocks when client.py's is_modern_protocol()
# branch takes the per-request _meta path.
- tools_call

# --- Auth scenarios cut short by the 2026 connection lifecycle ---
# The auth fixture flow drives the 2025 stateful lifecycle; the 2026-mode
# mock rejects the MCP POST before the scope-escalation behaviour these
# scenarios measure, so no authorization requests are observed. Unblocks
# when client.py's auth flow speaks the 2026 per-request lifecycle.
- auth/scope-step-up
- auth/scope-retry-limit

# --- Same gaps as the 2025 baseline (fail identically when forced to 2026-07-28) ---
# SEP-2575 (request metadata / _meta envelope): client does not populate the
# _meta envelope or the MCP-Protocol-Version header semantics yet.
- request-metadata
# SEP-2322 (multi-round-trip requests): client does not echo requestState /
# handle IncompleteResult yet.
- sep-2322-client-request-state
# SEP-2243 (HTTP standardization): no fixture handler / client header support yet.
# SEP-2243 (HTTP standardization): no fixture handler / client Mcp-Param-* support yet.
- http-custom-headers
- http-invalid-tool-headers
# SEP-2352 (authorization server migration): the client re-registers and does not reuse the old
# AS credentials, but the 2026-mode mock rejects the MCP POST before the migration 401 fires
# (client.py drives the 2025 stateful lifecycle), so the re-register check is never reached.
# Unblocks with the 2026 stateless client lifecycle.
- auth/authorization-server-migration
# auth/enterprise-managed-authorization (SEP-990) is in the 2025 baseline but
# NOT here: the harness skips it as inapplicable at --spec-version 2026-07-28
# (it is an extension scenario not carried into the 2026 wire), so it is
Expand Down
10 changes: 1 addition & 9 deletions .github/actions/conformance/expected-failures.yml
Loading
Loading