github modelcontextprotocol/csharp-sdk v0.3.0-preview.1

latest releases: v2.4.0, v2.3.1, v1.4.2...
pre-release17 months ago

The v0.3.0-preview.1 release introduces spec-aligned content type renames, session ID support across transports, structured output for server tools, and improved Streamable HTTP client behavior.

Breaking Changes

Refer to the C# SDK Versioning documentation for information regarding our versioning, breaking change, and support approaches.

  1. Content type renames to match spec #513
    • Content renamed to ContentBlock with subclasses TextContentBlock, ImageContentBlock, AudioContentBlock, and ResourceContentBlock; CallToolResponse renamed to CallToolResult; CancelledNotification renamed to CancelledNotificationParams; ProgressNotification renamed to ProgressNotificationParams; Reference replaced with derived types ResourceReference, ResourceTemplateReference, and PromptReference; CallToolRequestParams sealed
    • Migration: Update all type name references throughout consuming code; search-and-replace is mostly sufficient
  2. Session ID support added across transports #466
    • SessionId property added to the ITransport and IMcpEndpoint interfaces, requiring all custom implementations to add this member; StreamableHttpServerTransport.InitializeRequest property replaced with OnInitRequestReceived callback
    • Migration: Add public string? SessionId => null; to custom ITransport/IMcpEndpoint implementations; replace reads of .InitializeRequest with callback via .OnInitRequestReceived

What's Changed

Documentation Updates

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.2.0-preview.3...v0.3.0-preview.1

Don't miss a new csharp-sdk release

NewReleases is sending notifications on new releases.