C# SDK

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

Overview

What is C# SDK

csharp-sdk is the official C# SDK for Model Context Protocol servers and clients, developed in collaboration with Microsoft. It enables .NET applications, services, and libraries to implement and interact with MCP clients and servers.

How to Use

To use csharp-sdk, developers can install the relevant NuGet packages based on their project requirements. The main package is ModelContextProtocol, suitable for most projects, while ModelContextProtocol.AspNetCore is for HTTP-based servers, and ModelContextProtocol.Core is for low-level APIs.

Key Features

Key features include hosting and dependency injection extensions, support for HTTP-based MCP servers, and low-level client/server APIs with minimal dependencies.

Where to Use

csharp-sdk can be used in various fields including web applications, microservices, and any .NET-based solutions that require communication with MCP clients and servers.

Use Cases

Use cases for csharp-sdk include building web services that interact with MCP, developing applications that require data modeling and context management, and creating lightweight clients for MCP interactions.

Content