Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
github avatar

Dotnet Mcp Builder

  • 1 installs
  • 37.5k repo stars
  • Updated August 5, 2026
  • github/awesome-copilot

dotnet-mcp-builder skill documents Build Model Context Protocol (MCP) servers in C#/.

About

dotnet-mcp-builder skill documents Build Model Context Protocol (MCP) servers in C#/.NET against the current ModelContextProtocol 1.x NuGet packages. Especially helps with cases the model often gets wrong without guidance - stale preview versions (it tends to pick 0.3 or 0.4 preview), MCP Apps (interactive UI rendered in the host), e. name: dotnet-mcp-builder description: 'Build Model Context Protocol (MCP) servers in C#/.NET against the current ModelContextProtocol 1.x NuGet packages. Especially helps with cases the model often gets wrong without guidance - stale preview versions (it tends to pick 0.3 or 0.4 preview), MCP Apps (interactive UI rendered in the host), elicitation URL mode, per-session HTTP wiring, OAuth and rever

  • Build Model Context Protocol (MCP) servers in C#/.
  • Platform-specific setup patterns for dotnet-mcp-builder.
  • Evidence-backed steps from upstream SKILL.md.
  • When-to-use criteria for dotnet-mcp-builder versus alternatives.

Dotnet Mcp Builder by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,980 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

dotnet-mcp-builder capabilities & compatibility

Capabilities
dotnet mcp builder quick start · dotnet mcp builder when to use guidance · dotnet mcp builder integration patterns
From the docs

What dotnet-mcp-builder says it does

The .NET MCP SDK had years of preview packages (`0.x-preview`) before reaching `1.0`. Without help, the model tends to:
SKILL.md
Pin a stale preview version that won't compile against current samples.
SKILL.md
npx skills add https://github.com/github/awesome-copilot --skill dotnet-mcp-builder

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars37.5k
Last updatedAugust 5, 2026
Repositorygithub/awesome-copilot

How do I use dotnet-mcp-builder correctly?

Build Model Context Protocol (MCP) servers in C#/.NET against the current ModelContextProtocol 1.x NuGet packages. Especially helps with cases the model often gets wrong without guidance - stale previ

Who is it for?

Teams implementing dotnet-mcp-builder workflows from the catalog.

Skip if: Skip when requirements clearly match a different specialized stack.

When should I use this skill?

User asks about dotnet-mcp-builder, build model context protocol (mcp) servers in c#/.net against the current modelcontextprot.

What you get

Working dotnet-mcp-builder setup with validated configuration and next steps.

Files

SKILL.mdMarkdownGitHub ↗

Building MCP servers in .NET

This skill helps you write production-quality MCP servers and basic clients in C#/.NET against the official `ModelContextProtocol` NuGet packages, maintained by Microsoft and the MCP project. It targets the stable 1.x line and the current spec (2025-11-25).

When this skill earns its keep

The .NET MCP SDK had years of preview packages (0.x-preview) before reaching 1.0. Without help, the model tends to:

  • Pin a stale preview version that won't compile against current samples.
  • Miss recent spec features (elicitation URL mode, MCP Apps, structured content blocks).
  • Get HTTP transport details wrong (stateful/stateless, proxy buffering, OAuth wiring).
  • Forget the STDIO stdout/stderr trap.

If the task is one of those, load the matching reference and follow it. If it's truly trivial (e.g. "rename this tool method"), you don't need to read everything — the cardinal rules below are the minimum.

Mental model in 30 seconds

A .NET MCP server is an ordinary Microsoft.Extensions.Hosting (or WebApplication) app that wires an MCP server through DI:

builder.Services
    .AddMcpServer()
    .WithStdioServerTransport()      // OR .WithHttpTransport(...)
    .WithToolsFromAssembly()         // discover [McpServerToolType] classes
    .WithPrompts<MyPrompts>()        // optional
    .WithResources<MyResources>();   // optional

Primitives are plain C# methods on classes marked with attributes ([McpServerToolType] + [McpServerTool], [McpServerPromptType] + [McpServerPrompt], [McpServerResourceType] + [McpServerResource]). Parameters bind from JSON-RPC; the SDK builds the JSON Schema from the signature plus [Description] attributes.

Server-to-client features (sampling, elicitation, roots, log/progress notifications) are methods on the injected IMcpServer.

Decision tree → which references to load

Always load references/packages.md if you're creating a new project or unsure of the current package version.

TaskLoad
New STDIO serverreferences/transport-stdio.md
New HTTP (Streamable) serverreferences/transport-http.md
Add/modify a toolreferences/tool-primitive.md
Add/modify a promptreferences/prompt-primitive.md
Add/modify a resourcereferences/resource-primitive.md
Ask the user a question mid-toolreferences/elicitation.md
Call the client's LLM from a toolreferences/sampling.md
Read the user's project rootsreferences/roots.md
Return an interactive UIreferences/mcp-apps.md
Argument completions, log/progress notifications, filters, server instructionsreferences/server-features.md
Write a .NET program that consumes an MCP serverreferences/client.md
MCP Inspector, in-memory tests, mocks, CIreferences/testing.md

For multi-primitive tasks, load several at once. For trivial edits in an existing file, you usually don't need any.

Cardinal rules (apply always; these prevent the highest-frequency breakages)

1. Pin the current stable package, not a preview. Use ModelContextProtocol / ModelContextProtocol.AspNetCore / ModelContextProtocol.Core at the latest 1.x. If you find yourself writing 0.3-preview or 0.4-preview, stop and check NuGet — preview APIs have breaking differences. 2. STDIO servers must not write to stdout. Stdout is the JSON-RPC channel. Configure LogToStandardErrorThreshold = LogLevel.Trace before anything else and never Console.WriteLine from a tool. 3. HTTP defaults to stateful. For horizontally-scaled deployments without server-initiated traffic, set options.Stateless = true. Server-to-client features (sampling, elicitation, roots, unsolicited notifications) require stateful HTTP or STDIO — Stateless = true will break them at runtime. 4. SSE-only is deprecated. Use Streamable HTTP. Only enable legacy SSE (EnableLegacySse = true) for an old client you must support, and call it out. 5. Always `[Description]` tools and parameters. This is what the LLM sees when picking and shaping calls. Vague descriptions are the #1 reason tools don't get used. 6. Show the registration line every time you add a primitive. A new [McpServerPromptType] class without .WithPrompts<...>() (or .WithPromptsFromAssembly()) is invisible. 7. Don't invent APIs. If you're unsure a method exists, say so and check the API reference — wrong method names cause silent failures.

Working style

  • Make minimal, additive changes. Add a method to the existing tool class rather than restructuring the project.
  • For non-trivial setups, run `dotnet build`. Catches missing usings, attribute typos, and TFM mismatches before the user sees them.
  • Confirm transport + .NET version + primitives before scaffolding if context doesn't already make them obvious. Default to .NET 10 for new projects.

When the user is stuck

Walk this checklist before guessing: 1. STDIO: something is writing to stdout (logger sink, Console.WriteLine, library banner). 2. HTTP 404: path mismatch — app.MapMcp() is root, app.MapMcp("/mcp") puts it under /mcp. 3. Tool not appearing: missing [McpServerToolType] on the class, or no .WithToolsFromAssembly() / .WithTools<T>() registered. 4. Args not bound: parameter names must match the JSON-RPC arguments keys; complex types bind via System.Text.Json. 5. Sampling/elicitation/roots failing: transport is stateless HTTP, or the client doesn't advertise the capability.

Still stuck? Point the user at the `EverythingServer` sample — it exercises every feature.

Related skills

FAQ

What does dotnet-mcp-builder do?

dotnet-mcp-builder skill documents Build Model Context Protocol (MCP) servers in C#/.

When should I use dotnet-mcp-builder?

User asks about dotnet-mcp-builder, build model context protocol (mcp) servers in c#/.net against the current modelcontextprot.

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.