Skip to content

Commit fa548d7

Browse files
docs: update docs (#1089)
1 parent 8baa4cc commit fa548d7

6 files changed

Lines changed: 57 additions & 6 deletions

File tree

docs/client.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,12 @@ default. The middleware:
257257

258258
The middleware is enabled by default. To opt out, set
259259
[`ClientOptions.MultiRoundTrip.Disabled = true`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#MultiRoundTripOptions);
260-
the client will then surface `InputRequiredResult` values directly to the
261-
caller and your code must fulfil the requests manually.
260+
the client will then surface input-required results directly to the caller
261+
(the returned `CallToolResult`, `GetPromptResult`, or `ReadResourceResult`
262+
will report `NeedsInput() == true` and expose the server's `InputRequests`
263+
and opaque `RequestState`). Your code must fulfil each request and re-issue
264+
the original call with `InputResponses` set and `RequestState` echoed
265+
back.
262266

263267
For legacy (`<= 2025-11-25`) servers, the SDK transparently sends server
264268
requests on the legacy server-initiated channel; the MRTR machinery is a

docs/protocol.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
1. [Lifecycle](#lifecycle)
55
1. [Discovery (`server/discover`)](#discovery-(server/discover))
66
1. [Per-request `_meta` keys](#per-request-meta-keys)
7+
1. [Subscriptions (`subscriptions/listen`)](#subscriptions-(subscriptions/listen))
78
1. [Transports](#transports)
89
1. [Stdio Transport](#stdio-transport)
910
1. [Streamable Transport](#streamable-transport)
@@ -141,6 +142,22 @@ Server-side handlers can read them
141142
through `ServerRequest[P].ProtocolVersion()`, `ServerRequest[P].ClientInfo()`,
142143
and `ServerRequest[P].ClientCapabilities()`.
143144

145+
### Subscriptions (`subscriptions/listen`)
146+
147+
Introduced in `2026-07-28` by
148+
[SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575),
149+
`subscriptions/listen` replaces the legacy `resources/subscribe` RPC and
150+
the GET-based SSE endpoint with a single long-lived request that
151+
multiplexes every kind of server-to-client change notification a client
152+
opts in to. On the wire the client sends one `subscriptions/listen`
153+
request whose `notifications` field enumerates what it wants
154+
(`toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, and/or
155+
a list of resource URIs in `resourceSubscriptions`); the server replies
156+
first with a `notifications/subscriptions/acknowledged` notification
157+
reporting the honored subset, then streams every change notification on
158+
the same request, and finally closes with a `SubscriptionsListenResult`
159+
when it tears the subscription down.
160+
144161
## Transports
145162

146163
A

docs/server.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,12 @@ and
147147
to unsubscribe.
148148
Set
149149
[`ClientOptions.ResourceUpdatedHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientOptions.ResourceUpdatedHandler)
150-
to be notified of changes to subscribed resources.
150+
to be notified of changes to subscribed resources. On `2026-07-28` and
151+
later sessions the SDK delivers these notifications over a
152+
`subscriptions/listen` stream instead of the legacy `resources/subscribe`
153+
RPC; see [Subscriptions
154+
(`subscriptions/listen`)](protocol.md#subscriptions-subscriptionslisten)
155+
for the wire-level details.
151156

152157
**Server-side**:
153158
Use

internal/docs/client.src.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@ default. The middleware:
106106

107107
The middleware is enabled by default. To opt out, set
108108
[`ClientOptions.MultiRoundTrip.Disabled = true`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#MultiRoundTripOptions);
109-
the client will then surface `InputRequiredResult` values directly to the
110-
caller and your code must fulfil the requests manually.
109+
the client will then surface input-required results directly to the caller
110+
(the returned `CallToolResult`, `GetPromptResult`, or `ReadResourceResult`
111+
will report `NeedsInput() == true` and expose the server's `InputRequests`
112+
and opaque `RequestState`). Your code must fulfil each request and re-issue
113+
the original call with `InputResponses` set and `RequestState` echoed
114+
back.
111115

112116
For legacy (`<= 2025-11-25`) servers, the SDK transparently sends server
113117
requests on the legacy server-initiated channel; the MRTR machinery is a

internal/docs/protocol.src.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@ Server-side handlers can read them
8888
through `ServerRequest[P].ProtocolVersion()`, `ServerRequest[P].ClientInfo()`,
8989
and `ServerRequest[P].ClientCapabilities()`.
9090

91+
### Subscriptions (`subscriptions/listen`)
92+
93+
Introduced in `2026-07-28` by
94+
[SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575),
95+
`subscriptions/listen` replaces the legacy `resources/subscribe` RPC and
96+
the GET-based SSE endpoint with a single long-lived request that
97+
multiplexes every kind of server-to-client change notification a client
98+
opts in to. On the wire the client sends one `subscriptions/listen`
99+
request whose `notifications` field enumerates what it wants
100+
(`toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, and/or
101+
a list of resource URIs in `resourceSubscriptions`); the server replies
102+
first with a `notifications/subscriptions/acknowledged` notification
103+
reporting the honored subset, then streams every change notification on
104+
the same request, and finally closes with a `SubscriptionsListenResult`
105+
when it tears the subscription down.
106+
91107
## Transports
92108

93109
A

internal/docs/server.src.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ and
6565
to unsubscribe.
6666
Set
6767
[`ClientOptions.ResourceUpdatedHandler`](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk/mcp#ClientOptions.ResourceUpdatedHandler)
68-
to be notified of changes to subscribed resources.
68+
to be notified of changes to subscribed resources. On `2026-07-28` and
69+
later sessions the SDK delivers these notifications over a
70+
`subscriptions/listen` stream instead of the legacy `resources/subscribe`
71+
RPC; see [Subscriptions
72+
(`subscriptions/listen`)](protocol.md#subscriptions-subscriptionslisten)
73+
for the wire-level details.
6974

7075
**Server-side**:
7176
Use

0 commit comments

Comments
 (0)