MCPHub LabRegistrymodelcontextprotocol/csharp-sdk
modelcontextprotocol

modelcontextprotocol/csharp sdk

Built by modelcontextprotocol • 4,156 stars

What is modelcontextprotocol/csharp sdk?

A high-performance MCP server implementation for modelcontextprotocol/csharp-sdk that bridges the gap between the Model Context Protocol and external services. It allows Large Language Models to interact with your data and tools with low latency and native support.

How to use modelcontextprotocol/csharp sdk?

1. Ensure you have an MCP-compatible client (like Claude Desktop) installed. 2. Configure your server with: npx @modelcontextprotocol/modelcontextprotocol/csharp-sdk 3. Restart your client and verify the new tools are available in the system catalog.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/modelcontextprotocol-csharp-sdk --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/modelcontextprotocol-csharp-sdk

Key Features

Native MCP Protocol Support
High-performance Data Streaming
Type-safe Tool Definitions
Seamless Environment Integration

Optimized Use Cases

Connecting external databases to AI workflows
Automating workflow tasks via natural language
Augmenting developer productivity with specialized tools

modelcontextprotocol/csharp sdk FAQ

Q

What is an MCP server?

MCP is an open standard that enables developers to build secure, two-way integrations between AI models and local or remote data sources.

Q

Is this server ready for production?

Yes, this server follows standard MCP security patterns and tool-restricted access.

Official Documentation

View on GitHub

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:

  • ModelContextProtocol.Core NuGet version - For projects that only need to use the client or low-level server APIs and want the minimum number of dependencies.

  • ModelContextProtocol NuGet version - The main package with hosting and dependency injection extensions. References ModelContextProtocol.Core. This is the right fit for most projects that don't need HTTP server capabilities.

  • ModelContextProtocol.AspNetCore NuGet version - The library for HTTP-based MCP servers. References ModelContextProtocol.

  • ModelContextProtocol.Extensions.Apps NuGet version - MCP Apps extension for building interactive UI applications that render inside MCP hosts.

  • ModelContextProtocol.Extensions.Tasks NuGet version - MCP Tasks extension for running long-running tool invocations asynchronously with status polling and input requests.

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.

Global Ranking

7.8
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

{ "mcpServers": { "modelcontextprotocol-csharp-sdk": { "command": "npx", "args": ["modelcontextprotocol-csharp-sdk"] } } }