Comprehensive MCP implementations in .NET, Docker, and Azure Functions
References:
This project demonstrates multiple production-ready approaches to creating Model Context Protocol (MCP) servers, from learning implementations to enterprise-grade solutions:
NEW: mcp-sdk-dotnet/ β Production-ready MCP server using Microsoft's official SDK
- β Official Microsoft MCP SDK with full protocol compliance
- β 20+ Advanced Tools across 6 categories (system, web, diagnostics, monitoring)
- β Docker & VS Code Integration ready
- β Attribute-based tool registration with dependency injection
- β Real-time performance monitoring and health checks
- β Comprehensive validation & testing built-in
| Implementation | Status | Architecture | Best For |
|---|---|---|---|
| π MCP SDK .NET | β Production | Official Microsoft SDK, stdio transport | Enterprise & Production |
| π³ Docker MCP | β Complete | Containerized REST API | Cloud Deployment |
| β‘ .NET MCP | β Complete | Custom HTTP implementation | Learning & Experimentation |
| βοΈ Azure Functions | π§ In Progress | Serverless architecture | Serverless & Auto-scaling |
cd mcp-sdk-dotnet
dotnet run
# Ready for VS Code Insiders integration!cd docker-mcp
docker-compose up -d
# Accessible at http://localhost:5090cd dotnet-mcp/McpServer
dotnet run
# Development server with hot reloadFor a comprehensive development plan, milestones, and learning objectives, see the Project Roadmap document.
The flagship implementation using Microsoft's official ModelContextProtocol NuGet packages:
GetSystemInfo- Comprehensive system information and hardware specsMonitorResources- Real-time CPU, memory, and performance monitoringForceGarbageCollection- Memory optimization with before/after metrics
Echo- Connection testing and message validationCompleteText- Advanced text completion with statistical analysisAnalyzeData- JSON data analysis and processing
FetchAndAnalyze- HTTP request analysis with content inspectionHealthCheck- Multi-URL health monitoring and uptime checksNetworkDiagnostics- DNS resolution and connectivity testing
GetServerDiagnostics- Complete server health and configuration analysisListAvailableTools- Dynamic tool discovery and documentationPerformHealthCheck- Comprehensive health checks with external dependenciesValidateProtocolCompliance- MCP protocol compliance validation
GetPerformanceMetrics- Real-time server performance statisticsGetConfigurationStatus- Configuration validation and statusOptimizeMemory- Memory optimization with detailed analytics
ProcessStructuredData- JSON data aggregation, filtering, and transformationAnalyzeWebContent- Web content analysis with multiple analysis typesGenerateSystemReport- Detailed system and performance reporting
- Add to your
mcp.json:
{
"mcpServers": {
"DotNet MCP SDK": {
"command": "dotnet",
"args": ["run", "--project", "path/to/mcp-sdk-dotnet"],
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}-
Start using tools immediately:
- Ask Copilot: "Use the GetSystemInfo tool to show my system specs"
- Ask Copilot: "Use the GetPerformanceMetrics tool to check server health"
- Ask Copilot: "Use the HealthCheck tool to test https://github.com"
-
Verification script included:
cd mcp-sdk-dotnet
.\verify-mcp-integration.ps1| Feature | SDK Server | Custom Server | Docker Server |
|---|---|---|---|
| Protocol | Official SDK | Manual Implementation | REST API |
| Transport | Stdio/JSON-RPC | HTTP/REST | HTTP/REST |
| Tools | 20+ Advanced | 8 Basic | 8 Basic |
| Monitoring | Built-in | Basic | Basic |
| Integration | VS Code Native | External API | External API |
| Performance | Optimized | Good | Containerized |
| Development | Rapid | Custom | Portable |
All implementations include comprehensive testing:
- Built-in validation:
dotnet run --validate - Docker health checks: Automatic container health monitoring
- Performance benchmarks: Real-time metrics and analytics
- Protocol compliance: MCP specification validation
This project provides a progressive learning experience for MCP development:
- π Start with SDK Server (
mcp-sdk-dotnet/) - Learn MCP concepts with production-ready tools - π Explore Custom Implementation (
dotnet-mcp/) - Understand protocol internals - π³ Deploy with Docker (
docker-mcp/) - Master containerization and deployment - βοΈ Scale with Azure Functions (
azure-functions-mcp/) - Enterprise serverless architecture
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-tool - Follow MCP best practices (see
.github/instructions/) - Add comprehensive tests
- Submit a pull request
- πΊοΈ Project Roadmap - Development milestones and learning objectives
- π§ VS Code Integration Guide - Complete setup instructions
- ποΈ Copilot Setup Instructions - Development environment setup
MIT License - see LICENSE for details.
β Star this repository if you find it helpful for MCP development!
Built with β€οΈ for the Model Context Protocol community.