# csharp-sdk

> The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.

- **URL**: https://www.freshcrate.ai/projects/csharp-sdk
- **Author**: modelcontextprotocol
- **Category**: MCP Servers
- **Latest version**: `v1.4.0` (2026-06-04)
- **License**: NOASSERTION
- **Source**: https://github.com/modelcontextprotocol/csharp-sdk
- **Homepage**: https://csharp.sdk.modelcontextprotocol.io/
- **Language**: C#
- **GitHub**: 4,210 stars, 680 forks
- **Registry**: github
- **Tags**: `c#`, `csharp`, `dotnet`, `mcp`, `mcp-client`, `mcp-server`, `modelcontextprotocol`

## Description

The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v1.4.0` | 2026-06-04 | High | **v1.4.0** introduces support for the Identity Assertion Authorization Grant (ID-JAG) flow via the new `IdentityAssertionGrantProvider`, enabling enterprise SSO scenarios where users authenticate once via their enterprise Identity Provider and access MCP servers without per-server authorization prompts. The release also adds a new `InheritEnvironmentVariables` option on `StdioClientTransportOptions` for controlling the child server's environment, alongside two security hardening fixes: the stdio |
| `v1.3.0` | 2026-05-08 | High | **v1.3.0** focuses on improved transport diagnostics and security-focused documentation. The new public `ClientTransportClosedException` gives stdio and HTTP clients structured access to transport closure details (exit codes, process IDs, stderr tails, HTTP status codes) without parsing exception messages. Two reliability fixes harden the stdio process pipeline (preventing host crashes from user `StandardErrorLines` callbacks) and correct the stateless HTTP transport's capability advertisement. |
| `v1.2.0` | 2026-03-27 | Medium | This release improves stateless HTTP transport defaults and documentation with a **breaking behavioral change** that we are considering as a server reliability fix and therefore not bumping the major version with this release. **Legacy SSE endpoints are now disabled by default** with a new `HttpServerTransportOptions.EnableLegacySse` property available to opt back into responding to the SSE endpoints; the property is marked as an `[Obsolete]` warning as we expect to remove this property in a fut |
| `v1.1.0` | 2026-03-06 | Low | Highlights of v1.1.0 include client completion details for understanding when and why a client connection ended, auto-populated completion handlers from `AllowedValuesAttribute`, and bug fixes for server-initiated ping handling, server capabilities initialization, and in-flight message handler cleanup.  ## What's Changed  * Register ping handler in McpSessionHandler to support server-initiated pings #1391 by @stephentoub (co-authored by @Copilot) * Fix Extensions not being copied to ServerC |
| `v1.0.0` | 2026-02-25 | Low | **This is the first stable release of the ModelContextProtocol C# SDK.** Thank you to all of the contributors who helped us achieve this milestone!  ## Breaking Changes  Refer to the [C# SDK Versioning](https://modelcontextprotocol.github.io/csharp-sdk/versioning.html) documentation for details on versioning and breaking change policies.  1. **Mark RunSessionHandler experimental (MCPEXP002) #1383**    * `HttpServerTransportOptions.RunSessionHandler` is now annotated with `[Experimental("M |
| `v1.0.0-rc.1` | 2026-02-24 | Low | This release candidate completes a full API surface area audit ahead of the 1.0.0 stable release, with more changes to public APIs to ensure consistency and long-term maintainability. Protocol DTO types are updated to match the MCP specification, deprecated filter APIs are removed, and bug fixes improve transport reliability and JSON handling.  ## Breaking Changes  Refer to the [C# SDK Versioning](https://modelcontextprotocol.github.io/csharp-sdk/versioning.html) documentation for details on |
| `v0.9.0-preview.2` | 2026-02-21 | Low | This release focuses on API surface consistency and correctness ahead of 1.0.0. Public collection properties are now typed as `IList<T>` instead of concrete `List<T>` or `T[]`, and `Root.Meta` is aligned with the rest of the protocol DTOs by using `JsonObject?`. Other improvements include new experimental Extensions support for capabilities, missing `ResourceLinkBlock` properties, improved mimeType handling, and several documentation and test reliability fixes.  **We plan to release the stable |
| `v0.9.0-preview.1` | 2026-02-20 | Low | 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](https://modelcontextprotocol.github.io/csharp-sdk/versioning.html) documentation for details on versioning and breaking change policies.  1. **U |
| `v0.8.0-preview.1` | 2026-02-05 | Low | The 0.8.0-preview.1 release includes new server-side capabilities including message-level filters and a distributed cache-backed event stream store, along with several bug fixes for transport reliability. This release also includes a breaking change that seals public Protocol reference types to prevent external inheritance, reinforcing the SDK's API contract as we continue refining toward a stable 1.0.0 release.  ## Breaking Changes  Refer to the [C# SDK Versioning](https://modelcontextproto |
| `v0.7.0-preview.1` | 2026-01-28 | Low | The 0.7.0-preview.1 release adds MCP task support, Streamable HTTP resumability with SSE event stream storage, and support for the 2025-11-25 protocol version. This release also introduces user-defined `JsonSerializerOptions` throughout SDK serialization APIs and includes several bug fixes for elicitation, source generator diagnostics, and URI template matching. The Streamable HTTP transport includes breaking changes to `StreamableHttpServerTransport` as part of the resumability implementation. |

## Citation

- HTML: https://www.freshcrate.ai/projects/csharp-sdk
- Markdown: https://www.freshcrate.ai/projects/csharp-sdk.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/csharp-sdk/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
