mcp-csharp-starter
by SamMorrowDrums·★ 0·Score 36
A feature-complete MCP server template in C# with tools, resources, and prompts using .NET 8.
Overview
This MCP server provides a comprehensive starter template for building C# applications with Model Context Protocol integration. It includes well-structured examples of all major MCP features: tools with progress updates, resource templates, and prompt definitions. The codebase demonstrates both stdio and HTTP transport options, making it suitable for both local development and remote deployment scenarios. The project follows .NET best practices with dependency injection, proper separation of concerns, and comprehensive documentation.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this if you're developing .NET applications and want to integrate MCP functionality using idiomatic C# code.
When NOT to choose this
Avoid if you're not using .NET/C# or need a solution that's not tied to Microsoft's ecosystem.
Tools this server exposes
6 tools extracted from the READMEhelloA friendly greeting tool
get_weatherTool returning structured weather information
ask_llmTool that invokes LLM sampling to get responses
long_taskTool that runs with progress updates for long operations
load_bonus_toolDynamically loads a new tool into the server
bonus_calculatorCalculator that's dynamically loaded as a bonus tool
Comparable tools
Installation
Installation
- Prerequisites: [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- Clone the repository
``bash git clone https://github.com/SamMorrowDrums/mcp-csharp-starter.git cd mcp-csharp-starter ``
- Restore dependencies
``bash dotnet restore ``
- Run the server
```bash # stdio transport dotnet run
# HTTP transport dotnet run -- --http --port 8080 ```
Claude Desktop Configuration
{
"mcpServers": {
"csharp-starter": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/mcp-csharp-starter"],
"env": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}FAQ
- How do I add a new tool to the server?
- Create a new class with the [McpServerToolType] attribute, define methods with [McpServerTool] attributes, and register the class in your server configuration.
- Can I deploy this server to a cloud environment?
- Yes, use the HTTP transport mode with dotnet run -- --http --port 8080, then configure reverse proxy as needed for production deployment.
Compare mcp-csharp-starter with
Last updated · Auto-generated from public README + GitHub signals.