by afrise
MCPSharp is a .NET library that helps you build Model Context Protocol (MCP) servers and clients - the standardized API protocol used by AI assistants and models.
# Add to your Claude Code skills
git clone https://github.com/afrise/MCPSharpMCPSharp is a .NET library that helps you build Model Context Protocol (MCP) servers and clients - the standardized API protocol used by AI assistants and models. With MCPSharp, you can:
Use MCPSharp when you want to:
No comments yet. Be the first to share your thoughts!
[McpTool], [McpResource])dotnet add package MCPSharp
Create a class and mark your method(s) with the [McpTool] attribute:
using MCPSharp;
public class Calculator
{
[McpTool("add", "Adds two numbers")] // Note: [McpFunction] is deprecated, use [McpTool] instead
public static int Add([McpParameter(true)] int a, [McpParameter(true)] int b)
{
return a + b;
}
}
await MCPServer.StartAsync("CalculatorServer", "1.0.0");
The StartAsync() method will automatically find any methods in the base ass...