/mcp-development:dotnet-mcp-builderfrom mcp-development
Builds and debugs C#/.NET MCP servers and clients using ModelContextProtocol 2.x packages. Covers McpServerTool, MapMcp, STDIO, Streamable HTTP, prompts, resources, tools, completions, elicitation, MCP Apps, Tasks, OAuth, and reverse proxy deployment.
Ships in mcp-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write production-quality MCP servers and basic clients in C#/.NET using the official ModelContextProtocol 2.x packages, current transport behavior, modern primitives, and the 2026-07-28 spec rules.
ModelContextProtocol NuGet profile, maintained by Microsoft and the MCP project.dotnet build for non-trivial changes.A .NET MCP server is a normal Microsoft.Extensions.Hosting or WebApplication app that wires an MCP server through dependency injection.
builder.Services
.AddMcpServer()
.WithStdioServerTransport() // OR .WithHttpTransport(...)
.WithToolsFromAssembly()
.WithPrompts<MyPrompts>()
.WithResources<MyResources>();
Primitives are C# methods on attributed classes: [McpServerToolType] plus [McpServerTool], [McpServerPromptType] plus [McpServerPrompt], and [McpServerResourceType] plus [McpServerResource]. Parameters bind from JSON-RPC through System.Text.Json; descriptions become part of the JSON Schema the LLM sees.
Always load references/packages.md when creating a new project or when the package version is uncertain.
| Task | Load |
|---|---|
| New STDIO server | references/transport-stdio.md |
| New HTTP Streamable server | references/transport-http.md |
| Add or modify a tool | references/tool-primitive.md |
| Add or modify a prompt | references/prompt-primitive.md |
| Add or 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 | references/sampling.md |
| Read the user's project roots | references/roots.md |
| Return an interactive UI | references/mcp-apps.md |
| Argument completions, progress, filters, instructions | references/server-features.md |
| Write a .NET MCP client | references/client.md |
| MCP Inspector, in-memory tests, mocks, CI | references/testing.md |
For multi-primitive tasks, load all matching references. For trivial edits in an existing file, apply the cardinal rules without loading every reference.
| Rule | Why it matters |
|---|---|
Pin current stable 2.x packages: ModelContextProtocol, ModelContextProtocol.AspNetCore, ModelContextProtocol.Core. | Stale 0.x-preview, 0.3-preview, 0.4-preview, and 1.x-era samples have breaking API differences. |
| STDIO servers must not write to stdout. | Stdout is the JSON-RPC channel; use stderr logging with LogToStandardErrorThreshold = LogLevel.Trace. |
| HTTP defaults to stateless in 2.x. | In 1.x HTTP was stateful by default; in 2.x Stateless defaults to true. |
| The 2026-07-28 revision has no HTTP sessions. | Stateless = false serves current clients only through legacy initialize fallback. |
| Use Streamable HTTP, not SSE-only. | SSE is deprecated; enable EnableLegacySse = true only for old clients. |
| Do not design new servers around deprecated capabilities. | Roots, sampling, and MCP-channel logging are [Obsolete] and warn MCP9005. |
Always add [Description] to tools and parameters. | Vague schema descriptions are the main reason tools are not selected. |
| Show the registration line for every primitive. | A primitive class without .WithToolsFromAssembly(), .WithTools<T>(), .WithPrompts<...>(), .WithPromptsFromAssembly(), or resource registration is invisible. |
| Do not invent APIs. | Check the API reference before using uncertain methods, especially ModelContextProtocol.Extensions.Tasks and ModelContextProtocol.Extensions.Apps. |
| Transport | Use when | Key constraints |
|---|---|---|
| STDIO | Local tools, editor-integrated servers, simple process launch. | No stdout writes; logs to stderr; avoid banners and Console.WriteLine. |
| Streamable HTTP stateless | Web-hosted servers and current-protocol clients. | Use app.MapMcp() or app.MapMcp("/mcp"); no current HTTP sessions. |
| Stateful HTTP legacy path | Legacy elicitation, sampling, roots, pushed notifications. | Set Stateless = false only with a documented compatibility reason. |
| Legacy SSE | Old clients that cannot use Streamable HTTP. | Enable only with EnableLegacySse = true and call out deprecation. |
For current-protocol HTTP mid-tool questions, prefer multi-round-trip InputRequiredException over legacy ElicitAsync.
| Symptom | Likely cause | Resolution |
|---|---|---|
| STDIO server hangs or client cannot parse JSON-RPC | Something writes to stdout. | Remove Console.WriteLine, banners, and stdout log sinks; configure stderr logging. |
| HTTP 404 | Path mismatch. | Remember app.MapMcp() maps root and app.MapMcp("/mcp") maps /mcp. |
| Tool not appearing | Missing [McpServerToolType] or registration. | Add class attribute and .WithToolsFromAssembly() or .WithTools<T>(). |
| Arguments not bound | JSON-RPC arguments keys do not match parameter names or complex type shape. | Align names and verify System.Text.Json binding. |
| Sampling, elicitation, or roots fail | Legacy server-to-client calls on current-protocol stateless HTTP, or client lacks capability. | Use InputRequiredException, or documented Stateless = false legacy path; verify advertised capability. |
MCP9005 warnings after upgrade | Deprecated roots, sampling, or logging APIs. | Migrate; suppress only temporarily with documented transition plan. |
references/transport-http.md before coding.references/mcp-apps.md or package docs before using extension APIs.EverythingServer sample when a feature interaction remains unclear.references/packages.md: current packages and version guidance.references/transport-stdio.md: STDIO server setup and stdout/stderr traps.references/transport-http.md: Streamable HTTP, OAuth, reverse proxy, stateful/stateless wiring.references/tool-primitive.md: tools, [McpServerToolType], [McpServerTool], descriptions, schemas.references/prompt-primitive.md: prompts and registration.references/resource-primitive.md: resources and registration.references/elicitation.md: InputRequiredException, URL mode, and legacy ElicitAsync.references/sampling.md: deprecated sampling guidance.references/roots.md: deprecated roots guidance.references/mcp-apps.md: interactive MCP Apps.references/server-features.md: completions, progress, filters, server instructions.references/client.md: basic .NET MCP client.references/testing.md: MCP Inspector, in-memory tests, mocks, and CI.Remember stateless-by-default HTTP behavior, discovery-first negotiation, input_required, down-level fallback, server-to-client (to-client) calls through IMcpServer, ILogger for normal logging, and highest-frequency breakage prevention. Legacy roots/sampling/logging, sampling/roots, sampling/roots/log, Sampling/elicitation/roots, and now-deprecated capabilities require transition notes. Load references for Add/modify tasks, Apps/Tasks, log/progress, and prompt/resource/elicitation/MCP work.
## .NET MCP result
**Status:** complete | needs changes | blocked
**Transport:** STDIO | Streamable HTTP | stateful HTTP | legacy SSE
**Packages:** `ModelContextProtocol` <version>, `ModelContextProtocol.AspNetCore` <version>
**Target framework:** `<TFM>`
| Primitive or feature | Registration | Reference used | Notes |
| --- | --- | --- | --- |
| Tool | `.WithToolsFromAssembly()` | `references/tool-primitive.md` | <description/schema note> |
### Validation
- `dotnet build`: pass | fail | not run (<reason>)
- STDIO stdout check: pass | fail | not applicable
- HTTP route check: pass | fail | not applicable
- Deprecated API check (`MCP9005`): pass | fail | not applicable
app.MapMcp() or app.MapMcp("/mcp") intentionally.[Description] attributes are present and useful.MCP9005 handling.dotnet build was run for non-trivial code changes or a concrete blocker is reported.references/client.md (opens in a new tab)references/elicitation.md (opens in a new tab)references/mcp-apps.md (opens in a new tab)references/packages.md (opens in a new tab)references/prompt-primitive.md (opens in a new tab)references/resource-primitive.md (opens in a new tab)references/roots.md (opens in a new tab)references/sampling.md (opens in a new tab)references/server-features.md (opens in a new tab)references/testing.md (opens in a new tab)references/tool-primitive.md (opens in a new tab)references/transport-http.md (opens in a new tab)references/transport-stdio.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin mcp-development7 skills in this plugin
/mcp-builderGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK)./mcp-cliUse the MCP CLI to discover Model Context Protocol servers, inspect tool schemas, grep tool names, and call MCP tools with JSON, raw text, or stdin arguments. Use when the user asks to list MCP servers, inspect a server/tool schema, call an MCP tool from the command line, or script MCP access with --json or --raw output./mcp-implementation-security-reviewReview MCP server, client, and tool-handler source code for security. Use when asked to review an MCP server before release, audit Model Context Protocol implementation controls MCP-01 through MCP-05, check OWASP MCP Top 10, inspect auth, sessions, rate limiting, input-schema validation, official SDK use, or RCE vectors with file and line evidence./mcp-release-qaVerify an MCP server before release by exercising a real protocol session, comparing runtime capabilities with source and documentation, testing failure paths, and recording reproducible evidence. Use when shipping or reviewing an MCP server, tool, resource, prompt, catalog, or install path./mcp-security-auditAudits MCP server configurations such as .mcp.json for hardcoded secrets, dangerous shell patterns, unpinned dependencies, unsafe npx usage, unapproved servers, and governance risks. Use this skill when asked to check MCP security, audit MCP servers, review .mcp.json, validate server args, detect shell injection, or verify environment-variable based credentials./webmcpifyMake a web app agent-ready with WebMCP by detecting app actions, building a manifest, integrating document.modelContext tools, verifying in a real browser, healing failures, and auditing diffs. Use when the user says "webmcpify", "add WebMCP", "expose app actions to AI agents", or asks to make a browser app controllable through WebMCP tools.Other plugins' skills for the same job