MCPSharp
Createdafrise
Enables building Model Context Protocol (MCP) servers and clients in .NET for AI assistant integration.
About
MCPSharp is a .NET library designed to streamline the creation of MCP-compliant tools and functions, allowing developers to seamlessly integrate .NET applications with AI assistants and models. It simplifies the process of building MCP servers and clients by offering an easy-to-use, attribute-based API, built-in JSON-RPC support, and automatic parameter validation. MCPSharp facilitates exposing .NET methods as MCP endpoints, dynamic tool registration, and integration with Microsoft.Extensions.AI and Semantic Kernel, making it a powerful tool for adding AI capabilities to applications through standardized interfaces.
Key Features
- Built-in JSON-RPC support for seamless communication
- Integration with Microsoft.Extensions.AI as AIFunctions
- Attribute-based API for easy tool and resource definition
- 237 GitHub stars
- Automatic parameter validation and type conversion
- Semantic Kernel support via KernelFunctionAttribute
Use Cases
- Create tools for AI assistants like Anthropic's Claude Desktop
- Integrate with Microsoft.Extensions.AI and Semantic Kernel
- Expose existing .NET code as MCP endpoints