Csharp SDK logo

Csharp SDK

Official .NET SDK for building MCP clients and servers with C#, including HTTP hosting and protocol extensions.

Install Csharp SDK

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for csharp-sdk, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

csharp-sdk MCP server provides the official C#/.NET SDK for implementing MCP clients and servers. It includes low-level client and server APIs, hosting and dependency-injection extensions, and ASP.NET Core support for HTTP-based servers. Additional packages cover MCP Apps, Skills, Tasks, and cross-application identity assertion authorization. Reach for it when a .NET application needs to provide or consume MCP capabilities rather than connect to a specific external service.

Use cases

  • Build an MCP client in a .NET application
  • Create an MCP server with C#
  • Expose MCP functionality through ASP.NET Core HTTP hosting
  • Run long-running tool invocations with status polling
  • Serve Agent Skills with verifiable file manifests

Key features

  • C# client and low-level server APIs
  • Hosting and dependency-injection extensions
  • ASP.NET Core support for HTTP-based MCP servers
  • MCP Apps, Skills, and Tasks extensions
  • Identity Assertion Authorization Grant support

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

59/59 checks healthy over the last 45d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4.7kStargazers on the source repository.
Last commit6d agoMost recent push to the default branch.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Csharp SDK works

What csharp-sdk does

csharp-sdk is the official C# SDK for the Model Context Protocol, maintained in collaboration with Microsoft. It lets .NET applications, services, and libraries implement MCP clients and servers. The SDK covers protocol-level client and server APIs, server hosting, dependency injection, HTTP transport, and several MCP extensions.

The package family supports different project sizes and deployment needs. ModelContextProtocol.Core is intended for projects that need only client functionality or low-level server APIs with minimal dependencies. ModelContextProtocol adds hosting and dependency-injection extensions and is the main choice for most projects that do not require HTTP server support. ModelContextProtocol.AspNetCore adds the library components for HTTP-based MCP servers.

How it works

Applications reference the appropriate NuGet package and use the SDK APIs to create MCP clients or expose MCP servers. The core package supplies the lower-level protocol functionality, while the main package adds application hosting support. ASP.NET Core projects can use the dedicated package when MCP communication must be provided over HTTP.

The SDK also includes extensions for interactive MCP Apps, Agent Skills with verifiable file manifests, and Tasks. The Tasks extension supports asynchronous, long-running tool invocations with status polling and input requests. Cross-application access is supported through the Identity Assertion Authorization Grant flow and the IdentityAssertionGrantProvider component.

Setup and configuration

Install the NuGet package that matches the application’s requirements. Use ModelContextProtocol.Core for the smallest client or low-level server dependency set. Choose ModelContextProtocol for hosting and dependency injection in projects that do not need HTTP server capabilities. Add ModelContextProtocol.AspNetCore for an HTTP-based MCP server.

Separate packages are available for optional extension areas:

  • ModelContextProtocol.Extensions.Apps for interactive UI applications rendered inside MCP hosts.
  • ModelContextProtocol.Extensions.Skills for serving and consuming Agent Skills with verifiable file manifests.
  • ModelContextProtocol.Extensions.Tasks for asynchronous tool execution and status handling.

The project provides conceptual getting-started guidance, samples, and API documentation for complete client and server examples.

Tools and capabilities

  • Implement MCP clients in C# and .NET applications.
  • Build MCP servers with low-level server APIs.
  • Add hosting and dependency-injection support through the main package.
  • Expose MCP servers over HTTP with ASP.NET Core.
  • Build interactive MCP Apps for MCP hosts.
  • Run long-lived tool calls with task status polling and input requests.

Limitations and notes

This listing describes an SDK and package family rather than a standalone MCP service connected to a particular data source or SaaS API. Package selection affects the available hosting and transport features. HTTP server support is provided through the separate ASP.NET Core package, while projects that only need client or low-level server APIs can use the core package.

The project is licensed under Apache License 2.0.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Csharp SDK

csharp-sdk is an MCP server that provides the official C# and .NET SDK for building MCP clients and servers. It connects .NET applications to the Model Context Protocol through client APIs, low-level server APIs, hosting and dependency-injection extensions, and ASP.NET Core support for HTTP-based MCP servers.

Install the appropriate csharp-sdk NuGet package for your .NET project. Use ModelContextProtocol.Core for minimal client or low-level server APIs, ModelContextProtocol for hosting and dependency injection, and ModelContextProtocol.AspNetCore when building an HTTP-based MCP server.

Use ModelContextProtocol.AspNetCore for an HTTP-based MCP server. It builds on the main ModelContextProtocol package, which provides hosting and dependency-injection extensions.

Yes, the ModelContextProtocol.Extensions.Tasks package supports long-running tool invocations asynchronously. It includes status polling and input requests for task workflows.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCsharp SDK AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/csharp-sdk?style=directory)](https://allmcps.com/mcp/csharp-sdk)
HTML Embed
<a href="https://allmcps.com/mcp/csharp-sdk"><img src="https://allmcps.com/api/badge/csharp-sdk?style=directory" alt="Csharp SDK on AllMCPs" /></a>