AUTOMATIONSWITCH
OfficialDev Tools

MCP C# SDK

by Model Context Protocol (Anthropic)

The official C# SDK for Model Context Protocol servers and clients. Maintained by the Model Context Protocol project. 4,261 GitHub stars and 22 commits on main in the last 30 days.

4,261·5 tools·Released JUN 2025·MIT/Apache-2.0 (transitioning)
dotnet add package ModelContextProtocol
Share:

The official C# SDK for Model Context Protocol servers and clients. Maintained by the Model Context Protocol project. 4,261 stars and 22 commits on main in the last 30 days.

Reviewed by M. Nouriel · MAY 2026

INSTALL THIS SERVER

{ "mcpServers": { "my-csharp-mcp-server": { "command": "dotnet", "args": [ "/path/to/my-csharp-mcp-server.dll" ] } } }
PrereqNuGet: `ModelContextProtocol`. Official C# SDK; example config shows a compiled .NET MCP server. Path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
{ "mcpServers": { "my-csharp-mcp-server": { "command": "dotnet", "args": [ "/path/to/my-csharp-mcp-server.dll" ] } } }
{ "mcpServers": { "my-csharp-mcp-server": { "command": "dotnet", "args": [ "/path/to/my-csharp-mcp-server.dll" ] } } }
{ "mcpServers": { "my-csharp-mcp-server": { "command": "dotnet", "args": [ "/path/to/my-csharp-mcp-server.dll" ] } } }
{ "mcpServers": { "my-csharp-mcp-server": { "command": "dotnet", "args": [ "/path/to/my-csharp-mcp-server.dll" ] } } }

5 TOOLS AVAILABLE

create_server
Construct an MCP server in C# with the official SDK
Admin
register_tool
Register a C# method as an MCP tool
Admin
register_resource
Expose data as an MCP resource
Admin

OUR ASSESSMENT

Strengths
  • 4,261 GitHub stars.
  • 22 commits on main in the last 30 days.
  • Maintained by the Model Context Protocol project.
  • ASP.NET Core integration patterns.
  • Supports all three MCP transports.
Weaknesses
  • Multi-licence repo during the documented MIT to Apache-2.0 transition; track for full Apache-2.0 cutover.
  • API surface evolves with the protocol; pin NuGet versions in production.
  • Smaller community than Python or TypeScript SDKs.
Security Notes

SDK has no auth by default. Servers built with the SDK must add authentication; ASP.NET Core middleware patterns work well for this.

Best For

C# and .NET developers building MCP servers; teams running ASP.NET Core stacks; enterprise shops that prefer the .NET runtime for production agents.

TECHNICAL DETAILS

Language
csharp
Transport
stdiostreamable-httpsse
Clients
Claude DesktopClaude CodeCursorVS CodeWindsurf
License
MIT/Apache-2.0 (transitioning)
npm
ModelContextProtocol
Last Release
ModelContextProtocol (NuGet latest)MAY 14, 2026
First Released
JUN 1, 2025

ADOPTION METRICS

// GitHub Stars
4,261

// Reading this4,261 stars on modelcontextprotocol/csharp-sdk. 22 commits on main in the last 30 days. LICENSE confirmed via direct inspection: MIT/Apache-2.0 transitioning posture.

// Popularity Rank
#7
Globally · #7 in Dev Tools

// Reading thisPairs with MCP Python SDK, MCP TypeScript SDK, MCP Go SDK, mark3labs/mcp-go in the official MCP language layer.

SOURCES & VERIFICATION

We don't take any single directory's word for it. Before scoring, we cross-reference 5 public MCP sources, install the server ourselves against the clients we cover, and record when we last re-verified.

01
Discovered
Manual submission
First indexed MAY 14, 2026
02
Cross-referenced
5 directories
PulseMCP, MCP.so, Glama, Smithery, Official MCP Registry
03
Verified against
Claude Desktop, Cursor
Installed and tested across clients
04
Last re-checked
MAY 14, 2026
Weekly re-verification
// How other directories see it

The same server, 5 different lenses. We reconcile these signals into our editorial score, which is why our number sometimes diverges from a directory-aggregate star count.

SourceTheir ratingTheir star countTheir downloadsLast synced
AutomationSwitch This page4.5editorial4,261MAY 14, 2026
PulseMCP— unratedunavailableunavailableMAY 14, 2026
MCP.so— unratedunavailableunavailableMAY 14, 2026
Glama— unratedunavailableunavailableMAY 14, 2026
Smithery— unratedunavailableunavailableMAY 14, 2026
Official MCP Registry— unratedunavailableunavailableMAY 14, 2026

// Counts are directory-reported; we don't adjust them. Discrepancies usually come from different snapshot times or star-caching.

// Get in touch

DISCUSS YOUR
MCP REQUIREMENTS.

Evaluating a server, scoping an internal deployment, or working out whether MCP is the right fit at all. Start the conversation and we will point you at the right piece of the ecosystem.

Discuss Your MCP Requirements →