csharp-mcp-server-generator
Skill1 starsChanged 9 months agoMITView on GitHub
Generate a complete MCP server project in C# with tools, prompts, and proper configuration
In this repository28 other files it gives its agents.
- aspireSkill
- brainstormingSkill
- create-github-issue-feature-from-specificationSkill
- create-github-issues-feature-from-implementation-planSkill
- create-implementation-planSkill
- create-specificationSkill
- csharp-asyncSkill
- csharp-docsSkill
- csharp-mstestSkill
- csharp-nunitSkill
- csharp-tunitSkill
- csharp-xunitSkill
- dispatching-parallel-agentsSkill
- dotnet-best-practicesSkill
- dotnet-design-pattern-reviewSkill
- dotnet-upgradeSkill
- editorconfigSkill
- ef-coreSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- skill-creatorSkill
- update-packagesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 9 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create a complete Model Context Protocol (MCP) server in C# with the following specifications:
- Distinctive: line 12
Project Structure: Create a new C# console application with proper directory structure
- Distinctive: line 15
Server Setup: Use the Host builder pattern with proper DI configuration
- Distinctive: line 16
Tools: Create at least one useful tool with proper attributes and descriptions
- Distinctive: line 22
Use .NET 8.0 or later
- Distinctive: line 23
Create a console application
- Very specific: line 24
Add necessary NuGet packages with --prerelease flag
- Very specific: line 28
Use Host.CreateApplicationBuilder for DI and lifecycle management
- Very specific: line 30
Use WithToolsFromAssembly() for automatic tool discovery
- Very specific: line 31
Ensure the server runs with RunAsync()
- Very specific: line 34
Use [McpServerToolType] attribute on tool classes
- Very specific: line 35
Use [McpServerTool] attribute on tool methods
- Very specific: line 36
Add [Description] attributes to tools and parameters
- Distinctive: line 41
Follow C# naming conventions
- Distinctive: line 43
Use nullable reference types
- Distinctive: line 45
Use structured logging for debugging
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
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.CreateApplicationBuilderfor 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

