MCPSharp
MCPSharp is a .NET library that helps you build Model Context Protocol (MCP) servers and clients.
MCPSharp allows developers to create MCP-compliant tools and functions that AI models can discover and use, connect directly to existing MCP servers from C# code, and expose .NET methods as MCP endpoints with simple attributes. It handles MCP protocol details and JSON-RPC communication seamlessly, making it easier to integrate AI capabilities into applications.
Compatible with
Install
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcpsharp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcpsharp"
]
}
}
}Config File Location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Some servers require additional setup - check the GitHub README for specific instructions.
Permissions