Skip to content

Releases: modelcontextprotocol/csharp-sdk

v0.1.0-preview.13

10 May 15:48
61092e0

Choose a tag to compare

v0.1.0-preview.13 Pre-release
Pre-release

This release adds McpServerResource, McpClientResource, and related resource template types, and updates the Microsoft.Extensions.AI dependency.

Breaking Changes

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

  1. Resource type changes #391
    • ListResourcesAsync return type changed from IList<Resource> to IList<McpClientResource>
    • ListResourceTemplatesAsync return type changed similarly
    • ReadResourceRequestParams.Uri changed from optional to required
    • Multiple extension methods changed return types from Task<T> to ValueTask<T>
    • IMcpServerPrimitive.Name renamed to Id (resource names aren't unique)
    • McpServer now registers default handlers instead of failing for missing handlers

What's Changed

Repository Infrastructure Updates

  • Bump version to v0.1.0-preview.13 by @halter73

Acknowledgements

Full Changelog: v0.1.0-preview.12...v0.1.0-preview.13

v0.1.0-preview.12

05 May 22:46
bac97ef

Choose a tag to compare

v0.1.0-preview.12 Pre-release
Pre-release

This release adds client-side Streamable HTTP transport support, removes batching from StreamableHttpServerTransport, and introduces schema creation options for tools and prompts.

Breaking Changes

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

  1. Removed batching support from StreamableHttpServerTransport #372
    • Server no longer accepts batched (JSON array) JSON-RPC requests on the Streamable HTTP transport

What's Changed

Repository Infrastructure Updates

  • Bump version to v0.1.0-preview.12 by @halter73

Acknowledgements

Full Changelog: v0.1.0-preview.11...v0.1.0-preview.12

v0.1.0-preview.11

24 Apr 18:01
e3ff552

Choose a tag to compare

v0.1.0-preview.11 Pre-release
Pre-release

The 0.1.0-preview.11 release fixes the SSE Server /message endpoint to use root-relative URIs, fixes GET accept header validation in the Streamable HTTP transport, and improves documentation.

What's Changed

  • Emit root-relative /message endpoint when using SSE Server #323 by @dogdie233
  • Fix GET accept header validation for server-side Streamable HTTP transport and improve testing #345 by @halter73

Documentation Updates

  • Clarify McpClientTool inherits from AIFunction in README.md #338 by @ferrywlto (co-authored by @halter73)
  • Fixed issue preventing README.md client example from compiling #346 by @PederHP

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.10...v0.1.0-preview.11

v0.1.0-preview.10

19 Apr 00:41
7dcba35

Choose a tag to compare

v0.1.0-preview.10 Pre-release
Pre-release

This release cleans up McpException and McpTransportException with the McpErrorCode enum, adds progress notification support for McpClientTool, and introduces server-side Streamable HTTP transport support.

Breaking Changes

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

  1. Clean up McpException and McpTransportException (#321): McpException.ErrorCode changed from int? to McpErrorCode enum; McpTransportException class deleted; transport errors now throw InvalidOperationException

What's Changed

  • Support progress notifications with McpClientTool and McpClientExtensions.CallToolAsync #312 by @stephentoub
  • Add WithTools/Prompts overloads that accept McpServerTool/Prompts #319 by @stephentoub
  • Clean up (use of) McpException and McpTransportException #321 by @stephentoub
  • Add server-side Streamable HTTP transport support #330 by @halter73

Test Improvements

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.9...v0.1.0-preview.10

v0.1.0-preview.9

15 Apr 17:06
312aede

Choose a tag to compare

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.

  1. Wrap each request in a service scope #276

    • All capability handler delegate types changed from Func<..., Task<T>> to Func<..., ValueTask<T>> including SamplingHandler, ListToolsHandler, CallToolHandler, ListPromptsHandler, GetPromptHandler, and all resource/completion/logging handlers
    • McpServerTool.InvokeAsync and McpServerPrompt.GetAsync return types changed to ValueTask
  2. Add StreamableHttpHandler and WithHttpTransport #291

    • MapMcp removed configureOptionsAsync and runSessionAsync parameters; configuration moved to WithHttpTransport(Action<HttpServerTransportOptions>?)
    • SseClientTransportOptions.MaxReconnectAttempts and ReconnectDelay properties removed
  3. Clean up logging #286

    • TransportBase constructor changed from (ILoggerFactory?) to (string name, ILoggerFactory?) — required parameter added
    • TransportBase.EndpointName renamed to TransportBase.Name
    • TransportBase.Logger accessibility narrowed from protected to private protected
    • Custom transport implementations extending TransportBase must update

What's Changed

Documentation Updates

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.8...v0.1.0-preview.9

v0.1.0-preview.8

11 Apr 17:02
ce4e658

Choose a tag to compare

v0.1.0-preview.8 Pre-release
Pre-release

This release corrects the CreateMessageResult.Role type, exposes JsonSerializerOptions configuration across tool and prompt APIs, and adds comprehensive XML documentation comments across the SDK.

Breaking Changes

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

  1. Fix CreateMessageResult.Role type #264
    • CreateMessageResult.Role changed from string to Role enum type
    • Migration: Replace string values like "assistant" with Role.Assistant or "user" with Role.User
  2. Expose JsonSerializerOptions in prompts APIs #279
    • WithPrompts removed params modifier; added JsonSerializerOptions? serializerOptions parameter
    • Migration: Wrap multiple type arguments in a collection, e.g. WithPrompts([typeof(A), typeof(B)])
  3. Expose JsonSerializerOptions in tools APIs #266
    • WithTools removed params modifier; added JsonSerializerOptions? serializerOptions parameter
    • Migration: Wrap multiple type arguments in a collection, e.g. WithTools([typeof(A), typeof(B)])

What's Changed

Documentation Updates

  • Add XML documentation comments across the SDK #238 by @robch (co-authored by @stephentoub)
  • Augment McpServerTool/Prompt docs with details of parameter/result marshaling #271 by @stephentoub

Test Improvements

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.7...v0.1.0-preview.8

v0.1.0-preview.7

09 Apr 18:18
39ab6cd

Choose a tag to compare

v0.1.0-preview.7 Pre-release
Pre-release

This release removes McpServerConfig in favor of McpClientOptions, introduces strong typing for request parameters, adds the server completions capability, enables notification handler registration after endpoint creation, and adds the Everything Server sample.

Breaking Changes

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

  1. Allow notification handlers post-creation temporary registration #223
    • ClientCapabilities.NotificationHandlers and ServerCapabilities.NotificationHandlers delegate changed from Func<..., Task> to Func<..., CancellationToken, Task>
  2. Use strong-typing of params in most remaining McpClientExtensions methods #224
    • CallToolRequestParams.Arguments changed from Dictionary<string, JsonElement>? to IReadOnlyDictionary<string, JsonElement>?
    • GetPromptRequestParams.Arguments similarly changed
  3. Remove McpServerConfig and have McpClientFactory accept IClientTransport instances directly #230
    • McpServerConfig class deleted
    • McpClientFactory.CreateAsync parameter changed from McpServerConfig to IClientTransport
    • IClientTransport gained required Name property
  4. Add server completions capability #232
    • GetCompletionAsync renamed to CompleteAsync
    • WithGetCompletionHandler renamed to WithCompleteHandler

What's Changed

Documentation Updates

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.6...v0.1.0-preview.7

v0.1.0-preview.6

04 Apr 18:46
d21d933

Choose a tag to compare

v0.1.0-preview.6 Pre-release
Pre-release

This release consolidates exception types into McpException and moves notification handler registrations into the capabilities model.

Breaking Changes

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

  1. Consolidate McpClientException/McpServerException into McpException #209
    • McpClientException class deleted
    • IMcpClient.ServerCapabilities changed from nullable to non-nullable (throws InvalidOperationException if not connected); same for ServerInfo
  2. Move notification handler registrations to capabilities #207
    • AddNotificationHandler removed from IMcpEndpoint
    • Notification handlers now set via ClientCapabilities.NotificationHandlers and ServerCapabilities.NotificationHandlers

What's Changed

  • Disable response buffering for SSE responses #208 by @halter73
  • Consolidate McpClientException/McpServerException into McpException #209 by @stephentoub
  • Move notification handler registrations to capabilities #207 by @stephentoub

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.5...v0.1.0-preview.6

v0.1.0-preview.5

03 Apr 19:25
c70dde3

Choose a tag to compare

v0.1.0-preview.5 Pre-release
Pre-release

This release extends progress notification support, adds JsonSerializerOptions parameters for tool and prompt operations, adds initial OpenTelemetry observability, and reorganizes ASP.NET Core extension methods into the standard namespace.

Breaking Changes

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

  1. Extend progress notification support #163
    • IMcpClient base interface changed to IMcpEndpoint
    • SamplingCapability.SamplingHandler delegate signature gained IProgress<ProgressNotificationValue> parameter
  2. Put MapMcp in Microsoft.AspNetCore.Builder namespace #171
    • McpEndpointRouteBuilderExtensions moved from ModelContextProtocol.AspNetCore to Microsoft.AspNetCore.Builder namespace
  3. Split StdioClient/ServerTransports into Stdio : Stream #172
    • StdioServerTransport stream-based constructor removed; base class changed from TransportBase to StreamServerTransport; StdioClientStreamTransport replaced by StdioClientSessionTransport and new StreamClientTransport
    • Migration: Use StreamServerTransport for custom stream-based servers; update StdioServerTransport constructor calls
  4. Allow JsonSerializerOptions parameters #182
    • New JsonSerializerOptions? parameter inserted before cancellationToken in ListToolsAsync, EnumerateToolsAsync, GetPromptAsync
    • SendNotificationAsync extension method removed from McpClientExtensions
  5. Remove McpServerConfig.Arguments property #192
    • McpServerConfig.Arguments property removed
    • Migration: Use McpServerConfig.TransportOptions["arguments"] instead

What's Changed

Documentation Updates

Test Improvements

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.4...v0.1.0-preview.5

v0.1.0-preview.4

31 Mar 19:39
4c537ef

Choose a tag to compare

v0.1.0-preview.4 Pre-release
Pre-release

This release introduces the ModelContextProtocol.AspNetCore package for hosting MCP servers in ASP.NET Core applications with SSE transport support.

Breaking Changes

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

  1. Add ModelContextProtocol.AspNetCore #160
    • HttpListenerSseServerTransport removed
    • IServerTransport interface removed
    • MapMcpSse renamed to MapMcp and moved to the new ModelContextProtocol.AspNetCore package

What's Changed

Repository Infrastructure Updates

Acknowledgements

Full Changelog: v0.1.0-preview.3...v0.1.0-preview.4