Serve the 2026-07-28 protocol over stdio: decide the era from the opening request (#3152)
This commit is contained in:
parent
837ef904f8
commit
00a70148bc
2 changed files with 335 additions and 253 deletions
|
|
@ -52,13 +52,6 @@ Two things the stream is *not*:
|
|||
handler on the low-level `Server` and acknowledge a smaller filter than the client asked
|
||||
for; the acknowledgment is how the client learns what it actually got.
|
||||
|
||||
!!! warning "Streamable HTTP only, for now"
|
||||
`subscriptions/listen` needs a transport that can stream a request's response, which today
|
||||
means streamable HTTP. Over stdio a 2026-07-28 connection rejects the method with
|
||||
METHOD_NOT_FOUND, even though `server/discover` advertises the subscription capabilities
|
||||
there. Serving it over stdio is planned; the open-stream semantics for that transport are
|
||||
not built yet.
|
||||
|
||||
## The client end
|
||||
|
||||
Here is a client on the other side of that stream, following the board:
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ That file is the pitch in one place: one server, one `Resolve`-backed tool, and
|
|||
|
||||
### Change notifications become one stream
|
||||
|
||||
At 2026-07-28 the standalone HTTP GET stream and `resources/subscribe` are replaced by `subscriptions/listen`: the client opens one long-lived stream and names the notification kinds it wants. `MCPServer` serves it out of the box; you publish with `await ctx.notify_resource_updated(uri)` (and `notify_tools_changed()`, and so on), and multi-replica deployments plug in a shared `SubscriptionBus`. On the client (since `2.0.0b2`), `async with client.listen(...)` opens the stream: the filter goes in as keyword arguments, typed change events come back, and `sub.honored` is the subset the server agreed to deliver. One honest caveat: over stdio the server does not serve the stream yet.
|
||||
At 2026-07-28 the standalone HTTP GET stream and `resources/subscribe` are replaced by `subscriptions/listen`: the client opens one long-lived stream and names the notification kinds it wants. `MCPServer` serves it out of the box; you publish with `await ctx.notify_resource_updated(uri)` (and `notify_tools_changed()`, and so on), and multi-replica deployments plug in a shared `SubscriptionBus`. On the client (since `2.0.0b2`), `async with client.listen(...)` opens the stream: the filter goes in as keyword arguments, typed change events come back, and `sub.honored` is the subset the server agreed to deliver.
|
||||
|
||||
**[Subscriptions](handlers/subscriptions.md)** covers publishing and serving, **[its Clients twin](client/subscriptions.md)** the watching end, and **[Deploy & scale](run/deploy.md)** the bus.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue