v0.1.0-preview.9
Pre-release
Pre-release
This release wraps each MCP request in a dependency injection service scope, introduces the Streamable HTTP transport with StreamableHttpHandler and WithHttpTransport, updates OpenTelemetry instrumentation with context propagation, and cleans up logging. It includes several breaking changes to handler delegate signatures, HTTP transport configuration, and transport base class APIs.
Breaking Changes
Refer to the C# SDK Versioning documentation for details on versioning and breaking change policies.
-
Wrap each request in a service scope #276
- All capability handler delegate types changed from
Func<..., Task<T>>toFunc<..., ValueTask<T>>includingSamplingHandler,ListToolsHandler,CallToolHandler,ListPromptsHandler,GetPromptHandler, and all resource/completion/logging handlers McpServerTool.InvokeAsyncandMcpServerPrompt.GetAsyncreturn types changed toValueTask
- All capability handler delegate types changed from
-
Add StreamableHttpHandler and WithHttpTransport #291
MapMcpremovedconfigureOptionsAsyncandrunSessionAsyncparameters; configuration moved toWithHttpTransport(Action<HttpServerTransportOptions>?)SseClientTransportOptions.MaxReconnectAttemptsandReconnectDelayproperties removed
-
Clean up logging #286
TransportBaseconstructor changed from(ILoggerFactory?)to(string name, ILoggerFactory?)— required parameter addedTransportBase.EndpointNamerenamed toTransportBase.NameTransportBase.Loggeraccessibility narrowed fromprotectedtoprivate protected- Custom transport implementations extending
TransportBasemust update
What's Changed
- Wrap each request in a service scope #276 by @stephentoub
- OpenTelemetry: context propagation and semconv update #262 by @lmolkova
- Add AdditionalHeader handling to ReceiveMessageAsync #295 by @ClosetheWorld
- Add StreamableHttpHandler and WithHttpTransport #291 by @halter73
- Remove unnecessary $ and fix some typos #305 by @MikeAlhayek
- Clean up logging #286 by @stephentoub
Documentation Updates
- Fix the docs and make them more readable #281 by @MikeAlhayek
Repository Infrastructure Updates
- Bump version to 0.1.0-preview.9 #284 by @eiriktsarpalis
- Workflow refactoring and improvements #273 by @jeffhandley
Acknowledgements
- @MikeAlhayek made their first contribution in #281
- @lmolkova made their first contribution in #262
- @ClosetheWorld made their first contribution in #295
- @JeffreySu submitted issue #234 (resolved by #276)
- @gong626035906 submitted issue #198 (resolved by #276)
Full Changelog: v0.1.0-preview.8...v0.1.0-preview.9