MCP Catalogs
Home

mcp-csharp-starter

by SamMorrowDrums·0·Score 36

A feature-complete MCP server template in C# with tools, resources, and prompts using .NET 8.

developer-toolsai-llmother
0
Forks
4
Open issues
this month
Last commit
2d ago
Indexed

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:

you:Building custom AI tools for .NET applications
you:Creating MCP servers for enterprise integration
you:Developing AI-powered code review assistants
you:How do I add a new tool to the server?
you:Can I deploy this server to a cloud environment?

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 README
  • hello

    A friendly greeting tool

  • get_weather

    Tool returning structured weather information

  • ask_llm

    Tool that invokes LLM sampling to get responses

  • long_task

    Tool that runs with progress updates for long operations

  • load_bonus_tool

    Dynamically loads a new tool into the server

  • bonus_calculator

    Calculator that's dynamically loaded as a bonus tool

Comparable tools

mcp-python-startermcp-js-startermcp-rust-starter

Installation

Installation

  1. Prerequisites: [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
  2. Clone the repository

``bash git clone https://github.com/SamMorrowDrums/mcp-csharp-starter.git cd mcp-csharp-starter ``

  1. Restore dependencies

``bash dotnet restore ``

  1. 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.