trackmcp
Back to directory
modelcontextprotocol

csharp-sdk

View on GitHub

The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft. Trusted by 3500+ developers.

3,512 stars C#AI & Machine Learning Updated Nov 4, 2025

Documentation

MCP C# SDK

NuGet version

The official C# SDK for the Model Context Protocol, enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit the API documentation for more details on available functionality.

Packages

The SDK packages are:

NuGet version
NuGet version
NuGet version
NuGet version
NuGet version

Getting Started

To get started, see the Getting Started guide in the conceptual documentation for installation instructions, package-selection guidance, and complete examples for both clients and servers.

You can also browse the samples directory and the API documentation for more details on available functionality.

About MCP

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.

For more information about MCP:

Cross-Application Access (Identity Assertion Authorization Grant flow)

The SDK provides support for the Identity Assertion Authorization Grant flow

via `IdentityAssertionGrantProvider`. See the Cross-Application Access section in the transport docs for full usage details.

License

This project is licensed under the Apache License 2.0.

Frequently asked questions

What is csharp-sdk?

csharp-sdk is The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft. Trusted by 3500+ developers.

How do I install csharp-sdk?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is csharp-sdk open source?

Yes — it is hosted on GitHub at https://github.com/modelcontextprotocol/csharp-sdk and has 3,512 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP