# csharp-sdk [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/modelcontextprotocol/csharp-sdk  
**GitHub Stars:** 4671  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/csharp-sdk

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

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What csharp-sdk does

csharp-sdk is the official C# SDK for the Model Context Protocol, maintained in collaboration with Microsoft. It lets .NET applications, services, and libraries implement MCP clients and servers. The SDK covers protocol-level client and server APIs, server hosting, dependency injection, HTTP transport, and several MCP extensions.

The package family supports different project sizes and deployment needs. `ModelContextProtocol.Core` is intended for projects that need only client functionality or low-level server APIs with minimal dependencies. `ModelContextProtocol` adds hosting and dependency-injection extensions and is the main choice for most projects that do not require HTTP server support. `ModelContextProtocol.AspNetCore` adds the library components for HTTP-based MCP servers.

## How it works

Applications reference the appropriate NuGet package and use the SDK APIs to create MCP clients or expose MCP servers. The core package supplies the lower-level protocol functionality, while the main package adds application hosting support. ASP.NET Core projects can use the dedicated package when MCP communication must be provided over HTTP.

The SDK also includes extensions for interactive MCP Apps, Agent Skills with verifiable file manifests, and Tasks. The Tasks extension supports asynchronous, long-running tool invocations with status polling and input requests. Cross-application access is supported through the Identity Assertion Authorization Grant flow and the `IdentityAssertionGrantProvider` component.

## Setup and configuration

Install the NuGet package that matches the application’s requirements. Use `ModelContextProtocol.Core` for the smallest client or low-level server dependency set. Choose `ModelContextProtocol` for hosting and dependency injection in projects that do not need HTTP server capabilities. Add `ModelContextProtocol.AspNetCore` for an HTTP-based MCP server.

Separate packages are available for optional extension areas:

- `ModelContextProtocol.Extensions.Apps` for interactive UI applications rendered inside MCP hosts.
- `ModelContextProtocol.Extensions.Skills` for serving and consuming Agent Skills with verifiable file manifests.
- `ModelContextProtocol.Extensions.Tasks` for asynchronous tool execution and status handling.

The project provides conceptual getting-started guidance, samples, and API documentation for complete client and server examples.

## Tools and capabilities

- Implement MCP clients in C# and .NET applications.
- Build MCP servers with low-level server APIs.
- Add hosting and dependency-injection support through the main package.
- Expose MCP servers over HTTP with ASP.NET Core.
- Build interactive MCP Apps for MCP hosts.
- Run long-lived tool calls with task status polling and input requests.

## Limitations and notes

This listing describes an SDK and package family rather than a standalone MCP service connected to a particular data source or SaaS API. Package selection affects the available hosting and transport features. HTTP server support is provided through the separate ASP.NET Core package, while projects that only need client or low-level server APIs can use the core package.

The project is licensed under Apache License 2.0.

_Full upstream README: https://allmcps.com/mcp/csharp-sdk/readme_

