csharp-mcp-server-generator
Installation
Summary
Scaffold a production-ready C# MCP server with tools, logging, and proper configuration.
- Generates a complete .NET 8.0+ console application with Host builder pattern, DI configuration, and stdio transport setup
- Includes automatic tool discovery via
WithToolsFromAssembly(), attribute-based tool definitions, and structured logging routed to stderr - Provides example tool implementations with parameter validation, async support, and McpProtocolException error handling
- Covers project structure, NuGet dependencies, XML documentation, nullable reference types, and testing guidance with MCP client examples
SKILL.md
Generate C# MCP Server
Create a complete Model Context Protocol (MCP) server in C# with the following specifications:
Requirements
- Project Structure: Create a new C# console application with proper directory structure
- NuGet Packages: Include ModelContextProtocol (prerelease) and Microsoft.Extensions.Hosting
- Logging Configuration: Configure all logs to stderr to avoid interfering with stdio transport
- Server Setup: Use the Host builder pattern with proper DI configuration
- Tools: Create at least one useful tool with proper attributes and descriptions
- Error Handling: Include proper error handling and validation