You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `callback_handler` passed to `OAuthClientProvider` now returns an `AuthorizationCodeResult` instead of a `tuple[str, str | None]` of `(code, state)`. The new object adds an `iss` field so the client can validate the RFC 9207 authorization-response issuer (SEP-2468): when the redirect carries an `iss` query parameter it must match the authorization server's issuer, and a missing `iss` is rejected when the server advertised `authorization_response_iss_parameter_supported`.
Forward the `iss` query parameter from the redirect so the validation can run: omitting it makes the flow fail with `OAuthFlowError` against servers that advertise `authorization_response_iss_parameter_supported`, and silently skips the check for servers that send `iss` without advertising it.
93
+
65
94
### `get_session_id` callback removed from `streamable_http_client`
66
95
67
96
The `get_session_id` callback (third element of the returned tuple) has been removed from `streamable_http_client`. The function now returns a 2-tuple `(read_stream, write_stream)` instead of a 3-tuple.
@@ -1220,6 +1249,16 @@ Tasks are expected to return as a separate MCP extension in a future release.
1220
1249
1221
1250
## Bug Fixes
1222
1251
1252
+
### OAuth metadata URLs no longer gain a trailing slash
1253
+
1254
+
`OAuthMetadata`, `ProtectedResourceMetadata`, and `OAuthClientMetadata` now set
1255
+
`url_preserve_empty_path=True` (Pydantic 2.12+). A path-less URL parsed from the wire keeps its
1256
+
empty path instead of acquiring a trailing slash, so e.g. an `issuer` of `https://as.example.com`
1257
+
round-trips as `https://as.example.com` rather than `https://as.example.com/`. This matters for
URLs constructed in Python from an already-built `AnyHttpUrl` object are unaffected (they were
1260
+
normalized at construction); only values parsed from strings/JSON change.
1261
+
1223
1262
### Lowlevel `Server`: `subscribe` capability now correctly reported
1224
1263
1225
1264
Previously, the lowlevel `Server` hardcoded `subscribe=False` in resource capabilities even when a `subscribe_resource()` handler was registered. The `subscribe` capability is now dynamically set to `True` when an `on_subscribe_resource` handler is provided. Clients that previously didn't see `subscribe: true` in capabilities will now see it when a handler is registered, which may change client behavior.
0 commit comments