mcp-csharp-create

Featured

Create MCP servers using the C# SDK and .NET project templates. Covers scaffolding, tool/prompt/resource implementation, and transport configuration for stdio and HTTP. USE FOR: creating new MCP server projects, scaffolding with dotnet new mcpserver, adding MCP tools/prompts/resources, choosing stdio vs HTTP transport, configuring MCP hosting in Program.cs, setting up ASP.NET Core MCP endpoints with MapMcp. DO NOT USE FOR: debugging or running existing servers (use mcp-csharp-debug), writing tests (use mcp-csharp-test), publishing or deploying (use mcp-csharp-publish), building MCP clients, non-.NET MCP servers.

AI & Automation 6,272 stars 499 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# C# MCP Server Creation Create Model Context Protocol servers using the official C# SDK (`ModelContextProtocol` NuGet package) and the `dotnet new mcpserver` project template. Servers expose tools, prompts, and resources that LLMs can discover and invoke via the MCP protocol. ## When to Use - Starting a new MCP server project from scratch - Adding tools, prompts, or resources to an existing MCP server - Choosing between stdio (`--transport local`) and HTTP (`--transport remote`) transport - Setting up ASP.NET Core hosting for an HTTP MCP server - Wrapping an external API or service as MCP tools ## Stop Signals - **Server already exists and needs debugging?** → Use `mcp-csharp-debug` - **Need tests or evaluations?** → Use `mcp-csharp-test` - **Ready to publish?** → Use `mcp-csharp-publish` - **Building an MCP client, not a server** → This skill is server-side only ## Inputs | Input | Required | Description | |-------|----------|-------------| | Transport type | Yes | `stdio` (local/CLI) or `http` (remote/web). Ask user if not specified — default to stdio | | Project name | Yes | PascalCase name for the project (e.g., `WeatherMcpServer`) | | .NET SDK version | Recommended | .NET 10.0+ required. Check with `dotnet --version` | | Service/API to wrap | Recommended | External API or service the tools will interact with | ## Workflow > **Commit strategy:** Commit after completing each step so scaffolding and implementation are separately reviewable. ### Step 1: Verify pre...

Details

Author
dotnet
Repository
dotnet/skills
Created
9 months ago
Last Updated
today
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

mcp-csharp-debug

Run and debug C# MCP servers locally. Covers IDE configuration, MCP Inspector testing, GitHub Copilot Agent Mode integration, logging setup, and troubleshooting. USE FOR: running MCP servers locally with dotnet run, configuring VS Code or Visual Studio for MCP debugging, testing tools with MCP Inspector, testing with GitHub Copilot Agent Mode, diagnosing tool registration issues, setting up mcp.json configuration, debugging MCP protocol messages, configuring logging for stdio and HTTP servers. DO NOT USE FOR: creating new MCP servers (use mcp-csharp-create), writing automated tests (use mcp-csharp-test), publishing or deploying to production (use mcp-csharp-publish).

6,272 Updated today
dotnet
AI & Automation Featured

csharp-mcp-server-generator

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

41,313 Updated today
github
AI & Automation Featured

mcp

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. USE FOR: .NET MCP servers or clients; stdio versus HTTP transport choices; tools, resources, prompts, completions, and capability negotiation. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

519 Updated 4 days ago
managedcode