Official agent skill

Dotnet MCP Builder

by github in github/awesome-copilot

Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 2.x NuGet packages.

OfficialMITAuto-check passedAgent Workflows

Install Dotnet MCP Builder

skills CLI
$ npx skills add github/awesome-copilot --skill dotnet-mcp-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot dotnet-mcp-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dotnet-mcp-builder .claude/skills/dotnet-mcp-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dotnet-mcp-builder
GitHub stars
40k
Token cost
~2.1k tokens
SKILL.md length
887 words
Files
14 (incl. references)
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 2.x NuGet packages.

  • Works in 8 steps: Pin the current stable package, not a… → STDIO servers must not write to stdout.… → HTTP defaults to stateless in 2.x (v1.x… → …
  • Implies any .NET MCP server work: ModelContextProtocol
  • SKILL.md covers When this skill earns its keep, Mental model in 30 seconds, Decision tree → which… and Cardinal rules (apply always;…, plus 2 more sections
  • Calls dotnet

What it does

Dotnet MCP Builder is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 2.x NuGet packages. Helps with cases the model gets wrong without guidance — stale versions (0.x preview or 1.x-era defaults), the v2 stateless-by-default HTTP flip, the 2026-07-28 spec deprecations (roots/sampling/logging), MCP Apps and Tasks extension packages, elicitation URL mode, per-session HTTP wiring, OAuth and reverse-proxy deploy specifics, and debugging MapMcp / STDIO / Streamable-HTTP errors. Also covers…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including reference files (for example `references/client.md`, `references/elicitation.md` and `references/mcp-apps.md`).

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol, .NET and C#. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Implies any .NET MCP server work: ModelContextProtocol
  • WithStdioServerTransport
  • MCP server in C
  • MCP tool in dotnet

Example prompts

  • “MCP server in C”
  • “MCP tool in dotnet”
  • “expose this as MCP”
  • “/dotnet-mcp-builder”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Pin the current stable package, not a preview. Use ModelContextProtocol / ModelContextProtocol.AspNetCore / ModelContextProtocol.Core at…
  2. STDIO servers must not write to stdout. Stdout is the JSON-RPC channel. Configure LogToStandardErrorThreshold = LogLevel.Trace before…
  3. HTTP defaults to stateless in 2.x (v1.x defaulted to stateful — the single most impactful v2 breaking change). The 2026-07-28 revision has…
  4. SSE-only is deprecated. Use Streamable HTTP. Only enable legacy SSE (EnableLegacySse = true) for an old client you must support, and call…
  5. Don't design new servers around deprecated capabilities. The 2026-07-28 spec deprecates roots, sampling, and MCP-channel logging; the SDK…
  6. Always [Description] tools and parameters. This is what the LLM sees when picking and shaping calls. Vague descriptions are the #1 reason…
  7. Show the registration line every time you add a primitive. A new [McpServerPromptType] class without .WithPrompts<...>() (or…
  8. Don't invent APIs. If you're unsure a method exists, say so and check the API reference — wrong method names cause silent failures. This…

What it can do on your machine

Read from SKILL.md and the folder at commit 7cce7cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • nuget.org
    • csharp.sdk.modelcontextprotocol.io
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dotnet MCP Builder loads about 2.1k tokens when it runs, and up to ~24k if it reads all its reference files. Until then it costs about 244 tokens; SKILL.md has 887 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~244
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~24k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 7cce7cf, republished under its MIT licence (© github). 887 words, ~2,148 tokens.

Download SKILL.mdSave it as .claude/skills/dotnet-mcp-builder/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.
name
dotnet-mcp-builder
description
Build Model Context Protocol (MCP) servers in C#/.NET against the current ModelContextProtocol 2.x NuGet packages. Helps with cases the model gets wrong without guidance — stale versions (0.x preview or 1.x-era defaults), the v2 stateless-by-default HTTP flip, the 2026-07-28 spec deprecations (roots/sampling/logging), MCP Apps and Tasks extension packages, elicitation URL mode, per-session HTTP wiring, OAuth and reverse-proxy deploy specifics, and debugging MapMcp / STDIO / Streamable-HTTP errors. Also covers STDIO and Streamable HTTP transports (SSE is deprecated), tools, prompts, resources, completions, and a basic .NET MCP client. Trigger when the user says or implies any .NET MCP server work: ModelContextProtocol, McpServerTool, MapMcp, WithStdioServerTransport, "MCP server in C#", "MCP tool in dotnet", "expose this as MCP", or names a primitive (prompt/resource/elicitation/MCP App) in a .NET context. Skip for MCP work in other languages.

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 2.x line and the current spec (2026-07-28).

When this skill earns its keep

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

  • Pin a stale preview version that won't compile against current samples.
  • Apply 1.x-era defaults that v2 reversed (HTTP was stateful by default; in 2.x Stateless defaults to true).
  • Recommend capabilities the 2026-07-28 spec deprecates (roots, sampling, MCP-channel logging — now [Obsolete], warning MCP9005).
  • Miss recent spec features (multi-round-trip input_required, discovery-first negotiation, MCP Apps/Tasks extension packages, elicitation URL mode, 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:

csharp
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 (elicitation, progress notifications, and the now-deprecated sampling/roots/log 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 tool (deprecated in 2026-07-28)references/sampling.md
Read the user's project roots (deprecated in 2026-07-28)references/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 2.x. If you find yourself writing 0.3-preview or 0.4-preview, stop and check NuGet — preview APIs have breaking differences. 1.x still works but predates the 2026-07-28 spec.
  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 stateless in 2.x (v1.x defaulted to stateful — the single most impactful v2 breaking change). The 2026-07-28 revision has no HTTP sessions at all: setting Stateless = false makes the server refuse that revision and serve clients via the legacy initialize fallback. For "ask the user something mid-tool" on current-protocol HTTP, use the multi-round-trip InputRequiredException pattern; reserve stateful HTTP (or STDIO) for the legacy ElicitAsync/sampling/roots paths and pushed notifications.
  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. Don't design new servers around deprecated capabilities. The 2026-07-28 spec deprecates roots, sampling, and MCP-channel logging; the SDK marks them [Obsolete] (warning MCP9005). They still work against down-level clients, but for new designs prefer the multi-round-trip input_required pattern and ILogger logging. Suppress MCP9005 only as a documented transition measure.
  6. 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.
  7. Show the registration line every time you add a primitive. A new [McpServerPromptType] class without .WithPrompts<...>() (or .WithPromptsFromAssembly()) is invisible.
  8. Don't invent APIs. If you're unsure a method exists, say so and check the API reference — wrong method names cause silent failures. This applies doubly to the new v2 extension packages (ModelContextProtocol.Extensions.Tasks, ModelContextProtocol.Extensions.Apps) — check their docs before writing code against them.
Show full SKILL.md (201 more words)Show less

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: these legacy server-to-client calls can't run on current-protocol HTTP — migrate to the multi-round-trip InputRequiredException pattern, or (legacy paths only) set Stateless = false, knowing that pins HTTP clients to a down-level initialize revision. Also check the client actually advertises the capability.
  6. MCP9005 build warnings after upgrading to 2.x: the code uses deprecated roots/sampling/logging APIs. Plan the migration; suppress only temporarily.

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

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 13 other files (references) in skills/dotnet-mcp-builder of github/awesome-copilot.

  • SKILL.md
  • references/client.md
  • references/elicitation.md
  • references/mcp-apps.md
  • references/packages.md
  • references/prompt-primitive.md
  • references/resource-primitive.md
  • references/roots.md
  • references/sampling.md
  • references/server-features.md
  • references/testing.md
  • references/tool-primitive.md
  • references/transport-http.md
  • references/transport-stdio.md

Open the folder on GitHubat commit 7cce7cf

Compare with similar skills

Dotnet MCP Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dotnet MCP Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dotnet MCP Builder this skillgithub/awesome-copilot40k—~2.1kAutomated safety check: PassMIT
MCP Csharpatherio-danp/cde-dotnetcc109—~1.2kAutomated safety check: NotesNone
Csharp MCP Server GeneratorILoveDotNet/ilovedotnet155—~560Automated safety check: PassCC0-1.0
Dotnet MCP Builderboshi-xixixi/TraeSkill275—~1.7kAutomated safety check: PassMIT
MCPmanagedcode/dotnet-skills486—~3.5kAutomated safety check: PassMIT
Agent Frameworkjihadkhawaja/Egroo178—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Csharp

    atherio-danp/cde-dotnetcc

    Create, debug, test, and publish MCP (Model Context Protocol) servers in C using the official ModelContextProtocol SDK — tools/prompts/resources, stdio vs HTTP transport, MapMcp hosting.

    109 GitHub stars~1.2k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check: notes
  • Csharp MCP Server Generator

    ILoveDotNet/ilovedotnet

    Generate a complete MCP server project in C with tools, prompts, and proper configuration

    155 GitHub stars~560 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Dotnet MCP Builder

    boshi-xixixi/TraeSkill

    Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 1.x NuGet packages.

    275 GitHub stars~1.7k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • MCP

    managedcode/dotnet-skills

    Build or consume Model Context Protocol (MCP) servers and clients in .NET using the official MCP C SDK, including stdio, Streamable HTTP, tools, prompts, resources, and capability negotiation.

    486 GitHub stars~3.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agent Framework

    jihadkhawaja/Egroo

    Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

    178 GitHub stars~1.9k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Master C/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications.

    40k GitHub starsUsed in 8 repos~6.6k tokens
    Backend & APIsAuto-check passed

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Dotnet MCP Builder

What does Dotnet MCP Builder do?

Build Model Context Protocol (MCP) servers in C/.NET against the current ModelContextProtocol 2.x NuGet packages. Dotnet MCP Builder is an agent skill from github/awesome-copilot, published by the product's own GitHub organization.x NuGet packages.

When should I use Dotnet MCP Builder?

Dotnet MCP Builder fits situations like: implies any .NET MCP server work: ModelContextProtocol; withStdioServerTransport; MCP server in C; MCP tool in dotnet.

How do I install Dotnet MCP Builder in Claude Code?

Run `npx skills add github/awesome-copilot --skill dotnet-mcp-builder -a claude-code`. Or copy the skill folder (skills/dotnet-mcp-builder in github/awesome-copilot) into .claude/skills/dotnet-mcp-builder in your project. Claude Code loads it when a task matches its description.

How do I install Dotnet MCP Builder in Codex?

Run `npx skills add github/awesome-copilot --skill dotnet-mcp-builder -a codex`. Or copy the skill folder (skills/dotnet-mcp-builder in github/awesome-copilot) into .agents/skills/dotnet-mcp-builder in your project. Codex loads it when a task matches its description.

Can I use Dotnet MCP Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill dotnet-mcp-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-mcp-builder, .gemini/skills/dotnet-mcp-builder, .github/skills/dotnet-mcp-builder and .opencode/skills/dotnet-mcp-builder in your project.

What does Dotnet MCP Builder need to run?

Going by SKILL.md and its folder, Dotnet MCP Builder needs the command-line tools its instructions call (dotnet).

Does Dotnet MCP Builder access the network?

SKILL.md names 3 domains. As links in the text: nuget.org, csharp.sdk.modelcontextprotocol.io and github.com. This is read from the text; nothing was executed.

Is Dotnet MCP Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dotnet MCP Builder use?

Dotnet MCP Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dotnet MCP Builder use?

About 2.1k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 22k tokens, read only when the agent opens those files.

What are the alternatives to Dotnet MCP Builder?

Skills that share tags, products or a category with Dotnet MCP Builder: MCP Csharp (atherio-danp/cde-dotnetcc, 109 stars), Csharp MCP Server Generator (ILoveDotNet/ilovedotnet, 155 stars), Dotnet MCP Builder (boshi-xixixi/TraeSkill, 275 stars) and MCP (managedcode/dotnet-skills, 486 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dotnet MCP Builder?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,792 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 8, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.