MCPHub LabRegistrymodelcontextprotocol/csharp-sdk
modelcontextprotocol

modelcontextprotocol/csharp sdk

Built by modelcontextprotocol 4,156 stars

What is modelcontextprotocol/csharp sdk?

The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.

How to use modelcontextprotocol/csharp sdk?

1. Install a compatible MCP client (like Claude Desktop). 2. Open your configuration settings. 3. Add modelcontextprotocol/csharp sdk using the following command: npx @modelcontextprotocol/modelcontextprotocol-csharp-sdk 4. Restart the client and verify the new tools are active.
🛡️ Scoped (Restricted)
npx @modelcontextprotocol/modelcontextprotocol-csharp-sdk --scope restricted
🔓 Unrestricted Access
npx @modelcontextprotocol/modelcontextprotocol-csharp-sdk

Key Features

Native MCP Protocol Support
Real-time Tool Activation & Execution
Verified High-performance Implementation
Secure Resource & Context Handling

Optimized Use Cases

Extending AI models with custom local capabilities
Automating system workflows via natural language
Connecting external data sources to LLM context windows

modelcontextprotocol/csharp sdk FAQ

Q

Is modelcontextprotocol/csharp sdk safe?

Yes, modelcontextprotocol/csharp sdk follows the standardized Model Context Protocol security patterns and only executes tools with explicit user-granted permissions.

Q

Is modelcontextprotocol/csharp sdk up to date?

modelcontextprotocol/csharp sdk is currently active in the registry with 4,156 stars on GitHub, indicating its reliability and community support.

Q

Are there any limits for modelcontextprotocol/csharp sdk?

Usage limits depend on the specific implementation of the MCP server and your system resources. Refer to the official documentation below for technical details.

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

This SDK consists of three main packages:

  • 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.

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:

License

This project is licensed under the Apache License 2.0.

Global Ranking

8.5
Trust ScoreMCPHub Index

Based on codebase health & activity.

Manual Config

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