Commit Graph

114 Commits

Author SHA1 Message Date
Max Isbey 5b1275beae Merge branch 'main' into shttp-native-dispatch
Brings in "Stop answering cancelled requests" and reapplies its policy
onto the rebuilt seam instead of the code it targeted:

- The cancelled-request answer policy now lives at the correlator's
  single site: a peer-cancelled request is never answered by the dispatch
  layer, its late result or error is dropped, and it settles through a
  transport-supplied hook. The dispatcher forwards the hook it receives in
  message metadata; the streamable HTTP transport supplies its own, which
  ends the request's stream with the REQUEST_CANCELLED terminal error
  written through the request's ordered channel (so a resuming client's
  replay terminates too).
- Hook containment happens once, in the correlator.
2026-07-28 00:59:18 +00:00
Max Isbey 47e156d560 Rework channel liveness, stream ids, and init ordering after review
The second review round found several defects that traced back to a few
structural gaps rather than isolated bugs; this addresses the gaps.

- Channel delivery is now a value: write() returns whether the message
  reached the event store or an attached response, an EventStore failure is
  contained inside the write (resumability degrades, the stream survives,
  no store text on the wire), and attach() returns None on a dead channel
  so nothing can stream from one. A server-to-client request that cannot
  reach any client fails the caller with CONNECTION_CLOSED instead of
  parking it, and the JSON-response body derives from the channel's
  recorded outcome (result, terminated-404, or 500) rather than a
  "cannot happen" branch.
- Stream ids handed to the EventStore are minted by the transport in a
  session-scoped namespace, so a client-chosen request id can no longer
  name the standalone GET stream and two sessions on one store can no
  longer replay each other's frames.
- One SSE-response runner owns the pump, error containment, and cleanup
  for the POST, GET, and replay responses (the POST path had lost the
  guard its siblings kept).
- A session-level gate holds requests that arrive while an initialize is
  still being served until the handshake commits, restoring the ordering
  the stream-pair driver's parked read loop used to guarantee.
- The POSTed client message is delivered even when the 202 could not be
  written back, and the correlator marks the single site where the
  cancelled-request answer policy lives for every transport.

Adds regression tests for each of the above.
2026-07-27 23:19:39 +00:00
Max b61ce388dd docs: fix off-by-one hl_lines in apps.md (#3196) 2026-07-28 00:04:57 +01:00
Max b7c9a916d6 Add mcp.types as a permanent alias for mcp_types (#3190) 2026-07-27 23:47:04 +01:00
Max 923341c98a Stop answering cancelled requests (#3188) 2026-07-27 23:26:00 +01:00
Max e8ef138153 docs: fill migration-guide gaps found by automated v1-to-v2 migration runs (#3187) 2026-07-27 23:17:17 +01:00
Max d3ffe87960 Split the registration request model from the registered-client record (#3181) 2026-07-27 23:11:01 +01:00
Max b9422f1c9b Make the per-version wire packages private (mcp_types._v*) (#3191) 2026-07-27 22:16:48 +01:00
Max Isbey 1e3be94d4a Fix defects found in review of the streamable HTTP rewrite
- Serialize store-then-forward per channel: concurrent writers on one
  channel (the standalone GET stream) could put frames on the wire out of
  event-store order, breaking Last-Event-ID resumption. A per-channel lock
  restores the store-order == wire-order invariant the serial router used to
  provide.
- Refuse a request that arrives across session termination instead of
  running it: dispatch now branches on the transport's identity (stateful
  vs stateless) rather than on session-task presence, re-checks liveness
  after the request's awaits, and answers 404 for an ended session; queued
  work for an ended session is dropped.
- Contain event-store failures at the channel: a raising store_event was
  reaching the correlator as a handler error and leaking its text onto the
  wire; write() now never raises (a broken store ends that stream), which
  also protects the courtesy-cancel write.
- Close the replay reader when priming fails; drop dead exception arms in
  the SSE pump.
- Correct the migration note's JSON-mode claim to request-scoped requests,
  drop a claim handlers cannot observe, fix a vacuous test assertion, and
  add regression tests for each fix.
2026-07-27 20:48:49 +00:00
Max Isbey d9f77bcf8e Document the streamable HTTP transport change in the migration guide
Records the removal of StreamableHTTPServerTransport.connect() (the
transport is now driven per request by the session manager) and the
behaviours clarified alongside it, and refreshes the docstrings that still
described the old serve_loop wiring.
2026-07-27 20:04:55 +00:00
Max 45f2a88a9a Point pre-release install pins at 2.0.0rc1 (#3186)
CI / checks (push) Failing after 1s
CI / all-green (push) Has been cancelled
2026-07-27 14:23:57 +01:00
Max 11934c90ae Replace FileResource.is_binary with an encoding field (#3171) 2026-07-26 00:58:06 +01:00
Max 814072c94d Narrow message_handler's parameter to notifications and exceptions (#3168) 2026-07-26 00:24:48 +01:00
Max 47bfa85e83 Remove the unused timeout parameter from OAuthClientProvider (#3165) 2026-07-26 00:22:15 +01:00
Max 3212591946 Stop advertising MCP_* env vars for MCPServer settings; drop pydantic-settings (#3170) 2026-07-25 23:22:27 +01:00
Max 7163d8263f Remove the deprecated RFC7523OAuthClientProvider (#3169) 2026-07-25 22:50:57 +01:00
Max e90a66b554 Rename scopes= to scope= on the client-credentials OAuth providers (#3166) 2026-07-25 20:23:36 +01:00
Max 5dd062d077 Remove Context.client_id (#3167) 2026-07-25 19:11:51 +01:00
Max 0cb920f126 Make CacheConfig() the Client cache default and None the off switch (#3164) 2026-07-25 17:50:53 +01:00
Max 629ca297d2 Isolate the stdio server's stdin and stdout from handler subprocesses (#3117) 2026-07-25 13:05:51 +01:00
Max 00a70148bc Serve the 2026-07-28 protocol over stdio: decide the era from the opening request (#3152)
CI / checks (push) Failing after 1s
Deploy Docs / deploy-docs (push) Has been cancelled
Conformance Tests / server-conformance (push) Has been cancelled
Conformance Tests / client-conformance (push) Has been cancelled
GitHub Actions Security Analysis / zizmor (push) Has been cancelled
CI / all-green (push) Has been cancelled
2026-07-24 13:46:37 +01:00
Max 837ef904f8 Align with spec #3002: optional clientInfo, serverInfo in result _meta (#3143)
Deploy Docs / deploy-docs (push) Has been cancelled
CI / checks (push) Failing after 24m23s
CI / all-green (push) Has been cancelled
Conformance Tests / server-conformance (push) Has been cancelled
Conformance Tests / client-conformance (push) Has been cancelled
GitHub Actions Security Analysis / zizmor (push) Has been cancelled
2026-07-23 12:00:36 +01:00
Max 3a6f2996cd docs: load media examples from disk instead of inline base64 (#3108) 2026-07-16 20:41:05 +01:00
Andre.Kalberer e464f72c12 docs: document Windows stdio subprocess stdin handling (#3079) 2026-07-16 11:25:47 +01:00
Marcelo Trylesinski 03aaebd3aa Add Streamable HTTP request body limits (#3095) 2026-07-16 08:33:32 +02:00
Marcelo Trylesinski 2713b53b12 Replace httpx and httpx-sse with httpx2 (#2972)
CI / checks (push) Failing after 1s
CI / all-green (push) Has been cancelled
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-07-14 17:05:08 +01:00
Marcelo Trylesinski 4fc8882c02 docs: replace MkDocs with Zensical (#3073)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-07-10 12:48:46 +01:00
Max 9bdc03d54e Add the client-side subscriptions/listen driver (#3047) 2026-07-07 14:26:09 +01:00
Max d287c9868f Extend resolver DI to sampling and roots requests (#3049) 2026-07-06 18:25:57 +01:00
Max bf4402725d docs: restructure the migration guide around topical groups with a navigation layer (#3058) 2026-07-02 18:54:21 +01:00
Max 2359b40285 docs: modernize the site theme (#3057) 2026-07-02 16:17:33 +01:00
Max e4d95e0d44 docs: add a "What's new in v2" page (#3054) 2026-07-02 15:01:30 +01:00
Max 220d362112 docs: restructure into topical sections and add the four most-asked-for pages (#3044) 2026-07-01 21:06:04 +01:00
Max 080f2a869d Harden the dual-era stream loop's era-lock and rejection semantics (#3040) 2026-07-01 17:07:12 +01:00
Max 0da9092037 Point pre-release install pins at 2.0.0b1 (#3039)
CI / checks (push) Failing after 0s
CI / all-green (push) Has been cancelled
2026-07-01 00:14:52 +01:00
Max 410cc0db31 Add v2 feedback issue template (#3037) 2026-07-01 00:03:11 +01:00
Max ca10dade2c Serve subscriptions/listen with a pluggable event bus (SEP-2575) (#3035) 2026-06-30 23:01:04 +01:00
Max 48ef569f7e Validate Mcp-Param-* headers server-side on the 2026-07-28 HTTP path (SEP-2243) (#3033) 2026-06-30 21:39:32 +01:00
Max 4df609119f Add a client extension API (#3034) 2026-06-30 21:31:02 +01:00
Max 7322ca56f4 Require integrity protection for MRTR requestState (#3032) 2026-06-30 21:30:32 +01:00
Max b15b1d5f07 Add a client-side response cache honoring SEP-2549 caching hints (#3023) 2026-06-30 11:31:06 +01:00
Max 67d7593df1 docs: publish llms.txt and markdown renditions of the docs (#3024) 2026-06-30 11:30:55 +01:00
Max 8d0f928e40 Pass InputRequiredResult through the MCPServer prompt and resource pipelines (#3020) 2026-06-29 16:50:58 +01:00
Max 8f2c97b769 Consult request_state only for the question a resolver is asking (#3019) 2026-06-29 16:44:05 +01:00
Max 533c6a8226 Add cache_hints constructor map for SEP-2549 caching hints (#3015) 2026-06-29 14:11:15 +00:00
Marcelo Trylesinski c85836a081 Drive resolver elicitation over the 2026-07-28 input_required flow (#2986)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-06-29 14:39:43 +01:00
Max 24fdd909ac docs: convert bold cross-references into links, link SEP and RFC mentions (#3017) 2026-06-29 11:07:26 +00:00
Marcelo Trylesinski f664db8952 Add resolver dependency injection for MCPServer tools (#2969)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-06-29 11:51:46 +01:00
Marcelo Trylesinski 4b519782f1 Add a pluggable server extension API with MCP Apps (#3003)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-06-29 10:58:05 +01:00
Max 3b78f86886 Add docs, tested examples, and a story for SEP-990 identity assertion (#3004) 2026-06-26 21:01:46 +02:00