MCP Catalogs
Home

csharp-sdk

by modelcontextprotocol·4,264·Score 59

Official C# SDK for MCP servers and clients with three main packages for different use cases.

developer-toolsai-llm
703
Forks
181
Open issues
this month
Last commit
2d ago
Indexed

Overview

The C# SDK for MCP provides a comprehensive framework for implementing and interacting with MCP servers and clients in .NET environments. It consists of three main packages: Core for minimal dependencies, the main package for most projects, and AspNetCore for HTTP-based servers. The SDK is well-maintained with regular updates and extensive documentation.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Building MCP servers in C# for .NET applications
you:Creating MCP clients to connect to various MCP servers
you:Implementing HTTP-based MCP servers using ASP.NET Core
you:Which package should I choose for my project?
you:Is this SDK maintained by the official MCP organization?

When to choose this

Choose this SDK when building MCP servers or clients in .NET environments, especially if you need .NET integration or HTTP-based server capabilities.

When NOT to choose this

Not suitable if you're not using .NET/C# or need MCP functionality in a non-.NET environment.

Comparable tools

python-sdkjs-sdkgo-sdkrust-sdk

Installation

Installation

Install via NuGet:

# Core package for minimal dependencies
Install-Package ModelContextProtocol.Core

# Main package for most projects
Install-Package ModelContextProtocol

# For HTTP-based servers
Install-Package ModelContextProtocol.AspNetCore

For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "csharp-mcp": {
      "command": "dotnet",
      "args": ["run", "--project", "YourCsharpMcpProject"]
    }
  }
}

FAQ

Which package should I choose for my project?
Choose ModelContextProtocol.Core for minimal dependencies, ModelContextProtocol for most projects, and ModelContextProtocol.AspNetCore if you need HTTP server capabilities.
Is this SDK maintained by the official MCP organization?
Yes, this is the official C# SDK maintained in collaboration with Microsoft under the Model Context Protocol organization.

Compare csharp-sdk with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.