https://github.com/modelcontextprotocol/csharp-sdk
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
https://github.com/modelcontextprotocol/csharp-sdk
Last synced: 28 days ago
JSON representation
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
- Host: GitHub
- URL: https://github.com/modelcontextprotocol/csharp-sdk
- Owner: modelcontextprotocol
- License: other
- Created: 2025-03-10T18:17:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-30T23:19:02.000Z (2 months ago)
- Last Synced: 2026-01-31T01:32:54.408Z (2 months ago)
- Language: C#
- Homepage: https://modelcontextprotocol.github.io/csharp-sdk/
- Size: 3.35 MB
- Stars: 3,841
- Watchers: 73
- Forks: 614
- Open Issues: 141
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-mcp-servers - Model Context Protocol SDK - A C# SDK for building MCP (Model Context Protocol) servers, enabling seamless integration of custom tools and services into MCP-compatible clients. Essential for creating and running MCP servers as part of an Awesome MCP Servers list. ([Read more](/details/model-context-protocol-sdk.md)) `mcp` `sdk` `dotnet` `development` (Development Tools MCP Servers)
- awesome-mcp - C# - ASP.NET Core, Azure Functions integration. (SDKs / Official)
- awesome-dotnet-mcp - Offcial sdk - The official C# SDK for Model Context Protocol servers and clients, maintained by Microsoft (SDKs / dotnet sdk)
- awesome-mcp - modelcontextprotocol/csharp-sdk - Official C# SDK for the Model Context Protocol enabling .NET applications to implement and interact with MCP clients and servers for standardized integration with Large Language Models. (MCP Frameworks and libraries / C#)
- awesome-AI-driven-development - MCP C# SDK - The official C# SDK for Model Context Protocol servers and clients, maintained by Microsoft (MCP Servers & Integrations / Other IDEs)
- awesome-mcp-servers - **C# MCP SDK**
- awesome-claude-code - modelcontextprotocol/csharp-sdk - sdk?style=flat-square&logo=github) | Official C# SDK (with Microsoft) | (MCP Ecosystem / Core & Frameworks)
README
# MCP C# SDK
[](https://www.nuget.org/packages/ModelContextProtocol)
The official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit the [API documentation](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.html) for more details on available functionality.
## Packages
This SDK consists of three main packages:
- **[ModelContextProtocol.Core](https://www.nuget.org/packages/ModelContextProtocol.Core)** [](https://www.nuget.org/packages/ModelContextProtocol.Core) - For projects that only need to use the client or low-level server APIs and want the minimum number of dependencies.
- **[ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol)** [](https://www.nuget.org/packages/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](https://www.nuget.org/packages/ModelContextProtocol.AspNetCore)** [](https://www.nuget.org/packages/ModelContextProtocol.AspNetCore) - The library for HTTP-based MCP servers. References `ModelContextProtocol`.
## Getting Started
To get started, see the [Getting Started](https://modelcontextprotocol.github.io/csharp-sdk/concepts/getting-started.html) 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](samples) directory and the [API documentation](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.html) 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:
- [Official MCP Documentation](https://modelcontextprotocol.io/)
- [MCP C# SDK Documentation](https://modelcontextprotocol.github.io/csharp-sdk/)
- [Protocol Specification](https://modelcontextprotocol.io/specification/)
- [GitHub Organization](https://github.com/modelcontextprotocol)
## License
This project is licensed under the [Apache License 2.0](LICENSE).