MCP C# SDK 2.3.0 released: ServerInfo is now nullable
MCP C# SDK 2.3.0 brings improvements to HTTP discovery, OAuth, stdio shutdown and the ordering of server tools, prompts and resources. It also includes a source-compatibility change: McpClient.ServerInfo is now nullable. Projects that read this property may see new nullable warnings or fail warnings-as-errors builds.
Key points
- McpClient.ServerInfo now returns Implementation?; add a null check or a fallback value before dereferencing it.
- On 2026-07-28 connections the server identity may be absent, while legacy initialize still requires serverInfo.
- Reading ServerInfo before connecting still throws InvalidOperationException.
- Self-reported server identity must not drive security decisions.
- McpClientOptions.TimeProvider lets you write deterministic client timeout tests.
- Modern SSE discovery needs both HttpTransportMode.Sse and ProtocolVersion = "2026-07-28"; AutoDetect with a pinned version is not equivalent.
MCP C# SDK 2.3.0 is the latest release of the library that lets .NET applications connect to tools and services through the Model Context Protocol. The headline change is a source-compatibility fix: McpClient.ServerInfo now returns a nullable Implementation. On 2026-07-28 connections the value is null when the server omits its optional identity metadata, while the legacy initialize path still requires it.
The release also tightens several transport details. Streamable HTTP error responses now include JSON parse information, discovery falls back more predictably, and OAuth is excluded from the short discovery probe budget while still respecting the overall initialization timeout. McpClientOptions.TimeProvider makes client timeouts testable without real waiting. Server tools, prompts and resources are listed in registration order, and stdio servers get their stdin closed before shutdown waits.
Real-world use
- A .NET service that connects to several MCP tool servers and logs the identity each one reports
- An enterprise codebase with warnings-as-errors enabled that needs to adopt the ServerInfo nullability change
- Integration test suites that verify client timeout behavior with a fake clock
Why it matters
Any code that dereferences McpClient.ServerInfo may now produce nullable warnings and break builds that treat warnings as errors. Add null handling before upgrading.