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

C# Class Analyzer MCP

作者:undy-mosq版本 1.0.4i★ –i在你的电脑上运行
注册名称io.github.undy-mosq/CSharpAnalyserMcp

安装

概览

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

A read-only MCP server that lets an AI assistant browse any C# solution through Roslyn.

PopNx MCP 的三大支柱

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

它能帮你做什么

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

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

安装

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

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你用的是哪个应用?

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

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

{
  "mcpServers": {
    "csharpanalysermcp": {
      "command": "dnx",
      "args": [
        "CSharpAnalyserMcp",
        "--yes",
        "--workspace",
        "your-value"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add csharpanalysermcp -- dnx CSharpAnalyserMcp --yes --workspace your-value

这个服务器需要在启动命令中填入值,请复制设置后自行填写。

或者自己复制设置

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

{
  "mcpServers": {
    "csharpanalysermcp": {
      "command": "dnx",
      "args": [
        "CSharpAnalyserMcp",
        "--yes",
        "--workspace",
        "your-value"
      ]
    }
  }
}

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

这个服务器需要在启动命令中填入值,请复制设置后自行填写。

或者自己复制设置

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

{
  "servers": {
    "csharpanalysermcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "CSharpAnalyserMcp",
        "--yes",
        "--workspace",
        "your-value"
      ]
    }
  }
}

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

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

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

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

它能做什么

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

基础检查i

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

  • ✓ 通过

    作者与仓库一致

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

  • … 尚未检查

    仍在维护

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

  • … 尚未检查

    有许可证

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

  • – 不适用

    端点有响应

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

  • – 不适用

    使用 OAuth 登录

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

  • … 尚未检查

    工具描述中没有隐藏指令

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

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

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

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

常见问题

C# Class Analyzer MCP 安全吗?

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

它需要哪些密钥或代码?

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

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

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

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(1.0.4)于15天前进入注册中心。

哪些应用可以使用它?

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

有什么可以替代它?

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

替代选择

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

如何看卡片:★ 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前天更新
安装

Rystic

作者:Rystic-Inc

Start, seed, clock, inspect and diff Rystic API simulators from your agent.

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

作者的 README

打开 README

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

English | 简体中文

CSharpAnalyserMcp

A read-only Model Context Protocol (MCP) server that lets an AI assistant browse any C# solution through Roslyn.

The server loads a solution with MSBuildWorkspace into a cached Roslyn snapshot and then answers structured queries about it: where each type is declared, its XML documentation, and a method's signature, documentation, source location and body. An agent can therefore pull in the exact slice of source it needs instead of reading whole files into its context window.

  • Transport: stdio (StdioServerTransport), protocol traffic on stdout only; all logs go to stderr.
  • Solution path is passed on the command line (--workspace ); the solution is loaded before the MCP handshake, so a bad path fails fast with a message on stderr and a non-zero exit code.
  • Every tool returns MCP text content and never structuredContent: listing / hierarchy / search tools return one text block per entry (a string list from the client's point of view), while detail tools emit path / desc / namespace / signature / body blocks separated by a line containing ---.
  • Distribution: published to NuGet as the .NET tool CSharpAnalyserMcp (command csharp-analyser-mcp) and listed in the official MCP Registry as io.github.undy-mosq/CSharpAnalyserMcp.

Installation

NuGet .NET tool (recommended)
dotnet tool install --global CSharpAnalyserMcp

csharp-analyser-mcp --workspace D:\MyProject\MySolution.sln

upgrade / remove

dotnet tool update --global CSharpAnalyserMcp dotnet tool uninstall --global CSharpAnalyserMcp

Install it globally: a --local install only writes a manifest entry, so csharp-analyser-mcp never lands on PATH and MCP clients cannot start it.

On demand with dnx (nothing to install, .NET SDK 10+)
# "--" separates dnx options from the arguments forwarded to the server

dnx CSharpAnalyserMcp --yes -- --workspace D:\MyProject\MySolution.sln

From source
git clone https://github.com/undy-mosq/CSharpAnalyserMcp

dotnet build CSharpAnalyserMcp\CSharpAnalyserMcp.csproj dotnet run --project CSharpAnalyserMcp -- --workspace D:\MyProject\MySolution.sln

Requirements

PurposeRequirement
Run the published tool (dotnet tool install --global).NET SDK 8.0 or newer on PATH (the package targets net8.0)
Run it on demand with dnx.NET SDK 10.0 or newer — dnx ships with the SDK
Build / run from source.NET SDK 8.0 or newer (the project targets net8.0)
Load the analyzed solutionAn MSBuild toolchain that can open it — Visual Studio 2022 or VS Build Tools (Microsoft.Build.Locator registers the newest installed instance), or the .NET SDK itself for SDK-style projects

Client configuration

The server is started with a single argument, --workspace, pointing at the solution file.

Installed .NET tool

The global tool shim lives in %USERPROFILE%\.dotnet\tools. MCP clients spawn the process themselves and only see the PATH they inherited, so point the configuration at the shim by absolute path (expand %USERPROFILE%, e.g. C:\Users\you\.dotnet\tools\csharp-analyser-mcp.exe):

Claude Desktop (claude_desktop_config.json):

{

"mcpServers": { "csharp-analyser": { "command": "C:\\Users\\you\\.dotnet\\tools\\csharp-analyser-mcp.exe", "args": ["--workspace", "D:\\MyProject\\MySolution.sln"] } } }

VS Code (.vscode/mcp.json):

{

"servers": { "csharp-analyser": { "type": "stdio", "command": "C:\\Users\\you\\.dotnet\\tools\\csharp-analyser-mcp.exe", "args": ["--workspace", "D:\\MyProject\\MySolution.sln"] } } }

The bare command name ("command": "csharp-analyser-mcp") works only when that directory is already on the client's PATH; a client started before the tool was installed keeps the old environment, so restart it after changing PATH.

On demand with dnx (nothing installed)
{

"servers": { "csharp-analyser": { "type": "stdio", "command": "dnx", "args": ["CSharpAnalyserMcp", "--yes", "--", "--workspace", "D:\\MyProject\\MySolution.sln"] } } }

Append @ to the package id to pin a version. The MCP Server tab of the NuGet package page offers the same JSON for copying. dnx is a .cmd shim; if the client cannot spawn it, use the equivalent dotnet form instead: "command": "dotnet" with "args": ["tool", "exec", "CSharpAnalyserMcp", "--yes", "--", "--workspace", "D:\\MyProject\\MySolution.sln"].

Published executable

VS Code (.vscode/mcp.json):

{

"servers": { "csharp-analyser": { "type": "stdio", "command": "C:\\Tools\\csharp-analyser\\CSharpAnalyserMcp.exe", "args": ["--workspace", "D:\\MyProject\\MySolution.sln"] } } }

Running the project from source
{

"servers": { "csharp-analyser": { "type": "stdio", "command": "dotnet", "args": [ "run", "--project", "D:\\MyProject\\CSharpAnalyserMcp\\CSharpAnalyserMcp\\CSharpAnalyserMcp.csproj", "--", "--workspace", "D:\\MyProject\\MySolution.sln" ] } } }

Press F5 in VS Code to debug the server itself; .vscode/launch.json already passes a --workspace argument — point it at your own solution.

Tools

ToolMCP annotationsPurpose
list_classes_in_folderread-onlyList type declarations in a folder and its subfolders (one text per type)
list_classes_in_namespaceread-onlyList type declarations in a namespace (sub-namespaces optional; one text per type)
get_class_documentationread-onlyReturn the XML documentation and member signatures of a type located by its declaration line
get_methodread-onlyReturn a method's signature, XML docs, location and body, located by its declaration line plus its declaring type's declaration line
find_inheritanceread-onlyList the derived-type tree of a type (first entry: the type itself)
find_method_overridesread-onlyList the overrides / implementations of a method (first entry: the method itself)
search_regexread-onlySearch a directory / file line by line with a regular expression (default: *.cs only); one text per match
reload_solutionidempotentRebuild the Roslyn snapshot after source files changed
set_resolve_base_pathidempotentChange the directory used to resolve relative paths
list_classes_in_folder
{ "folderPath": "src/Services", "kinds": ["class", "interface"] }
ParameterTypeDefaultDescription
folderPathstring, required—Absolute path, or a path relative to the resolve base directory (default: the solution's directory).
kindsstring[]["class"]Type kinds to include (see Type kinds and kinds).

Files under bin/obj are skipped. Returns a string list, one text content per type, formatted as {relativePath} L{start}-{end} {namespace}: {signature}; the namespace segment is omitted for the global namespace, and a partial type reports the location of its first declaration plus a trailing ...(partial xN).

list_classes_in_namespace
{ "namespaceName": "MyApp.Services", "includeSubNamespaces": true, "kinds": ["all"] }
ParameterTypeDefaultDescription
namespaceNamestringglobal namespaceNamespace name, e.g. MyApp.Services. Empty, global, global namespace or all mean the global namespace.
includeSubNamespacesbooltrueAlso include types declared in child namespaces.
kindsstring[]["class"]Type kinds to include.
get_class_documentation
{ "typeDeclaration": "public static class ItemConfig", "maxXmlChars": 2000 }
ParameterTypeDefaultDescription
typeDeclarationstring, required—Declaration line of the type (the signature segment printed by the listing tools), e.g. public static class ItemConfig. Whitespace is stripped, then it must match the canonical signature or the first source line of the declaration exactly.
namespaceNamestringany namespaceNamespace of the type; empty or global means the global namespace.
maxXmlCharsint2000Maximum characters of the raw XML documentation per type (the desc field); 0 = no limit.

On a match the result is a text block: path / desc / namespace (the global namespace prints as global) / signature / body (member signatures, one per line); multiple matches are separated by a line containing ---. A miss prints (no match) followed by candidates : and candidate declaration lines.

get_method
{ "methodDeclaration": "public static void SetEffect(RoleAttributes owner, int stack)", "typeDeclaration": "public class RoleAttributes", "namespaceName": "DuelModel" }
ParameterTypeDefaultDescription
methodDeclarationstring, required—Declaration line of the method, e.g. public static string TextName(this ItemInfo.ItemType itemType). The method name and its parameter types are parsed from this text.
typeDeclarationstring, required—Declaration line of the declaring class / interface / struct, e.g. public static class ItemConfig.
namespaceNamestringany namespaceNamespace of the declaring type; empty or global means the global namespace.
maxBodyCharsint8000Maximum characters of the method body; 0 = no limit.

Matching rules:

  • Both declaration lines must match the canonical signature or the first source line of the declaration exactly after whitespace is stripped (no substring matching).
  • Only members declared by the type itself are searched (ordinary methods; no inherited members, constructors or properties). Explicit interface implementations (IFoo.Bar) are matched too.
  • Parameter types parsed from the declaration line are compared case-insensitively and whitespace-insensitively, without namespace prefixes; C# aliases are mapped to their metadata names (int → Int32, string → String, …). The comparison is relaxed step by step: exact → ignoring generic arguments → allowing a prefix of the parameter list.
  • When nothing matches, (no match) is printed followed by candidates : and candidate declaration lines (same-named methods of that type first, otherwise every method of that type).

The result is a text block per overload: path / desc (raw XML docs, 2000-char cap) / namespace / class / signature / body (source with the outermost braces and the common indentation removed); overloads are separated by a line containing ---.

find_inheritance
{ "typeDeclaration": "public abstract class BuffEntity", "namespaceName": "Duel" }
ParameterTypeDefaultDescription
typeDeclarationstring, required—Declaration line of the class / interface / struct / record.
namespaceNamestringany namespaceNamespace of the type; empty or global means the global namespace.

The first entry is the queried type itself (no indentation, no prefix); every derived type follows as its own text content, indented by one tab and prefixed with - per hierarchy level. A class root reports the classes / records deriving from it; an interface root reports sub-interfaces plus the classes / structs / records implementing it directly. Generic base types are matched by OriginalDefinition (Base and Base count as the same base). Ea

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

问 PopNx