Mirror of https://github.com/modelcontextprotocol/csharp-sdk — The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
  • C# 99.8%
  • JavaScript 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] de387bf0c4
Bump hono from 4.12.0 to 4.12.2 in the npm_and_yarn group across 1 directory (#1392)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 16:16:57 -08:00
.config Update to .NET SDK to 10.rc2 (#883) 2025-10-24 19:25:17 +03:00
.devcontainer Install mono in dev container (#1133) 2026-01-08 19:40:06 -06:00
.github Add README code sample validation step to release-notes skill (#1371) 2026-02-23 23:41:44 -05:00
docs Simplify and update README for stable release (#1387) 2026-02-24 23:55:01 -05:00
samples Mark RunSessionHandler experimental (MCPEXP002) (#1383) 2026-02-24 15:02:34 -08:00
src Register ping handler in McpSessionHandler to support server-initiated pings (#1391) 2026-02-26 18:53:20 -05:00
tests Register ping handler in McpSessionHandler to support server-initiated pings (#1391) 2026-02-26 18:53:20 -05:00
.editorconfig style: (#746) 2025-09-02 18:34:17 +03:00
.gitattributes Add gitattributes (#98) 2025-03-25 18:57:01 -07:00
.gitignore Use package-lock.json to pin conformance test dependencies (#1247) 2026-02-05 17:42:41 -08:00
CONTRIBUTING.md chore: update licensing to Apache 2.0 for new contributions (#1140) 2026-01-13 18:23:39 -08:00
Directory.Build.props Skip .NET Framework tests on non-Windows platforms (#1226) 2026-01-30 14:56:24 -08:00
Directory.Packages.props Bump Anthropic from 12.5.0 to 12.8.0 (#1359) 2026-02-23 11:38:03 -05:00
global.json Revert "Update to MTP (#958)" (#1011) 2025-11-21 14:53:16 -08:00
LICENSE chore: update licensing to Apache 2.0 for new contributions (#1140) 2026-01-13 18:23:39 -08:00
logo.png Add Directory.Build.props, apply CPM, use NB.GitVersioning, update package publishing 2025-03-19 17:27:18 +02:00
Makefile Add AOT compatibility publish test (#1246) 2026-02-09 22:00:12 +02:00
ModelContextProtocol.slnx Hide experimental types from external source generators using internal property pattern (#1301) 2026-02-19 07:27:30 -08:00
nuget.config Fix nuget config 2025-03-19 15:12:55 -04:00
Open.snk Add strong naming (#49) 2025-03-21 17:51:05 +00:00
package-lock.json Bump hono from 4.12.0 to 4.12.2 in the npm_and_yarn group across 1 directory (#1392) 2026-02-26 16:16:57 -08:00
package.json Update tests for @modelcontextprotocol/server-everything 2026.1.26 (#1273) 2026-02-17 16:49:12 -08:00
README.md Simplify and update package README.md files for stable release (#1388) 2026-02-26 08:59:28 -08:00
SECURITY.md Update SECURITY.md to use GitHub Security Advisories (#1306) 2026-02-18 15:41:14 -08:00
THIRD-PARTY-NOTICES.txt Add McpServer/ClientResource{Template} and friends (#391) 2025-05-09 18:21:11 -04:00

MCP C# SDK

NuGet version

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.

Packages

This SDK consists of three main packages:

  • ModelContextProtocol.Core NuGet version - For projects that only need to use the client or low-level server APIs and want the minimum number of dependencies.

  • ModelContextProtocol NuGet version - 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 NuGet version - The library for HTTP-based MCP servers. References ModelContextProtocol.

Getting Started

To get started, see the Getting Started guide in the conceptual documentation 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:

License

This project is licensed under the Apache License 2.0.