ModelContextProtocol 2.2.0
MCP C# SDK
The official C# SDK for the Model Context Protocol, enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit the API documentation for more details on available functionality.
See the release notes for what's new in this version.
Packages
The SDK packages are:
ModelContextProtocol.Core
- For projects that only need to use the client or low-level server APIs and want the minimum number of dependencies.
ModelContextProtocol
- The main package with hosting and dependency injection extensions. References
ModelContextProtocol.Core. This is the right fit for most projects that don't need HTTP server capabilities.ModelContextProtocol.AspNetCore
- The library for HTTP-based MCP servers. References
ModelContextProtocol.ModelContextProtocol.Extensions.Apps
- MCP Apps extension for building interactive UI applications that render inside MCP hosts.
ModelContextProtocol.Extensions.Tasks
- MCP Tasks extension for running long-running tool invocations asynchronously with status polling and input requests.
Getting Started
To get started, see the Getting Started guide for installation instructions, package-selection guidance, and complete examples for both clients and servers.
You can also browse the samples directory and the API documentation for more details on available functionality.
About MCP
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.
For more information about MCP:
Showing the top 20 packages that depend on ModelContextProtocol.
| Packages | Downloads |
|---|---|
|
Aspire.Hosting.PostgreSQL
PostgreSQL® support for Aspire.
|
6 |
|
Aspire.Hosting.Orleans
Orleans support for Aspire.
|
5 |
|
Aspire.Hosting
Core abstractions for the Aspire application model.
|
5 |
|
Aspire.Hosting.AppHost
Core library and MSBuild logic for Aspire AppHost projects.
|
5 |
|
Aspire.Hosting.Python
Python support for Aspire.
|
5 |
|
Aspire.Hosting.Testing
Testing support for the Aspire application model.
|
5 |
|
Aspire.Hosting.Testing
Testing support for the Aspire application model.
|
4 |
|
Aspire.Hosting.MySql
MySQL support for Aspire.
|
4 |
|
Aspire.Hosting.SqlServer
Microsoft SQL Server support for Aspire.
|
4 |
|
Aspire.Hosting.Azure
Azure resource types for Aspire.
|
4 |
|
Aspire.Hosting.Azure.Storage
Azure Storage resource types for Aspire.
|
4 |
|
Aspire.Hosting.Python
Python support for Aspire.
|
4 |
|
Aspire.Hosting
Core abstractions for the Aspire application model.
|
4 |
|
Aspire.Hosting.Orleans
Orleans support for Aspire.
|
4 |
|
Aspire.Hosting.Azure
Azure resource types for Aspire.
|
3 |
.NET 8.0
- ModelContextProtocol.Core (= 2.2.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
.NET Standard 2.0
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- ModelContextProtocol.Core (= 2.2.0)
.NET 10.0
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- ModelContextProtocol.Core (= 2.2.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
.NET 9.0
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- ModelContextProtocol.Core (= 2.2.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
| Version | Downloads | Last updated |
|---|---|---|
| 2.2.0 | 1 | 8/28/2026 |
| 2.1.0 | 0 | 8/5/2026 |
| 2.0.0 | 0 | 7/28/2026 |
| 2.0.0-rc.2 | 0 | 7/28/2026 |
| 2.0.0-rc.1 | 1 | 8/28/2026 |
| 2.0.0-preview.3 | 0 | 7/15/2026 |
| 2.0.0-preview.2 | 1 | 8/29/2026 |
| 2.0.0-preview.1 | 0 | 6/26/2026 |
| 1.4.1 | 1 | 8/29/2026 |
| 1.4.0 | 0 | 6/4/2026 |
| 1.3.0 | 0 | 5/8/2026 |
| 1.2.0 | 3 | 4/1/2026 |
| 1.1.0 | 4 | 3/24/2026 |
| 1.0.0 | 4 | 3/24/2026 |
| 1.0.0-rc.1 | 4 | 3/24/2026 |
| 0.9.0-preview.2 | 4 | 3/24/2026 |
| 0.9.0-preview.1 | 4 | 3/24/2026 |
| 0.8.0-preview.1 | 4 | 3/24/2026 |
| 0.7.0-preview.1 | 4 | 3/24/2026 |
| 0.6.0-preview.1 | 4 | 3/24/2026 |
| 0.5.0-preview.1 | 4 | 3/24/2026 |
| 0.4.1-preview.1 | 4 | 3/24/2026 |
| 0.4.0-preview.3 | 4 | 3/24/2026 |
| 0.4.0-preview.2 | 4 | 3/24/2026 |
| 0.4.0-preview.1 | 4 | 3/24/2026 |
| 0.3.0-preview.4 | 4 | 3/24/2026 |
| 0.3.0-preview.3 | 4 | 3/24/2026 |
| 0.3.0-preview.2 | 4 | 3/24/2026 |
| 0.3.0-preview.1 | 4 | 3/25/2026 |
| 0.2.0-preview.3 | 4 | 3/24/2026 |
| 0.2.0-preview.2 | 4 | 3/24/2026 |
| 0.2.0-preview.1 | 4 | 3/24/2026 |
| 0.1.0-preview.14 | 4 | 3/24/2026 |
| 0.1.0-preview.13 | 4 | 3/24/2026 |
| 0.1.0-preview.12 | 4 | 3/24/2026 |
| 0.1.0-preview.11 | 4 | 3/24/2026 |
| 0.1.0-preview.10 | 4 | 3/24/2026 |
| 0.1.0-preview.9 | 4 | 3/24/2026 |
| 0.1.0-preview.8 | 4 | 3/24/2026 |
| 0.1.0-preview.7 | 4 | 3/24/2026 |
| 0.1.0-preview.6 | 4 | 3/24/2026 |
| 0.1.0-preview.5 | 4 | 3/24/2026 |
| 0.1.0-preview.4 | 4 | 3/24/2026 |
| 0.1.0-preview.3 | 4 | 3/24/2026 |
| 0.1.0-preview.2 | 5 | 3/24/2026 |