原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

.NET MCP Server

作者:jongalloway版本 1.1.2i★ –i在你的电脑上运行
注册名称io.github.jongalloway/dotnet-mcp

安装

概览

作者提供的说明(英文原文)

AI assistant access to .NET SDK for projects, packages, building, testing, and development tools.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: DOTNET_SKIP_FIRST_TIME_EXPERIENCE, DOTNET_NOLOGO

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "dotnet": {
      "command": "dnx",
      "args": [
        "Community.Mcp.DotNet",
        "--yes"
      ],
      "env": {
        "DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "your-value",
        "DOTNET_NOLOGO": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add dotnet --env DOTNET_SKIP_FIRST_TIME_EXPERIENCE=your-value --env DOTNET_NOLOGO=your-value -- dnx Community.Mcp.DotNet --yes

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "dotnet": {
      "command": "dnx",
      "args": [
        "Community.Mcp.DotNet",
        "--yes"
      ],
      "env": {
        "DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "your-value",
        "DOTNET_NOLOGO": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "dotnet": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Community.Mcp.DotNet",
        "--yes"
      ],
      "env": {
        "DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "your-value",
        "DOTNET_NOLOGO": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • DOTNET_SKIP_FIRST_TIME_EXPERIENCE env
    Skip .NET CLI first-time setup experience
  • DOTNET_NOLOGO env
    Suppress .NET logo and startup messages

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 jongalloway 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32476 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32476 个服务器的 4% 更新
  • 基础检查结果等于或优于此分类中其他 32476 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

.NET MCP Server 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(1.1.2)于8个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 .NET。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, zanadir

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211昨天更新
安装

zanadir

作者:MustacheCase

Find what a repository's CI is missing, and which security checks cannot fail the build.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

.NET MCP Server

Give your AI assistant superpowers for .NET development! This MCP server connects GitHub Copilot, Claude, and other AI assistants directly to the .NET SDK, enabling them to create projects, manage packages, run builds, and more—all through natural language.

Quick Install

Click to install in your preferred environment:

Note: Quick install requires the .NET 10 or .NET 11 SDK. Source builds require .NET 11 RC3 or a compatible GA SDK in the 11.0.1xx feature band.

What is This?

The .NET MCP Server is a Model Context Protocol (MCP) server that connects AI assistants to the .NET SDK using the Model Context Protocol. Think of it as giving your AI assistant a direct line to dotnet commands, but with intelligence and context.

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.

graph LR

A[AI Assistant Copilot/Claude] -->|Natural Language| B[.NET MCP Server] B -->|dotnet commands| C[.NET SDK] C -->|Results| B B -->|Structured Response| A

style A fill:#e1f5ff style B fill:#fff4e6 style C fill:#e8f5e9

Why Use It?

🚀 Faster Development

Instead of remembering exact dotnet commands and syntax, just ask:

  • *"Create a new web API project with Entity Framework"*
  • *"Add the Serilog package and configure structured logging"*
  • *"Update all my NuGet packages to the latest versions"*
🧠 Smarter AI Assistance

Your AI assistant gets direct access to:

  • All installed .NET templates and their parameters
  • NuGet package search and metadata
  • Framework version information (including LTS status)
  • Your solution and project structure
⚡ Token-Efficient by Design

Instead of relying on the LLM to infer state by reading and re-reading console output, the server exposes purpose-built .NET tools with structured inputs and outputs. In practice, this typically means fewer tokens per task and less back-and-forth.

  • Deterministic tool schemas reduce prompt/response overhead
  • machineReadable: true returns structured JSON (no log scraping)
  • MCP Resources provide lightweight metadata without running commands
🎯 Why Not Just Let the AI Call `dotnet` Directly?

The .NET MCP Server provides context and intelligence that raw CLI execution cannot:

1. Template Discovery & Validation
  • With MCP: AI knows exactly which templates are installed (console, webapi, blazor, etc.) and their parameters
  • Without MCP: AI guesses template names and parameters, often getting them wrong
2. Framework Intelligence
  • With MCP: AI knows which .NET versions are installed, which are LTS, and can recommend appropriately
  • Without MCP: AI suggests net8.0 when you only have net10.0 installed, leading to errors
3. Rich Tool Descriptions
  • With MCP: Each tool has detailed parameter descriptions and constraints (e.g., "configuration must be Debug or Release")
  • Without MCP: AI constructs commands from general knowledge, missing version-specific changes
4. Parameter Information
  • With MCP: AI sees template parameters like --use-controllers, --auth, framework options
  • Without MCP: AI doesn't know what optional parameters exist for each template
5. Package Search Integration
  • With MCP: AI can search NuGet.org to find exact package names and versions
  • Without MCP: AI guesses package names, often suggesting outdated or incorrect ones
6. Structured Error Handling with Enhanced Diagnostics
  • With MCP: Errors are parsed and enriched with explanations, documentation links, and suggested fixes
  • Without MCP: AI gets raw stderr output and may misinterpret errors

The server provides enhanced error diagnostics for 52 common error codes:

  • Plain English explanations of what went wrong
  • Direct links to official Microsoft documentation
  • Specific suggested fixes with commands to resolve issues
  • Support for CS####, MSB####, NU####, and NETSDK#### error codes

See Error Diagnostics Documentation for details.

7. MCP Resources

MCP Resources provide read-only access to structured metadata about your .NET environment:

  • dotnet://sdk-info - Information about installed .NET SDKs (versions and paths)
  • dotnet://runtime-info - Information about installed .NET runtimes (versions and types)
  • dotnet://templates - Complete catalog of installed .NET templates with metadata
  • dotnet://frameworks - Information about supported .NET frameworks (TFMs) including LTS status
  • dotnet://workspace - Workspace snapshot with solution, projects, target frameworks, and package counts

This enables AI assistants to:

  • Answer questions without executing commands ("What .NET versions do I have installed?")
  • Provide context-aware suggestions based on your actual environment
  • Access structured JSON data more efficiently than parsing CLI output
  • Reference official .NET metadata for accurate recommendations

Example: Using resources for context-aware assistance

❌ Without Resources:

User: "What .NET versions do I have?" AI: Executes dotnet --list-sdks and parses output User: "Which is LTS?" AI: Executes dotnet --info and tries to parse support info

✅ With Resources: User: "What .NET versions do I have?" AI: Reads dotnet://sdk-info resource (no execution needed) Returns: .NET 8.0 (LTS), .NET 9.0 (STS), .NET 10.0 (LTS) User: "Which is LTS?" AI: Already knows from resource metadata - .NET 8.0, .NET 10.0

Example: Creating a Blazor project with authentication

❌ Without MCP:

AI: "I'll run: dotnet new blazor --auth Individual" Result: Error - template 'blazor' doesn't support --auth parameter

✅ With MCP: AI: Uses dotnet_sdk with action: "TemplateInfo" for 'blazor' Sees available parameters: --interactivity, --use-program-main, --empty Uses dotnet_sdk with action: "SearchTemplates" to find authentication templates AI: "I'll create a Blazor Web App with authentication using the correct template..." Result: Success - uses 'blazor' template with proper authentication configuration

✨ Consistent Results

The MCP server uses official .NET SDK APIs and CLI commands, ensuring:

  • Accurate template information from the Template Engine
  • Reliable command execution
  • Proper error handling and validation
🔒 Secure by Design
  • Runs locally on your machine
  • No data sent to external servers
  • You control what commands execute
  • Standard .NET security model applies
  • Automatic secret redaction to protect sensitive information in CLI output
  • Connection strings, passwords, and API keys are automatically redacted
  • Implemented using optimized regular expressions with <1% performance overhead
  • References Microsoft.Extensions.Compliance.Redaction for future integration
  • Opt-out available with unsafeOutput=true for advanced debugging
  • Patterns include: database credentials, cloud provider keys, tokens, certificates, and more
  • Performance impact is minimal and tested to complete within 500ms for 10,000 lines
  • Optional MCP governance controls (preview)
  • Uses Microsoft.AgentGovernance.Extensions.ModelContextProtocol when enabled via configuration
  • Disabled by default to preserve existing behavior and compatibility
  • Does not ship with a default enforced policy; provide your own policy file(s) when needed
  • See doc/mcp-governance.md for a sample mcp.yaml policy template
  • Sources:
  • Agent Governance Toolkit repository: https://github.com/microsoft/agent-governance-toolkit
  • Agent Governance Toolkit for .NET: https://github.com/microsoft/agent-governance-toolkit/tree/main/agent-governance-dotnet
  • Announcement: https://devblogs.microsoft.com/dotnet/announcing-agent-governance-toolkit-mcp-extensions-for-dotnet/
  • Configuration for startup scanning, policy-based tool authorization, and response sanitization uses the following shape:

Governance startup limitation: Setting McpGovernance:Enabled to true with the full tool catalog currently fails startup because the toolkit scanner rejects the existing dotnet_dev_certs.password input property. The example below is not a working full-catalog workaround, and an allow policy does not bypass startup scanning. See the startup restriction and operating guidance. Leaving governance disabled permits ordinary server use but provides no governance enforcement.

"McpGovernance": {

"Enabled": true, "DefaultAgentId": "did:mcp:anonymous", "ServerName": "dotnet-mcp", "PolicyPaths": ["/path/to/your/policies/mcp.yaml"] }

How It Works

sequenceDiagram

participant User participant AI as AI Assistant participant MCP as .NET MCP Server participant SDK as .NET SDK

User->>AI: "Create a console app called MyApp" AI->>MCP: dotnet_project(action: "New", template: "console", name: "MyApp") MCP->>SDK: dotnet new console -n MyApp SDK-->>MCP: Project created successfully MCP-->>AI: Structured result with output AI-->>User: "I've created a new console app called MyApp"

The .NET MCP Server acts as an intelligent middleware that:

  1. Translates natural language requests into structured .NET SDK operations
  2. Validates parameters using official SDK metadata (templates, frameworks, packages)
  3. Executes commands safely with proper error handling
  4. Returns structured results that AI assistants can understand and explain
🧩 MCP C# SDK Features Used

dotnet-mcp use

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx