mcp-csharp-create

仓库创建 2026年2月4日最近提交 18 小时前SkillHot 收录 20 天前
▸ 精选理由

一键搭建可被 Agent 发现与调用的 MCP 服务项目,适合服务开发者。

▸ 风险提示

会生成并引入项目依赖或模版代码,注意依赖来源和许可。

这个 Skill 做什么

使用 C# SDK 和模板快速生成 Model Context Protocol(MCP)服务器项目。

用官方 C# SDK 和模板快速生成 MCP 服务器骨架(dotnet new mcpserver),方便添加 tools、prompts、resources,并选择 stdio 或 HTTP 传输方式。适合从零开始创建 MCP 服务或给现有项目接入 MCP 时用,包含 Program.cs 的 hosting 和 ASP.NET Core 的 MapMcp 配置示例。优点是把协议细节和样板代码封装好,让你专注实现业务逻辑。

▸ 展开 SKILL.md 英文原文

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: writing tests (use mcp-csharp-test), publishing or deploying (use mcp-csharp-publish), building MCP clients, non-.NET MCP servers.

开发编程MCPC#脚手架通用
4.8k
Stars
351
Forks
40
仓库内 Skill
+610
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-ai/skills/mcp-csharp-create/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/dotnet/skills/main/plugins/dotnet-ai/skills/mcp-csharp-create/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# 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

- **Need tests or evaluations?** → Use `mcp-csharp-test`
- **Ready to publis
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有