The MCP C# SDK is an official SDK for implementing Model Context Protocol servers and clients in .NET applications.
The Model Context Protocol standardizes how applications provide context to large language models by enabling secure integration between LLMs and various data sources and tools. This SDK allows .NET developers to build both MCP clients that consume protocol services and MCP servers that expose capabilities to LLMs. The implementation is maintained in collaboration with Microsoft and provides multiple packages tailored to different use cases: a minimal Core package for projects needing only client or low-level server APIs, a main package with hosting and dependency injection support for typical server implementations, an AspNetCore package for HTTP-based servers, and extension packages for building interactive UI applications and handling long-running asynchronous tool invocations.
Developers building .NET applications that need to integrate with LLMs or expose tools and data sources through a standardized protocol should consider this tool. It suits projects ranging from simple client implementations to complex server deployments, with the package structure allowing teams to include only the dependencies they need. The AspNetCore integration makes it particularly well-suited for teams already working within the .NET ecosystem who want to expose MCP servers over HTTP. The extension packages for apps and tasks address specific patterns: interactive UI rendering within MCP hosts and asynchronous long-running operations with status polling.
The project maintains active collaboration with Microsoft and provides comprehensive documentation including getting started guides, API reference, and sample implementations. Development activity shows consistent attention to the protocol specification with support for cross-application access through identity assertion authorization grant flows.