sa

salty-flower/ModelContextProtocol.NET

#๏ธโƒฃ ๐Ÿ  A C# SDK for building MCP servers on .NET 9 with NativeAOT compatibility โšก ๐Ÿ”Œ

#C##.NET#NativeAOT
Publishersalty-flower/ModelContextProtocol.NET
Submitted date4/19/2025

Overview

Title

ModelContextProtocol.NET

A C# SDK implementation of the Model Context Protocol (MCP), enabling seamless integration of AI tools and services with standardized communication.

How to Use

  1. Installation:
    • Server Package:
      dotnet add package ModelContextProtocol.NET.Server --prerelease
    • Hosting Integration:
      dotnet add package ModelContextProtocol.NET.Server.Hosting --prerelease
  2. Setup:
    • Configure logging (e.g., Serilog or NLog).
    • Implement tool handlers or functions.
    • Start the server with or without .NET generic hosting.

Key Features

โœ… Ready to Use

  • Standard I/O communication
  • Tool integration framework
  • Native AOT compatibility
  • Calculator demo implementation

๐Ÿšง Under Development

  • WebSocket support
  • Resource management
  • Prompt system

Use Cases

  • AI Tool Integration: Easily connect AI models with external tools.
  • Custom Service Hosting: Build and deploy MCP-compatible services.
  • Demo & Prototyping: Quickly test concepts with the included calculator demo.
  • Native AOT Applications: Optimize for performance-critical environments.

Visit More

View All