
MCP Server Builder
OfficialFreeEasily build .NET MCP servers with the latest standards.
Free · Opens the source repo
What MCP Server Builder does
The MCP Server Builder skill is designed for developers working with the Model Context Protocol (MCP) in C#/.NET. It streamlines the process of creating production-quality MCP servers and clients by providing guidance based on the official ModelContextProtocol NuGet packages, specifically targeting the stable 2.x line. This skill is particularly useful for those who may encounter issues due to outdated versions or deprecated features, ensuring that users can implement the latest specifications without unnecessary setbacks.
One of the key advantages of this skill is its ability to address common pitfalls that developers face when working with MCP. The transition from earlier versions to the 2.x line introduced significant changes, such as the shift from stateful to stateless HTTP defaults. The MCP Server Builder skill helps users navigate these changes and avoid issues like using stale preview versions or applying deprecated capabilities, thus ensuring compatibility with the current standards outlined in the 2026-07-28 specification.
The skill also includes a comprehensive set of references that cover various aspects of MCP server development, such as transport methods, tools, prompts, and resources. Users can easily find the relevant documentation for their specific tasks, whether they are creating a new server, modifying existing tools, or implementing advanced features like elicitation or logging. This organized approach not only saves time but also enhances the overall development experience by providing clear guidance and best practices.
Ultimately, the MCP Server Builder skill is an essential resource for .NET developers looking to build robust MCP servers that adhere to the latest specifications. By leveraging this skill, developers can focus on implementing features and functionality rather than getting bogged down by compatibility issues or outdated practices.
When to use it
Use this skill when developing MCP servers or clients in C#/.NET, especially when dealing with the latest ModelContextProtocol specifications.
When not to use it
This skill is not suitable for MCP work in languages other than C#/.NET, or for trivial tasks that don't require detailed guidance.
What you can build with it
Creating a New MCP Server
Use this skill to guide you through the setup of a new MCP server in C#/.NET, ensuring you follow the latest specifications.
Updating an Existing Server
Leverage the references provided to update an existing MCP server to comply with the latest 2.x standards and avoid deprecated features.
Debugging Transport Issues
Utilize the troubleshooting tips to resolve common transport issues when working with STDIO or HTTP in your MCP server.
How to install MCP Server Builder
View source1. Install with the skills CLI
npx skills add github/awesome-copilot/dotnet-mcp-builder --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by githubBuilding 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
Statelessdefaults totrue). - Recommend capabilities the 2026-07-28 spec deprecates (roots, sampling, MCP-channel logging — now
[Obsolete], warningMCP9005). - 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:
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.
| Task | Load |
|---|---|
| New STDIO server | references/transport-stdio.md |
| New HTTP (Streamable) server | references/transport-http.md |
| Add/modify a tool | references/tool-primitive.md |
| Add/modify a prompt | references/prompt-primitive.md |
| Add/modify a resource | references/resource-primitive.md |
| Ask the user a question mid-tool | references/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 UI | references/mcp-apps.md |
| Argument completions, log/progress notifications, filters, server instructions | references/server-features.md |
| Write a .NET program that consumes an MCP server | references/client.md |
| MCP Inspector, in-memory tests, mocks, CI | references/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)
- Pin the current stable package, not a preview. Use
ModelContextProtocol/ModelContextProtocol.AspNetCore/ModelContextProtocol.Coreat the latest 2.x. If you find yourself writing0.3-previewor0.4-preview, stop and check NuGet — preview APIs have breaking differences. 1.x still works but predates the 2026-07-28 spec. - STDIO servers must not write to stdout. Stdout is the JSON-RPC channel. Configure
LogToStandardErrorThreshold = LogLevel.Tracebefore anything else and neverConsole.WriteLinefrom a tool. - 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 = falsemakes the server refuse that revision and serve clients via the legacyinitializefallback. For "ask the user something mid-tool" on current-protocol HTTP, use the multi-round-tripInputRequiredExceptionpattern; reserve stateful HTTP (or STDIO) for the legacyElicitAsync/sampling/roots paths and pushed notifications. - SSE-only is deprecated. Use Streamable HTTP. Only enable legacy SSE (
EnableLegacySse = true) for an old client you must support, and call it out. - 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](warningMCP9005). They still work against down-level clients, but for new designs prefer the multi-round-tripinput_requiredpattern andILoggerlogging. SuppressMCP9005only as a documented transition measure. - 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. - Show the registration line every time you add a primitive. A new
[McpServerPromptType]class without.WithPrompts<...>()(or.WithPromptsFromAssembly()) is invisible. - 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.
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:
- STDIO: something is writing to stdout (logger sink,
Console.WriteLine, library banner). - HTTP 404: path mismatch —
app.MapMcp()is root,app.MapMcp("/mcp")puts it under/mcp. - Tool not appearing: missing
[McpServerToolType]on the class, or no.WithToolsFromAssembly()/.WithTools<T>()registered. - Args not bound: parameter names must match the JSON-RPC
argumentskeys; complex types bind viaSystem.Text.Json. - Sampling/elicitation/roots failing: these legacy server-to-client calls can't run on current-protocol HTTP — migrate to the multi-round-trip
InputRequiredExceptionpattern, or (legacy paths only) setStateless = false, knowing that pins HTTP clients to a down-levelinitializerevision. Also check the client actually advertises the capability. MCP9005build 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.
Frequently asked questions about MCP Server Builder
Similar skills
Python PyPI Package Builder
Streamline the process of creating and publishing Python packages.
Minecraft Plugin Development
Streamline your Minecraft server plugin creation.
CommunityToolkit.Mvvm Messenger
Decoupled communication for ViewModels in .NET applications.
MVVM Toolkit DI
Streamline ViewModel integration with Dependency Injection in .NET.
MCP Apps Builder
Essential guidelines for MCP server development.
FastAPI
Streamline your FastAPI development with best practices.
