dotnet-mcp-builder

dotnet-mcp-builder is a skill for Claude Code, Codex from aboalrejal-ai/skills. It costs 233 tokens per session (1,632 once invoked), scanned A, a copy of dotnet-mcp-builder, MIT.

A guide for building Model Context Protocol servers in C# and .NET. Model Context Protocol is a standard for connecting AI agents to tools and data, and .NET is Microsoft’s application development platform.

In plain words
What is it for?
Use it to create or maintain MCP servers and clients in C#/.NET with current packages and supported protocol features.
Why use it?
It helps avoid outdated package versions and common mistakes with transports, authentication, interactive interfaces, and standard input/output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create or maintain MCP servers and clients in C#/.NET with current packages and supported protocol features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aboalrejal-ai/skills/dotnet-mcp-builder
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aboalrejal-ai/skills --skill dotnet-mcp-builder
Clone the repo
git clone --depth 1 https://github.com/aboalrejal-ai/skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dotnet-mcp-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/aboalrejal-ai/skills/dotnet-mcp-builder/github.svg)](https://agentmods.dev/skills/aboalrejal-ai/skills/dotnet-mcp-builder)
Your own site
<a href="https://agentmods.dev/skills/aboalrejal-ai/skills/dotnet-mcp-builder"><img src="https://agentmods.dev/badge/skills/aboalrejal-ai/skills/dotnet-mcp-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dotnet-mcp-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/aboalrejal-ai/skills/dotnet-mcp-builder"><img src="https://agentmods.dev/badge/skills/aboalrejal-ai/skills/dotnet-mcp-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 233 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00233 $0.01632
Opus 5 $0.00117 $0.00816
Sonnet 5 $0.00047 $0.00326
Haiku 4.5 $0.00023 $0.00163

Measured 8d ago against content hash ce5efce47a11, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

dotnet-mcp-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to dotnet-mcp-builder — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/aboalrejal-skills/skills/ai-and-agents/dotnet-mcp-builder/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 84 lines · 233 tokens per session scan A ce5efce47a11

Subscribe to this mod's changes

dotnet-mcp-builder is a skill published in the GitHub repository aboalrejal-ai/skills (1 stars, last pushed 25d ago), licensed MIT. It adds 233 tokens to every session and 1,632 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to dotnet-mcp-builder, differing in 0 lines, and is treated as a copy.