dotnet-mcp copilot-instructions.md

A set of GitHub Copilot instructions for a .NET Model Context Protocol server. The server lets AI assistants discover .NET templates and run supported SDK or command-line operations.

In plain words
What is it for?
Guiding work on the server’s .NET SDK integration, command execution, template metadata, validation, and standard-input/output communication.
Why use it?
It gives Copilot project-specific information about the architecture, technologies, and coding conventions instead of relying on generic assumptions.

Instructions file for GitHub Copilot

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.

agentmods
npx agentmods add instructions/jongalloway/dotnet-mcp/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/jongalloway/dotnet-mcp

Made for: GitHub Copilot.

Per session 3,736 This file is loaded in full into every session.
When invoked 3,736 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.03736 $0.03736
Opus 5 $0.01868 $0.01868
Sonnet 5 $0.00747 $0.00747
Haiku 4.5 $0.00374 $0.00374

Measured 2d ago against content hash b5e230b5821f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dotnet-mcp copilot-instructions.md 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 2d 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.

.github/copilot-instructions.md · 404 lines

How it starts

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

GitHub Copilot Instructions for .NET MCP Server

Project Overview

This project is an MCP (Model Context Protocol) server that integrates with the .NET SDK. It provides both CLI command execution and direct SDK integration through official NuGet packages, offering rich metadata access and type-safe operations.

Important: This package is designed exclusively as an MCP server for AI assistants. It is not intended for use as a library or for programmatic consumption in other .NET applications. The only supported use case is running it as an MCP server via dnx or dotnet run.

Key Technologies

  • .NET 10.0: The latest version of .NET (LTS - Long Term Support)
  • Model Context Protocol SDK: Version 1.0.0
  • Stdio Transport: Communication via standard input/output
  • Microsoft.Extensions.Hosting: For application lifecycle management
  • Microsoft.TemplateEngine.*: Direct integration with .NET Template Engine (v10.0.101)
  • Microsoft.Build.*: MSBuild integration for framework validation (v18.0.2)

Architecture

The server uses a hybrid architecture:

  1. SDK Integration - For metadata, discovery, and validation (Template Engine, MSBuild)
  2. CLI Execution - For actual command execution (proven, reliable)

Code Style and Conventions

Naming Conventions

  • Use PascalCase for class names, method names, and public members
  • Use camelCase for local variables and parameters
  • Use descriptive names that clearly indicate purpose
  • Consolidated tool method names follow the pattern: Dotnet{Noun} (e.g., DotnetProject, DotnetPackage, DotnetSolution)
    • Each consolidated tool accepts an action parameter to specify the operation
    • This aligns with the consolidated tool design for better AI orchestration
  • Helper class methods should be descriptive: GetInstalledTemplatesAsync, IsLtsFramework

Attribute Usage

  • Mark tool classes with [McpServerToolType]
  • Mark tool methods with [McpServerTool]
  • Prefer XML doc comments (/// <summary>, /// <param>) for tool and parameter descriptions
  • Tool methods should be partial so the MCP SDK analyzers can generate tool Description metadata from XML docs
  • Avoid manual [Description("...")] on tools/parameters unless explicitly required for compatibility
  • Keep descriptions clear and concise

Read the full file on GitHub · 404 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. 2d ago First seen · 404 lines · 3,736 tokens per session scan A b5e230b5821f

Subscribe to this mod's changes

dotnet-mcp copilot-instructions.md is an instructions file published in the GitHub repository jongalloway/dotnet-mcp (31 stars, last pushed 16d ago), licensed MIT. It adds 3,736 tokens to every session, about $0.0187 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.