Agent skill

Csharp MCP Server Generator

by ILoveDotNet in ILoveDotNet/ilovedotnet

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

CC0-1.0Auto-check passedAgent Workflows

Install Csharp MCP Server Generator

skills CLI
$ npx skills add ILoveDotNet/ilovedotnet --skill csharp-mcp-server-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ILoveDotNet/ilovedotnet csharp-mcp-server-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ILoveDotNet/ilovedotnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/csharp-mcp-server-generator .claude/skills/csharp-mcp-server-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
csharp-mcp-server-generator
GitHub stars
155
Token cost
~560 tokens
SKILL.md length
255 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
CC0-1.0

At a glance

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

  • Works in 6 steps: Project Structure: Create a new C#… → NuGet Packages: Include… → Logging Configuration: Configure all… → …
  • Tasks that involve MCP servers
  • SKILL.md covers Requirements, Implementation Details, Example Tool Types to Consider and Testing Guidance
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Csharp MCP Server Generator is an agent skill from ILoveDotNet/ilovedotnet. Generate a complete MCP server project in C with tools, prompts, and proper configuration

Its SKILL.md is about 560 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with C#, Model Context Protocol and .NET. The repository describes itself as: I love to teach dotnet concepts in a simple way with real world examples to people who aspire to to be a dotnet developer. I also help developers to refresh their memory with… The licence is CC0-1.0.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/csharp-mcp-server-generator”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 71752c3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Csharp MCP Server Generator loads about 560 tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 255 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~560

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ILoveDotNet/ilovedotnet at commit 71752c3, republished under its CC0-1.0 licence (© ILoveDotNet). 255 words, ~560 tokens.

Download SKILL.mdSave it as .claude/skills/csharp-mcp-server-generator/SKILL.md (or your agent's skills folder).
name
csharp-mcp-server-generator
description
Generate a complete MCP server project in C# with tools, prompts, and proper configuration

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.

© ILoveDotNet, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/csharp-mcp-server-generator of ILoveDotNet/ilovedotnet.

Open the folder on GitHubat commit 71752c3

Compare with similar skills

Csharp MCP Server Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Csharp MCP Server Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Csharp MCP Server Generator this skillILoveDotNet/ilovedotnet155—~560Automated safety check: PassCC0-1.0
MCP Csharpatherio-danp/cde-dotnetcc109—~1.2kAutomated safety check: NotesNone
Dotnet MCP Builderboshi-xixixi/TraeSkill274—~1.7kAutomated safety check: PassMIT
Dotnet MCP Buildergithub/awesome-copilot40k—~2.1kAutomated safety check: PassMIT
MCPmanagedcode/dotnet-skills486—~3.5kAutomated safety check: PassMIT
Agent Frameworkjihadkhawaja/Egroo178—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Csharp

    atherio-danp/cde-dotnetcc

    Create, debug, test, and publish MCP (Model Context Protocol) servers in C using the official ModelContextProtocol SDK — tools/prompts/resources, stdio vs HTTP transport, MapMcp hosting.

    109 GitHub stars~1.2k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check: notes
  • Dotnet MCP Builder

    boshi-xixixi/TraeSkill

    Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 1.x NuGet packages.

    274 GitHub stars~1.7k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • Dotnet MCP Builder

    github/awesome-copilot

    Official

    Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 2.x NuGet packages.

    40k GitHub stars~2.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • MCP

    managedcode/dotnet-skills

    Build or consume Model Context Protocol (MCP) servers and clients in .NET using the official MCP C SDK, including stdio, Streamable HTTP, tools, prompts, resources, and capability negotiation.

    486 GitHub stars~3.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agent Framework

    jihadkhawaja/Egroo

    Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

    178 GitHub stars~1.9k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.

    40k GitHub starsUsed in 7 repos~6.6k tokens
    Backend & APIsAuto-check passed

More from ILoveDotNet/ilovedotnet

  • AI Habit Coach

    ILoveDotNet/ilovedotnet

    Design, monitor, and adapt high-impact personal habits using AI as a structured thinking partner.

    155 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • AI Persuasive Email Writer

    ILoveDotNet/ilovedotnet

    Craft persuasive, goal-driven emails using AI. An agent skill from ILoveDotNet/ilovedotnet.

    155 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • AI Prioritization

    ILoveDotNet/ilovedotnet

    Evaluate, rank, and communicate work priorities using AI as a structured thinking partner.

    155 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Csharp MCP Server Generator

What does Csharp MCP Server Generator do?

Generate a complete MCP server project in C with tools, prompts, and proper configuration. Csharp MCP Server Generator is an agent skill from ILoveDotNet/ilovedotnet.

When should I use Csharp MCP Server Generator?

Csharp MCP Server Generator fits situations like: tasks that involve MCP servers.

How do I install Csharp MCP Server Generator in Claude Code?

Run `npx skills add ILoveDotNet/ilovedotnet --skill csharp-mcp-server-generator -a claude-code`. Or copy the skill folder (.github/skills/csharp-mcp-server-generator in ILoveDotNet/ilovedotnet) into .claude/skills/csharp-mcp-server-generator in your project. Claude Code loads it when a task matches its description.

How do I install Csharp MCP Server Generator in Codex?

Run `npx skills add ILoveDotNet/ilovedotnet --skill csharp-mcp-server-generator -a codex`. Or copy the skill folder (.github/skills/csharp-mcp-server-generator in ILoveDotNet/ilovedotnet) into .agents/skills/csharp-mcp-server-generator in your project. Codex loads it when a task matches its description.

Can I use Csharp MCP Server Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ILoveDotNet/ilovedotnet --skill csharp-mcp-server-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/csharp-mcp-server-generator, .gemini/skills/csharp-mcp-server-generator, .github/skills/csharp-mcp-server-generator and .opencode/skills/csharp-mcp-server-generator in your project.

What does Csharp MCP Server Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Csharp MCP Server Generator is instructions for the agent only.

Does Csharp MCP Server Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Csharp MCP Server Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Csharp MCP Server Generator use?

Csharp MCP Server Generator is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Csharp MCP Server Generator use?

About 560 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Csharp MCP Server Generator?

Skills that share tags, products or a category with Csharp MCP Server Generator: MCP Csharp (atherio-danp/cde-dotnetcc, 109 stars), Dotnet MCP Builder (boshi-xixixi/TraeSkill, 274 stars), Dotnet MCP Builder (github/awesome-copilot, 40k stars) and MCP (managedcode/dotnet-skills, 486 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Csharp MCP Server Generator?

ILoveDotNet (a GitHub organization) maintains it in ILoveDotNet/ilovedotnet, which has 155 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 6, 2026.

Source: ILoveDotNet/ilovedotnet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.