MCPSharp is a .NET library for building Model Context Protocol (MCP) servers and clients, enabling seamless creation of AI-compatible tools and integration with Microsoft.Extensions.AI and Semantic Kernel. MCPSharp is a
MCPSharp is a .NET library for building Model Context Protocol (MCP) servers and clients, facilitating communication between AI assistants and models. It allows creating MCP-compliant tools and functions, connecting to MCP servers from C#, and exposing .NET methods as MCP endpoints.
Key features include:
KernelFunctionAttribute
.Use cases involve:
The library offers an attribute-based API ([McpTool]
, [McpResource]
), built-in JSON-RPC support, automatic parameter validation, and XML documentation support. Installation is via NuGet.
afrise/MCPSharp
February 17, 2025
March 28, 2025
C#