afrise/MCPSharp
MCPSharp is a .NET library that simplifies building Model Context Protocol (MCP) servers and clients, enabling seamless integration of AI tools and models through a standardized API.
The project 'modelcontextprotocol/csharp-sdk' is the official C# SDK for the Model Context Protocol (MCP), designed to enable .NET applications, services, and libraries to implement and interact with MCP clients and servers. MCP is an open protocol that standardizes how applications provide context to Large Language Models (LLMs), facilitating secure integration between LLMs and various data sources and tools. This SDK is composed of three main packages: ModelContextProtocol, which includes hosting and dependency injection extensions suitable for most projects; ModelContextProtocol.AspNetCore, which supports HTTP-based MCP servers; and ModelContextProtocol.Core, which offers client or low-level server APIs with minimal dependencies. The SDK allows developers to create MCP clients that can connect to any MCP-compliant server, enabling functionalities such as enumerating available tools and invoking them. It supports integration with LLM SDKs and provides examples and tests to demonstrate usage. The server-side capabilities include creating MCP servers that can register tools from the application assembly, with support for dependency injection and interaction with connected clients. Tools and prompts can be defined using attributes, allowing for flexible and extensible server implementations. The SDK is currently in preview, meaning breaking changes may occur without notice. It is distributed via NuGet packages and includes comprehensive API documentation. The project emphasizes interoperability and ease of use for developers working with MCP in the .NET ecosystem, aiming to standardize and simplify the integration of LLMs with external data and tools through a consistent protocol.
https://github.com/modelcontextprotocol/csharp-sdk
MCPSharp is a .NET library that simplifies building Model Context Protocol (MCP) servers and clients, enabling seamless integration of AI tools and models through a standardized API.