本文へ移動
cccskills
無料GitHub で公開

dotnet-mcp

Load when creating, scaffolding, configuring, debugging, testing, containerizing, or publishing a C#/.NET Model Context Protocol (MCP) server using the official Microsoft ModelContextProtocol SDK; not for non-.NET MCP servers, general ASP.NET Core APIs without MCP, or consuming external MCP tools as a client.

インストール方法を見る

含まれるファイル(15)

  • SKILL.md5.4 KB
  • resources/api-patterns.md5.5 KB
  • resources/debugging-and-inspector.md3.9 KB
  • resources/docker-azure.md4.8 KB
  • resources/evaluations.md2.8 KB
  • resources/ide-config.md4.6 KB
  • resources/index.md2.8 KB
  • resources/mcp-inspector.md2.5 KB
  • resources/mcp-registry.md3.9 KB
  • resources/nuget-packaging.md4.3 KB
  • resources/publishing-and-deployment.md4.7 KB
  • resources/server-scaffolding.md3.8 KB
  • resources/test-patterns.md3.6 KB
  • resources/testing-and-evaluations.md4.9 KB
  • resources/transport-config.md3.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- ABOUTME: Master router and invariant guardian for C#/.NET Model Context Protocol (MCP) server engineering. --> <!-- ABOUTME: Enforces transport selection, stdio protocol safety, tool contracts, and progressive resource disclosure. -->

.NET Model Context Protocol (MCP) Engineering

A unified skill for building, debugging, testing, and publishing C# Model Context Protocol (MCP) servers using Microsoft's official ModelContextProtocol SDK.

Resources

  • Resource Index — Load to locate the exact lifecycle guide, API specification, or deployment recipe needed.
  • Server Scaffolding & Configuration — Load when creating projects, selecting transports, configuring Program.cs, or implementing tools.
  • Debugging & Inspector — Load when running servers locally, troubleshooting stdout pollution, using MCP Inspector, or setting up IDE clients.
  • Testing & Evaluations — Load when authoring tool unit tests, McpClient integration fixtures, or LLM evaluation suites.
  • Publishing & Deployment — Load when packaging as a NuGet tool, building chiseled Docker images, or publishing to the MCP Registry.

Rules

  1. Official SDK & Target: Require .NET 10+ and use the official Microsoft ModelContextProtocol or ModelContextProtocol.AspNetCore package.
  2. Transport Hierarchy: Default to stdio for local command-line tools, desktop assistants, and IDE subprocesses. Use Streamable HTTP (MapMcp) for remote, multi-client, or containerized deployments.
  3. stdio stdout Safety Invariant: In stdio servers, standard output is strictly reserved for JSON-RPC messages. Any application logging to stdout corrupts protocol framing and causes client connections to hang. All console logging and diagnostics must be directed to stderr (LogToStandardErrorThreshold = LogLevel.Trace).
  4. Tool Contract: Tool classes must carry [McpServerToolType]; exposed methods must carry [McpServerTool]. Both methods and parameters require descriptive [Description] attributes to guide AI model tool selection. Asynchronous tools must accept and propagate a CancellationToken.
  5. Dependency Injection: Inject external clients, database contexts, and services via DI into constructors or tool methods. Never instantiate network clients or infrastructure directly inside tool methods.
  6. Inspector-First Verification: Always verify protocol correctness and tool discovery using the MCP Inspector (npx @modelcontextprotocol/inspector) before debugging consuming IDE clients.
  7. Testing Discipline: Tool logic should be verified with direct unit tests (mocking HttpMessageHandler or domain services). Protocol behavior must be verified via integration tests using McpClient asserting both ListToolsAsync() and CallToolAsync().
  8. Secrets & Packaging Safety: Never bake API keys, connection strings, or .env files into NuGet packages, Docker images, or server.json.

Task Routing

User Intent / TaskPrimary Lifecycle GuideDeep Reference
Scaffold new MCP server, choose transport, configure DIserver-scaffolding.mdtransport-config.md, api-patterns.md
Author complex tools, prompts, resources, or Native AOTserver-scaffolding.mdapi-patterns.md
Run locally, debug protocol, use MCP Inspectordebugging-and-inspector.mdmcp-inspector.md
Configure client IDEs (VS Code, Visual Studio, Copilot)debugging-and-inspector.mdide-config.md
Write unit or protocol integration teststesting-and-evaluations.mdtest-patterns.md
Create LLM tool quality evaluationstesting-and-evaluations.mdevaluations.md
Package as global .NET tool (dotnet pack)publishing-and-deployment.mdnuget-packaging.md
Build Docker container or deploy to Azure Container Appspublishing-and-deployment.mddocker-azure.md
Publish listing to the official MCP Registrypublishing-and-deployment.mdmcp-registry.md

Verification

  • Compilation: dotnet build --configuration Release
  • Protocol Inspection: npx @modelcontextprotocol/inspector dotnet run --project <Server.csproj>
  • Automated Tests: dotnet test --project <Server.Tests.csproj> --configuration Release
  • Clean stdout: Confirm that stdio servers print zero non-JSON-RPC lines to stdout during execution.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Load for Blazor/MudBlazor UI changes involving forms, dialogs, focus, keyboard navigation, landmarks, ARIA, color contrast, RTL-safe styling, or WCAG 2.2 AA tests; not for backend-only changes.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

Load when a task asks to research, verify, compare, or look up framework/package behavior, release notes, standards, RFCs, CVEs, or unfamiliar APIs; use repository evidence first, then official docs, and not for codebase navigation alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

aspire

無料

Load for Aspire AppHost work: start/stop/wait resources, inspect dashboard/logs/traces, add integrations/resources, rebuild a service, run isolated worktrees, or diagnose Aspire orchestration; not for plain dotnet apps, container-only deployments, or cloud deployment.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

Load for authentication or authorization changes involving BFF cookies/tokens, JWT validation, claims/user ID extraction, policies, handler access checks, impersonation, or 401/403 bugs; not for UI affordance gating alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

Load for Blazor BFF server work involving YARP proxy routes, cookie sessions, access-token forwarding/refresh, downstream API calls, BFF handlers, or browser-to-API auth failures; not for client component rendering or API JWT validation alone.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

Load when editing Blazor `.razor.css`, scoped selectors, `::deep`, BEM class names, RTL/logical CSS properties, or styling nested MudBlazor components; not for global design tokens or non-Blazor CSS.

日本語の概要は準備中です。原文の説明を表示しています。

islamu-ngo/Event82026年10月8日 更新

islamu-ngo のスキルをすべて見る

このスキルの問題を報告する