csharp-mcp-server-generator

Generate a complete MCP server project in C# with tools, prompts, and proper configuration

25 stars

Best use case

csharp-mcp-server-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate a complete MCP server project in C# with tools, prompts, and proper configuration

Teams using csharp-mcp-server-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/csharp-mcp-server-generator/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/github/awesome-copilot/csharp-mcp-server-generator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/csharp-mcp-server-generator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How csharp-mcp-server-generator Compares

Feature / Agentcsharp-mcp-server-generatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate a complete MCP server project in C# with tools, prompts, and proper configuration

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Generate C# MCP Server

Create a complete Model Context Protocol (MCP) server in C# with the following specifications:

## Requirements

1. **Project Structure**: Create a new C# console application with proper directory structure
2. **NuGet Packages**: Include ModelContextProtocol (prerelease) and Microsoft.Extensions.Hosting
3. **Logging Configuration**: Configure all logs to stderr to avoid interfering with stdio transport
4. **Server Setup**: Use the Host builder pattern with proper DI configuration
5. **Tools**: Create at least one useful tool with proper attributes and descriptions
6. **Error Handling**: Include proper error handling and validation

## Implementation Details

### Basic Project Setup
- Use .NET 8.0 or later
- Create a console application
- Add necessary NuGet packages with --prerelease flag
- Configure logging to stderr

### Server Configuration
- Use `Host.CreateApplicationBuilder` for DI and lifecycle management
- Configure `AddMcpServer()` with stdio transport
- Use `WithToolsFromAssembly()` for automatic tool discovery
- Ensure the server runs with `RunAsync()`

### Tool Implementation
- Use `[McpServerToolType]` attribute on tool classes
- Use `[McpServerTool]` attribute on tool methods
- Add `[Description]` attributes to tools and parameters
- Support async operations where appropriate
- Include proper parameter validation

### Code Quality
- Follow C# naming conventions
- Include XML documentation comments
- Use nullable reference types
- Implement proper error handling with McpProtocolException
- Use structured logging for debugging

## Example Tool Types to Consider
- File operations (read, write, search)
- Data processing (transform, validate, analyze)
- External API integrations (HTTP requests)
- System operations (execute commands, check status)
- Database operations (query, update)

## Testing Guidance
- Explain how to run the server
- Provide example commands to test with MCP clients
- Include troubleshooting tips

Generate a complete, production-ready MCP server with comprehensive documentation and error handling.

Related Skills

Research Proposal Generator

25
from ComeOnOliver/skillshub

Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.

Paper Slide Deck Generator

25
from ComeOnOliver/skillshub

Transform academic papers and content into professional slide deck images with automatic figure extraction.

window-function-generator

25
from ComeOnOliver/skillshub

Window Function Generator - Auto-activating skill for Data Analytics. Triggers on: window function generator, window function generator Part of the Data Analytics skill category.

website-generator

25
from ComeOnOliver/skillshub

Use when the user asks to create a website, build a site, generate a landing page, or mentions B12. Trigger phrases: "create a website", "build me a site", "website for my business", "generate a landing page", "B12 website". Trigger with 'website', 'generator'.

webhook-receiver-generator

25
from ComeOnOliver/skillshub

Webhook Receiver Generator - Auto-activating skill for API Integration. Triggers on: webhook receiver generator, webhook receiver generator Part of the API Integration skill category.

vulnerability-report-generator

25
from ComeOnOliver/skillshub

Vulnerability Report Generator - Auto-activating skill for Security Advanced. Triggers on: vulnerability report generator, vulnerability report generator Part of the Security Advanced skill category.

vue-component-generator

25
from ComeOnOliver/skillshub

Vue Component Generator - Auto-activating skill for Frontend Development. Triggers on: vue component generator, vue component generator Part of the Frontend Development skill category.

user-story-generator

25
from ComeOnOliver/skillshub

User Story Generator - Auto-activating skill for Enterprise Workflows. Triggers on: user story generator, user story generator Part of the Enterprise Workflows skill category.

typeorm-entity-generator

25
from ComeOnOliver/skillshub

Typeorm Entity Generator - Auto-activating skill for Backend Development. Triggers on: typeorm entity generator, typeorm entity generator Part of the Backend Development skill category.

torchserve-config-generator

25
from ComeOnOliver/skillshub

Torchserve Config Generator - Auto-activating skill for ML Deployment. Triggers on: torchserve config generator, torchserve config generator Part of the ML Deployment skill category.

svg-icon-generator

25
from ComeOnOliver/skillshub

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

status-report-generator

25
from ComeOnOliver/skillshub

Status Report Generator - Auto-activating skill for Enterprise Workflows. Triggers on: status report generator, status report generator Part of the Enterprise Workflows skill category.