fix!: remove server_info from DiscoverResult (#1065)

Fixes https://github.com/modelcontextprotocol/rust-sdk/issues/1064
Replaces https://github.com/modelcontextprotocol/rust-sdk/pull/1044

This removes the `server_info` field which is not part of the spec:
 https://modelcontextprotocol.io/specification/draft/schema#discoverresult.
This commit is contained in:
John Howard 2026-07-28 14:55:40 -05:00 • committed by GitHub
commit 9a41811a66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,8 +70,8 @@ async fn client_discover_helper_returns_typed_result() {
.expect("discover should succeed");
assert_eq!(
result.server_info,
Implementation::new("discovery-server", "1.0.0")
result.server_info(),
Some(Implementation::new("discovery-server", "1.0.0"))
);
client.cancel().await.expect("client should cancel");
}