{"type":"mcp_server","name":"csharp-sdk","description":"This repository contains the official C# SDK for the Model Context Protocol, enabling .NET applications to implement and interact with MCP clients and servers. It facilitates secure integration between LLMs","category":"Developer Tools","language":"C#","stars":4362,"forks":101,"owner":"modelcontextprotocol","github_url":"https://github.com/modelcontextprotocol/csharp-sdk","homepage":"https://www.nuget.org/packages/ModelContextProtocol","setup":"## Setup\nTo get started, install the package from NuGet:\n\n```\ndotnet add package ModelContextProtocol --prerelease\n```","tools":"## Available Tools\n\n1.  `McpClientFactory.CreateAsync` (Used to instantiate and connect an `IMcpClient` to a server).\n2.  `IMcpClient` (Interact with the server, such as to enumerate all available tools and invoke tools).\n3.  `ListToolsAsync` (Enumerate all available tools from the server).\n4.  `CallToolAsync` (Execute a tool).\n5.  `AddMcpServer` (Creates an MCP server).\n6.  `WithStdioServerTransport` (Configures the server to use standard input/output for communication).\n7.  `WithToolsFromAssembly` (Registers all tools from the current application).\n8.  `AsSamplingChatClient` (Allows the server to make sampling requests back to the client).\n","faq":null,"created_at":"2025-03-10T18:17:41+00:00","updated_at":"2025-03-28T23:55:09+00:00","source_url":"https://model-context-protocol.com/servers/csharp-sdk-model-context-protocol-integration","related_articles":[]}