Skip to content

v0.9.0-preview.1

Pre-release
Pre-release

Choose a tag to compare

@jeffhandley jeffhandley released this 20 Feb 07:41
d21aa9e

The 0.9.0-preview.1 release includes multiple breaking changes focused on quality, extensibility, usability, and API consistency as we continue refining the SDK in preparation for a stable 1.0.0 release.

We plan to release the stable 1.0.0 release early in the week of February 23, 2026.

Breaking Changes

Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.

  1. Use ReadOnlyMemory<byte> for binary data to eliminate UTF-16 transcoding #1070

    • ImageContentBlock.Data, AudioContentBlock.Data, and BlobResourceContents.Blob changed from string to ReadOnlyMemory<byte>; FromImage/FromAudio renamed to FromBytes; BlobResourceContents.Data renamed to DecodedData
    • Migration: Use DecodedData for decoded bytes and FromBytes(...) factory methods
  2. Split configuration of request and message filters #1308

    • Add*Filter extension methods on IMcpServerBuilder replaced by WithMessageFilters and WithRequestFilters callbacks with grouped builder instances
    • Migration: Wrap existing filter registration inside the new callback methods
  3. Don't treat McpServerHandlers as an independent options type #1313

    • McpServerHandlers no longer resolved via IOptions<McpServerHandlers>; handlers set directly on McpServerOptions.Handlers
    • Migration: Configure handlers through McpServerOptions directly
  4. Add ISessionMigrationHandler #1270

    • Stateful Streamable HTTP POST requests without a session ID are now rejected with 400 unless the message is an initialize request
    • Compat switch: ModelContextProtocol.AspNetCore.AllowNewSessionForNonInitializeRequests = true restores previous behavior
  5. Change ProtectedResourceMetadata URI properties to strings #1264

    • Multiple properties changed from Uri?/List<Uri> to string?/List<string> to avoid unwanted URI normalization
    • Migration: Use string values directly instead of Uri objects
  6. Hide experimental types from external source generators using internal property pattern #1301

    • Experimental properties now use [JsonIgnore] + internal delegate pattern; external source generators no longer reference experimental types
    • No code changes needed for most consumers
  7. Validate MCP-Protocol-Version header in Streamable HTTP handler #1277

    • Server returns HTTP 400 for invalid/unsupported header values; missing header still allowed
    • Migration: Ensure clients send a valid protocol version or omit the header
  8. Update McpErrorCode and fix error code usage to align with MCP spec #1291

    • Task support validation errors changed from MethodNotFound to InvalidParams
    • Migration: Update error code checks for task support validation scenarios

What's Changed

  • Bring up to 0.1.13 conformance #1254 by @stephentoub
  • Change ProtectedResourceMetadata URI properties to strings and build resource strings directly #1264 by @halter73 (co-authored by @Copilot)
  • Log tool call name on success, not just failure #1256 by @halter73 (co-authored by @Copilot)
  • Fix HttpClient timeout for long-running tools without event stream store #1268 by @halter73 (co-authored by @Copilot)
  • Fix stderr event loss due to missing WaitForExit in DisposeProcess #1280 by @stephentoub (co-authored by @Copilot)
  • Update McpErrorCode XML docs and fix error code usage to align with MCP spec #1291 by @stephentoub (co-authored by @Copilot)
  • Add X-Accel-Buffering header to SSE responses #1294 by @stephentoub (co-authored by @Copilot)
  • Fix StdioServerTransport.DisposeAsync() hang: CancellableStdinStream missing Dispose override #1276 by @stephentoub (co-authored by @Copilot)
  • Avoid intermediate strings in MCP transport serialization #1274 by @stephentoub (co-authored by @Copilot @halter73)
  • Validate MCP-Protocol-Version header in Streamable HTTP handler #1277 by @stephentoub (co-authored by @Copilot)
  • Hide experimental types from external source generators using internal property pattern #1301 by @MackinnonBuck
  • Use ReadOnlyMemory<byte> for binary data to eliminate UTF-16 transcoding #1070 by @stephentoub (co-authored by @Copilot @ericstj)
  • Add ISessionMigrationHandler #1270 by @MackinnonBuck
  • Don't treat McpServerHandlers as an independent options type #1313 by @halter73
  • Split configuration of request and message filters #1308 by @halter73 (co-authored by @Copilot)

Documentation Updates

  • Align InitializeResult.instructions XML docs with latest MCP spec guidance #1290 by @stephentoub (co-authored by @Copilot @halter73)
  • Align sampling specification XML docs with spec revision d165cd6 #1293 by @stephentoub (co-authored by @Copilot)
  • Clarify request-scoped tool semantics in CreateMessageRequestParams #1295 by @stephentoub (co-authored by @Copilot)
  • Document https:// direct-fetch provision in ReadResourceRequestParams #1296 by @stephentoub (co-authored by @Copilot)
  • Add validation and error signaling guidance to MCP tool XML docs #1275 by @stephentoub (co-authored by @Copilot)
  • Update SECURITY.md to use GitHub Security Advisories #1306 by @localden
  • Add docs for working with experimental APIs #1307 by @MackinnonBuck (co-authored by @jeffhandley)

Test Improvements

  • Use package-lock.json to pin conformance test dependencies #1247 by @halter73
  • Update to MCP conformance tests version 0.1.13 #1249 by @stephentoub
  • Add AOT compatibility publish test #1246 by @stephentoub (co-authored by @Copilot @eiriktsarpalis)
  • Add tests to verify McpClient.DisposeAsync doesn't hang #1252 by @halter73
  • Add auth regression test for missing resource in PRM #1265 by @halter73 (co-authored by @Copilot)
  • Fix test for CannotAuthenticate when metadata is missing #1266 by @halter73 (co-authored by @Copilot)
  • Fix flaky stderr test: call WaitForExit() after WaitForExitAsync() to flush ErrorDataReceived events #1278 by @stephentoub (co-authored by @Copilot)
  • Unskip GetRequest_Receives_UnsolicitedNotifications test #1286 by @mikekistler (co-authored by @Copilot)
  • Fix flaky sse-retry conformance test caused by CI timing sensitivity #1279 by @stephentoub (co-authored by @Copilot)
  • Add serialization roundtrip tests for all Protocol namespace types #1289 by @stephentoub (co-authored by @Copilot)
  • Update tests for @modelcontextprotocol/server-everything 2026.1.26 #1273 by @stephentoub (co-authored by @Copilot)
  • Reduce flakiness in long-running stateless HTTP tool timeout test #1300 by @halter73 (co-authored by @Copilot)
  • Use TimeProvider in InMemoryMcpTaskStore for deterministic testing #1303 by @halter73 (co-authored by @Copilot)

Repository Infrastructure Updates

  • Bump version to 0.9.0-preview.1 #1245 by @jeffhandley (co-authored by @halter73)
  • Bump qs from 6.14.1 to 6.14.2 in the npm_and_yarn group across 1 directory #1271
  • Bump the other-testing group with 2 updates #1283
  • Bump Anthropic from 12.3.0 to 12.5.0 #1284
  • Bump Microsoft.Extensions.AI from 10.2.0 to 10.3.0 #1285
  • Bump the serilog-testing group with 1 update #1282
  • Bump the testing-frameworks group with 1 update #1281
  • Bump ajv from 8.17.1 to 8.18.0 in the npm_and_yarn group across 1 directory #1302

Acknowledgements

Full Changelog: v0.8.0-preview.1...v0.9.0-preview.1