Agent skill

Dotnet MCP Builder

by boshi-xixixi in boshi-xixixi/TraeSkill

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

MITAuto-check passedAgent Workflows

Install Dotnet MCP Builder

skills CLI
$ npx skills add boshi-xixixi/TraeSkill --skill dotnet-mcp-builder -a claude-code

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

GitHub CLI
$ gh skill install boshi-xixixi/TraeSkill 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/boshi-xixixi/TraeSkill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/Skills/.agents/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
276
Token cost
~1.7k tokens
SKILL.md length
672 words
Files
14 (incl. references)
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 7 steps: Pin the current stable package, not a… → STDIO servers must not write to stdout.… → HTTP defaults to stateful. For… → …
  • 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 boshi-xixixi/TraeSkill. 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 reverse-proxy deploy specifics, and debugging concrete MapMcp / STDIO / Streamable-HTTP errors. Also covers the routine work — STDIO and Streamable HTTP transports…

Its SKILL.md is about 1.7k 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: 为 Trae IDE 打造的全流程标准化 AI 开发技能库,内置调度分发与多角色研发技能,一键导入规范 AI 编码工作流 🚀. 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

7 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 stateful. For horizontally-scaled deployments without server-initiated traffic, set options.Stateless = true…
  4. SSE-only is deprecated. Use Streamable HTTP. Only enable legacy SSE (EnableLegacySse = true) for an old client you must support, and call…
  5. Always [Description] tools and parameters. This is what the LLM sees when picking and shaping calls. Vague descriptions are the #1 reason…
  6. Show the registration line every time you add a primitive. A new [McpServerPromptType] class without .WithPrompts<...>() (or…
  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 9cf38e6. 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 1.7k tokens when it runs, and up to ~21k if it reads all its reference files. Until then it costs about 243 tokens; SKILL.md has 672 words of instructions outside code blocks.

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

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 boshi-xixixi/TraeSkill at commit 9cf38e6, republished under its MIT licence (© boshi-xixixi). 672 words, ~1,721 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 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 reverse-proxy deploy specifics, and debugging concrete MapMcp / STDIO / Streamable-HTTP errors. Also covers the routine work — STDIO and Streamable HTTP transports (SSE is deprecated), tools, prompts, resources, sampling, roots, completions, logging — 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 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:

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 (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.

Show full SKILL.md (348 more words)Show less

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.

© boshi-xixixi, 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 .trae/Skills/.agents/skills/dotnet-mcp-builder of boshi-xixixi/TraeSkill.

  • 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 9cf38e6

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 skillboshi-xixixi/TraeSkill276—~1.7kAutomated 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 Buildergithub/awesome-copilot40k—~2.1kAutomated 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 4 days ago
    Agent WorkflowsAuto-check passed
  • Dotnet MCP Builder

    github/awesome-copilot

    Official

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

    40k GitHub stars~2.1k tokensUpdated yesterday
    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 boshi-xixixi/TraeSkill

All 16 skills in this repo
  • AI Team Orchestration

    boshi-xixixi/TraeSkill

    Bootstrap and run a multi-agent AI development team. An agent skill from boshi-xixixi/TraeSkill.

    276 GitHub stars~1.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Arize Instrumentation

    boshi-xixixi/TraeSkill

    INVOKE THIS SKILL when adding Arize AX tracing or observability to an app for the first time, or when the user wants to instrument their LLM app or get started with LLM observability.

    276 GitHub stars~5.1k tokensUpdated 5 mo ago
    Auto-check: notes
  • Skill Creator

    boshi-xixixi/TraeSkill

    当用户需要创建新 Skill 或更新现有 Skill 时使用。此 Skill 提供技能创建的完整工作流指导,包括需求分析、编写规范、工程化构建、质量评估和迭代优化。

    276 GitHub stars~3.9k tokensUpdated 5 mo ago
    Auto-check passed
  • Trae Project Setup

    boshi-xixixi/TraeSkill

    Trae 项目规范化配置专家。用于快速初始化 Trae 项目配置文件、生成项目规则、用户偏好设置和 Skill 模板。当用户需要:(1) 初始化新项目的 Trae 配置 (2) 生成 .trae 目录结构 (3) 创建 USERPREFERENCES.md 用户偏好文件 (4) 创建 projectrules.md 项目规则文件 (5) 创建新的 Skill 模板 时使用此 Skill。

    276 GitHub stars~708 tokensUpdated 5 mo ago
    Auto-check: notes
  • Web Coder

    boshi-xixixi/TraeSkill

    Expert 10x engineer with comprehensive knowledge of web development, internet protocols, and web standards.

    276 GitHub starsUsed in 1 repo~5.2k tokens
    Auto-check passed
  • Winapp CLI

    boshi-xixixi/TraeSkill

    Windows App Development CLI (winapp) for building, packaging, signing, debugging, and UI-automating Windows applications.

    276 GitHub stars~1.9k tokensUpdated 5 mo ago
    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 1.x NuGet packages. Dotnet MCP Builder is an agent skill from boshi-xixixi/TraeSkill.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 boshi-xixixi/TraeSkill --skill dotnet-mcp-builder -a claude-code`. Or copy the skill folder (.trae/Skills/.agents/skills/dotnet-mcp-builder in boshi-xixixi/TraeSkill) 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 boshi-xixixi/TraeSkill --skill dotnet-mcp-builder -a codex`. Or copy the skill folder (.trae/Skills/.agents/skills/dotnet-mcp-builder in boshi-xixixi/TraeSkill) 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 boshi-xixixi/TraeSkill --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 1.7k tokens (SKILL.md is roughly 6.9k 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 19k 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 (github/awesome-copilot, 40k 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?

boshi-xixixi (a GitHub user) maintains it in boshi-xixixi/TraeSkill, which has 276 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on May 12, 2026.

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