Skip to content

Add skills for C# MCP Server Development#317

Open
leslierichardson95 wants to merge 35 commits intodotnet:mainfrom
leslierichardson95:lerich/mcp-skills
Open

Add skills for C# MCP Server Development#317
leslierichardson95 wants to merge 35 commits intodotnet:mainfrom
leslierichardson95:lerich/mcp-skills

Conversation

@leslierichardson95
Copy link
Contributor

This pull request introduces comprehensive documentation for creating MCP servers (creating, debugging, testing, publishing) using the C# SDK and .NET project templates. These documents provide step-by-step instructions, attribute references, implementation patterns, and advanced configuration guidance for developers building, debugging, testing, and publishing MCP server projects.

Reference documentation for implementation and configuration:

  • Added references/api-patterns.md, detailing attribute usage, tool return types, dependency injection, builder API, dynamic tool creation, server options, experimental APIs, and NuGet package selection.
  • Added references/transport-config.md, covering stdio and HTTP transport setup, custom path prefixes, stateless mode, authentication/authorization, accessing HTTP context, OAuth flows, idle timeout, port configuration, and OpenTelemetry observability.

All skills successfully passed skills-validator testing.

Four new skills for the C# MCP server development lifecycle:
- mcp-csharp-create: Scaffolding with dotnet new mcpserver, tools/prompts/resources, transport config
- mcp-csharp-debug: MCP Inspector, VS Code integration, breakpoint debugging, logging
- mcp-csharp-test: Unit tests with ClientServerTestBase, integration with WebApplicationFactory, evals
- mcp-csharp-publish: NuGet packaging, Docker/Azure deployment, MCP Registry publishing

Each skill includes SKILL.md with progressive disclosure references/ and eval.yaml tests.
…te syntax

Replace scaffolding-heavy scenarios with implementation-focused ones that
test MCP-specific features (resources, prompts, logging). Fix assertion
patterns to match combined C# attribute syntax [McpServerTool, Description()]
instead of requiring standalone [McpServerTool]. Increase timeouts to 180s
to account for skill-reading overhead.

Validator result: passed=True, improvement=44.6% (threshold=10%)
Copilot AI review requested due to automatic review settings March 10, 2026 18:56
Copy link
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 set of new .NET skill documents (create/debug/test/publish) for building MCP servers with the C# SDK, along with corresponding eval scenarios under tests/dotnet/ to validate the skills via skill-validator.

Changes:

  • Added four new MCP C# skills: creation, debugging, testing, and publishing/deployment.
  • Added reference guides covering SDK API patterns, transport configuration, testing patterns, and publishing/registry workflows.
  • Added eval scenarios for each new skill under tests/dotnet/.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/dotnet/mcp-csharp-create/eval.yaml Adds eval scenarios for MCP server scaffolding, attributes/DI, and HTTP setup.
tests/dotnet/mcp-csharp-debug/eval.yaml Adds eval scenarios for Inspector usage and IDE/Copilot configuration.
tests/dotnet/mcp-csharp-test/eval.yaml Adds eval scenarios for unit/integration testing and evaluation authoring.
tests/dotnet/mcp-csharp-publish/eval.yaml Adds eval scenarios for NuGet tool publishing, Azure deployment, and registry publishing.
plugins/dotnet/skills/mcp-csharp-create/SKILL.md New skill doc for creating MCP servers with C# SDK and templates.
plugins/dotnet/skills/mcp-csharp-create/references/api-patterns.md Reference for C# MCP SDK attributes, return types, DI, and builder patterns.
plugins/dotnet/skills/mcp-csharp-create/references/transport-config.md Reference for stdio/HTTP transport configuration, auth, and observability.
plugins/dotnet/skills/mcp-csharp-debug/SKILL.md New skill doc for running/debugging MCP servers and configuring IDEs.
plugins/dotnet/skills/mcp-csharp-debug/references/ide-config.md Detailed VS Code/Visual Studio MCP + debugger configuration examples.
plugins/dotnet/skills/mcp-csharp-debug/references/mcp-inspector.md Reference for using MCP Inspector across stdio/HTTP scenarios.
plugins/dotnet/skills/mcp-csharp-test/SKILL.md New skill doc for unit/integration testing and evaluations for MCP servers.
plugins/dotnet/skills/mcp-csharp-test/references/test-patterns.md Reference test patterns (in-memory, WebApplicationFactory, mocking).
plugins/dotnet/skills/mcp-csharp-test/references/evaluation-guide.md Reference guidance for creating deterministic, verifiable eval sets.
plugins/dotnet/skills/mcp-csharp-publish/SKILL.md New skill doc for packaging, Docker/Azure deployment, and registry publishing.
plugins/dotnet/skills/mcp-csharp-publish/references/nuget-packaging.md Reference for .csproj tool packaging and NuGet publishing flow.
plugins/dotnet/skills/mcp-csharp-publish/references/docker-azure.md Reference for Docker + Azure deployment commands and secret handling.
plugins/dotnet/skills/mcp-csharp-publish/references/mcp-registry.md Reference for server.json and mcp-publisher workflow/CI guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 19:02
leslierichardson95 and others added 2 commits March 10, 2026 12:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…aging.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 19:10
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 19:16
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 10, 2026 19:47
Copy link
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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
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

Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 20:17
Copy link
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

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 20, 2026 20:34
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The URL regex truncates at angle brackets (invalid in URIs), so
placeholder URLs like https://github.com/<yourusername>/<repo>
become https://github.com/ which didn't match any path-scoped entry.
Adding github.com/ (with trailing slash) covers only this case without
broadly allowing all github.com URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danmoseley
Copy link
Member

"Reference Validation / Scan external references (pull_request)" is now green.

Copilot AI review requested due to automatic review settings March 20, 2026 22:36
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 23, 2026 20:17
Copy link
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

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

Left one minor comment on one of the evals.

McpServerToolType is only needed with WithToolsFromAssembly(), which is
discouraged because it is not Native AOT compatible. Updated eval assertions
and rubrics to prefer WithTools<T>() instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants