Skip to content

feat(skills): add dotnet-mcp-builder, deprecate csharp-mcp-server-gen…#1645

Open
AClerbois wants to merge 1 commit intogithub:stagedfrom
AClerbois:skill/dotnet-mcp-builder
Open

feat(skills): add dotnet-mcp-builder, deprecate csharp-mcp-server-gen…#1645
AClerbois wants to merge 1 commit intogithub:stagedfrom
AClerbois:skill/dotnet-mcp-builder

Conversation

@AClerbois
Copy link
Copy Markdown
Contributor

What

Adds dotnet-mcp-builder, a skill for building MCP (Model Context Protocol)
servers in C#/.NET against the official ModelContextProtocol 1.x NuGet packages.

Why

There's already csharp-mcp-server-generator, but it's a 60-line high-level
prompt that references the prerelease packages and only covers the STDIO
"hello world" path. This skill is broader and current with the spec:

  • Both transports — STDIO and Streamable HTTP (SSE is deprecated)
  • Every primitive in the 2025-11-25 spec: tools, prompts, resources,
    elicitation (form + URL mode), sampling, roots, completions, logging
  • MCP Apps (interactive UI rendered in the host)
  • Basic MCP client in .NET + testing patterns (MCP Inspector + in-memory transport)
  • Steers the model to stable 1.x (it tends to pin 0.3/0.4-preview by default)
  • Enforces the STDIO stdout/stderr trap

Layout

  • SKILL.md — workflow, decision tree, cardinal rules (~85 lines)
  • references/ — 13 topic-specific deep-dive docs loaded only when needed

Validation

  • npm run skill:validate
  • npm run build ✅ (auto-updated docs/README.skills.md)
  • Branch based on staged per CONTRIBUTING.md

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the staged branch for this pull request.

Description

This pull request deprecates the csharp-mcp-server-generator skill in favor of a new, more comprehensive dotnet-mcp-builder skill for building Model Context Protocol (MCP) servers in .NET. It updates documentation to reflect this change, introduces the new skill and its references, and provides guidance for users to transition. The main focus is on steering users to use the up-to-date, feature-complete approach for MCP server and client development in .NET.

Skill deprecation and replacement:

  • Marked the csharp-mcp-server-generator skill as deprecated in both docs/README.skills.md and its own SKILL.md, with clear guidance to use dotnet-mcp-builder instead. The new description explains that dotnet-mcp-builder targets current ModelContextProtocol 1.x packages, covers all MCP primitives and both major transports, and is a strict superset of the old skill. [1] [2]

  • Added a new entry for dotnet-mcp-builder in docs/README.skills.md, detailing its capabilities and listing relevant reference documents for different MCP server features and scenarios.

New skill and reference documentation:

  • Introduced skills/dotnet-mcp-builder/SKILL.md, providing comprehensive guidance for building production-quality MCP servers and clients in C#/.NET, including best practices, decision trees for reference material, and troubleshooting tips.

  • Added a detailed reference, skills/dotnet-mcp-builder/references/client.md, showing how to consume MCP servers from .NET clients, including package setup, transport configuration, tool invocation, and handling advanced server-to-client features.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify):


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings May 7, 2026 13:35
@AClerbois AClerbois requested a review from aaronpowell as a code owner May 7, 2026 13:35
@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills skill-check-error Skill validator reported errors skill-check-warning Skill validator reported warnings labels May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🔍 Skill Validator Results

✅ All checks passed

Scope Checked
Skills 2
Agents 1
Total 3
Severity Count
--- ---:
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ Found 2 skill(s)
ℹ️ [csharp-mcp-server-generator] 📊 csharp-mcp-server-generator: 401 BPE tokens [chars/4: 444] (detailed ✓), 2 sections, 2 code blocks
ℹ️ [dotnet-mcp-builder] 📊 dotnet-mcp-builder: 1,639 BPE tokens [chars/4: 1,721] (detailed ✓), 7 sections, 1 code blocks
ℹ️ ✅ All checks passed (2 skill(s))
Full validator output ```text Found 2 skill(s) [csharp-mcp-server-generator] 📊 csharp-mcp-server-generator: 401 BPE tokens [chars/4: 444] (detailed ✓), 2 sections, 2 code blocks [dotnet-mcp-builder] 📊 dotnet-mcp-builder: 1,639 BPE tokens [chars/4: 1,721] (detailed ✓), 7 sections, 1 code blocks ✅ All checks passed (2 skill(s)) ```

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new .NET-focused MCP skill (dotnet-mcp-builder) with on-demand reference docs, and deprecates the older csharp-mcp-server-generator skill in favor of the newer guidance. Updates the skills index to expose the new skill and mark the old one as deprecated.

Changes:

  • Added dotnet-mcp-builder skill with a decision tree + “cardinal rules” for .NET MCP server/client work.
  • Added 13 reference documents covering transports, primitives, advanced features (elicitation/sampling/roots/apps), and testing.
  • Deprecated csharp-mcp-server-generator and updated docs/README.skills.md accordingly.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
skills/dotnet-mcp-builder/SKILL.md New skill overview + decision tree and rules for .NET MCP development
skills/dotnet-mcp-builder/references/packages.md Package/TFM guidance for ModelContextProtocol 1.x
skills/dotnet-mcp-builder/references/transport-stdio.md STDIO transport setup + stdout/stderr trap guidance
skills/dotnet-mcp-builder/references/transport-http.md Streamable HTTP transport setup + deployment/auth notes
skills/dotnet-mcp-builder/references/tool-primitive.md Tool authoring patterns, return types, and error guidance
skills/dotnet-mcp-builder/references/prompt-primitive.md Prompt authoring patterns and return types
skills/dotnet-mcp-builder/references/resource-primitive.md Resource authoring patterns, templates, and subscriptions
skills/dotnet-mcp-builder/references/elicitation.md Elicitation form + URL mode guidance and examples
skills/dotnet-mcp-builder/references/sampling.md Sampling guidance and IChatClient adapter pattern
skills/dotnet-mcp-builder/references/roots.md Roots capability usage + caching + path validation pattern
skills/dotnet-mcp-builder/references/server-features.md Smaller server features (completions/logging/progress/filters)
skills/dotnet-mcp-builder/references/testing.md Inspector + in-memory transport testing patterns
skills/dotnet-mcp-builder/references/mcp-apps.md MCP Apps overview + manual implementation pattern for C#
skills/dotnet-mcp-builder/references/client.md .NET client reference for consuming MCP servers
skills/csharp-mcp-server-generator/SKILL.md Replaced prior content with deprecation notice and migration pointer
docs/README.skills.md Added dotnet-mcp-builder entry; marked old skill as deprecated

Comment thread skills/dotnet-mcp-builder/references/transport-http.md
Comment thread skills/dotnet-mcp-builder/references/resource-primitive.md
Comment thread skills/dotnet-mcp-builder/references/roots.md
Comment thread skills/dotnet-mcp-builder/references/testing.md
…erator

Adds a comprehensive skill for building MCP (Model Context Protocol)
servers in C#/.NET against the official ModelContextProtocol 1.x NuGet
packages. Covers both transports (STDIO, Streamable HTTP — SSE is
deprecated) and every primitive in the current MCP spec (2025-11-25):
tools, prompts, resources, elicitation (form + URL mode), sampling,
roots, completions, logging, and MCP Apps. Includes a thin .NET MCP
client reference and testing guidance (MCP Inspector + in-memory
transport for unit tests).

Steers the model toward the current stable 1.x packages instead of the
0.x previews it tends to pin by default, and enforces the STDIO
stdout/stderr trap.

Also deprecates the existing csharp-mcp-server-generator skill, which
predates ModelContextProtocol 1.0 and only covered a subset of the
current spec. Its SKILL.md now redirects users to dotnet-mcp-builder so
existing install URLs keep working without surprises.
@AClerbois AClerbois force-pushed the skill/dotnet-mcp-builder branch from 687c1df to aaafd7f Compare May 7, 2026 14:49
@github-actions github-actions Bot removed skill-check-error Skill validator reported errors skill-check-warning Skill validator reported warnings labels May 7, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just delete it - the new one is obviously an improvement and I'll be honest, we'll probably never remember to remove this one if we just deprecate it 🤣

Comment on lines +214 to +215
- **CSP too tight or too loose.** If your UI loads from a CDN, declare it in `_meta.ui.csp`. Otherwise the iframe sandbox blocks it.
- **Forgetting the `_meta` on the tool.** Without it, the host treats your tool as a regular text-returning tool. The UI never appears.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use the .NET types here rather than the _meta properties it serialises down to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-submission PR adds at least one new contribution skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants