chore: publish from main

This commit is contained in:
github-actions[bot]
2026-07-31 00:31:43 +00:00
parent 24bbea8585
commit aaaa07b031
13 changed files with 69 additions and 44 deletions
@@ -110,9 +110,13 @@ client.RegisterNotificationHandler(
});
```
## Version negotiation (2026-07-28)
Since 2.x, `McpClient.CreateAsync` probes the server with `server/discover` first and falls back to the legacy `initialize` handshake for down-level servers automatically — no configuration needed on your side.
## Handling server-to-client requests (sampling, elicitation, roots)
If your server uses these features, your client must handle them. Configure handlers when creating the client:
If your server uses these features, your client must handle them. Note that sampling and roots are deprecated in the 2026-07-28 spec (`MCP9005` warnings on 2.x) — you still need the handlers to interoperate with servers that use them. Configure handlers when creating the client:
```csharp
await using var client = await McpClient.CreateAsync(transport, new McpClientOptions