ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

CSharp.Refactor

โดย Thoriumรุ่น 0.1.20i★ –iรันบนเครื่อง
ชื่อใน registryio.github.Thorium/csharp-refactor

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Offline analyzers that find and fix intent-hiding, slow or noisy C#, including agent-written code.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: อื่น ๆ

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "csharp-refactor": {
      "command": "dnx",
      "args": [
        "csharp-refactor",
        "--yes",
        "--mcp"
      ]
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add csharp-refactor -- dnx csharp-refactor --yes --mcp

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "csharp-refactor": {
      "command": "dnx",
      "args": [
        "csharp-refactor",
        "--yes",
        "--mcp"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "csharp-refactor": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "csharp-refactor",
        "--yes",
        "--mcp"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub Thorium ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 32380 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 62% ของอีก 32380 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 32380 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

CSharp.Refactor ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.20) เข้า registry 23 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี .NET ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, Dechonet MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Spec Driven Development

โดย formulahendry

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

รันบนเครื่อง★ 440MITอัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

Remote Desktop Commander

โดย desktop-commander

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

รันบนคลาวด์★ 211อัปเดต เมื่อวาน
ติดตั้ง

Dechonet MCP

โดย node-man

30 security tools for AI agents: phishing links, exposure maps, DNS, SSL, PQC, history, pivots.

บนเครื่องหรือคลาวด์อัปเดต วันนี้
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

CSharp.Refactor

The C# little-sister of FSharp.Refactor

Functional refactoring suggestions for C#, implemented in F# on Roslyn. The rules care about correctness, measured performance and clear idiomatic C# — and deliberately not about naming, layout or conventions.

  • light bulb quick fixes in your editor (Visual Studio, VS Code, Rider, anything that hosts Roslyn analyzers)
  • a command-line tool that applies them in bulk, build-verified

Suggestions are Info severity: they mark an opportunity, not a defect, and never gate your build.


Using it

The tool is fully offline: AI has been used to make it, but it doesn't use AI.

Quick start

Nothing to configure — the tool reads your project, reports what it would change, and only edits when you tell it to:

dotnet tool install --global csharp-refactor

csharp-refactor Your.csproj --dry-run --api-changes

That prints every fix it would make, with file and position, and writes nothing. When the list looks right, drop the flag to apply them:

csharp-refactor Your.csproj --api-changes

If you don't want change public methods / API, drop --api-changes:

csharp-refactor Your.fsproj

It refuses a compilation that does not already build, recompiles in memory after every pass, and builds the project for real at the end, putting the fixes back if that fails.

For light bulbs while you type, see VS Code / Ionide and Visual Studio IDE-plugin instructions below.
For agentic scenarios the dotnet tool supports MCP.

Using the tool:

Point it at whatever you have — the kind is read off the path:

Your.csprojone project
Thing.csone source file — its project is found and analysed, but only that file is edited
Your.sln, Your.slnxevery C# project the solution lists
src/the solution in that directory, or the projects beneath it
"src/**/*.csproj"everything the glob matches
build.csxone C# script — its own compilation (#r, #load, the NuGet cache), no MSBuild at all; a directory picks its loose scripts up too
C:\gita workspace of checkouts: each analysed on its own into one report

Editor and CI setup

The analyzers ship as CSharp.Refactor.Analyzers, an ordinary Roslyn analyzer package. Reference it from the project you want analysed and every host — dotnet build, Visual Studio, VS Code's C# extension, Rider — loads it by itself:

<PackageReference Include="CSharp.Refactor.Analyzers" Version="*" PrivateAssets="all" />

The package is a development dependency: it only produces hints and quick fixes, and nothing from it reaches your compiled output or your bin.

Visual Studio 2022 / 2026

Install the CSharp.Refactor extension: every C# project opened in the IDE gets the suggestions and Ctrl+. fixes, with no project change and no effect on builds. Its Tools > CSharp.Refactor menu runs the csharp-refactor tool on the open solution (apply or dry run, with or without --api-changes), writes the SARIF report, opens the notes page and the .editorconfig block — the VS Code extension's commands, in Visual Studio. Or use the package reference above; both work, and a project with both sees each finding once.

VS Code

Install the CSharp.Refactor extension. It bundles the analyzers and, with your consent, wires them into every C# project on the machine through MSBuild's user ImportBefore hook (one props file under your profile, undone by a command). Or use the package reference.

CI

The analyzers run inside the compiler, so a build can write the findings as SARIF with no extra tool:

dotnet build -p:ErrorLog=findings.sarif

The tool's own report carries more — fixes as suggested changes, context snippets, stable fingerprints — and pairs with --dry-run for a lint gate:

      - run: dotnet tool install --global csharp-refactor
  • run: csharp-refactor src/Your.csproj --dry-run --report findings.sarif
  • uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: findings.sarif category: csharp-refactor

A dry run exits 0 whether or not it found anything; --fail-on-findings makes it exit 3 when a finding survives the filters, and --baseline turns that into a ratchet: findings already in an earlier report are neither reported nor fixed, only new ones surface.

Applying fixes from the command line

csharp-refactor Your.csproj [--dry-run] [--codes CR0090,CR0103] [--categories correctness,performance] [--api-changes]
Flag
--dry-runReport only: lists every fix it would make, writes nothing.
--codes CR0090,CR0103Restrict the run to chosen rules; the other rules do not run at all. Naming a rule is an ask: it outranks the rule's default-off status and a config none.
--categories Restrict to kinds of rule: correctness, performance, idiom, cosmetic. The rules of the other kinds do not run. For a repository you do not maintain, correctness,performance is the set worth a pull request.
--define Preprocessor symbols the run defines, like csc -define: or a DefineConstants entry: repeatable, or ;/,-separated (--define:A and -d:A work too). Added to each project's own DefineConstants — DEBUG, TRACE and the project's constants stay. See Code under #if.
--api-changesAlso apply fixes that change internal or public signatures and shapes, rewriting call sites across the solution (the reference oracle finds them in every project; a caller in a VB project holds the fix, an F# consumer holds the surface). Held back and counted without it.
--report Write every finding: .sarif, .html (a self-contained page) or .csv.
--baseline The ratchet: findings whose fingerprints appear in this earlier report are neither reported nor fixed.
--fail-on-findingsExit 3 when any finding survives the filters. Exit contract: 0 clean, 1 failure, 2 usage, 3 findings.
`--notes [on\off\only]`List fix-less advisory notes inline; only is the review pass, nothing written. By default a run prints its fixes and one per-category note count; reports and JSON always carry the notes.
--format jsonMachine-readable stdout; progress prose moves to stderr.
--rulesPrint the rule catalog.
--create-configAppend a commented block of every rule and key at its default to the directory's .editorconfig.
--mcpServe analyze and list_rules as an MCP server over stdio, one warm workspace across calls.
--parse-onlyNo references: syntax-only rules. Not a substitute for a real run.
--max-passes Fix-then-reanalyse iterations (default 5). A pass after the first re-analyses only the files the previous pass edited or held a fix in.

Projects are loaded through MSBuildWorkspace — SDK-style projects of any target, net48 included, in every framework flavour they list. A legacy project ( with explicit items) is read from its project file when the .NET Framework build host does not answer: compile items, defines, HintPath references that exist, the targeting pack's assemblies and project references. Without the build tree (a reference a custom .targets adds, a sibling bin) some types stay unresolved; the run says how many, the typed rules stand down where a type is unknown, the in-memory check holds the error count, and the final build runs through Visual Studio's MSBuild.exe where a baseline build succeeds — otherwise the run is verified in memory only, and says so. An executable another project of the solution references (its tests) is not a leaf: its public shape stays unless --api-changes says otherwise, and every dependent of a changed project is built too. A C# script (.csx) is a compilation of its own: the file parsed as a script, the running runtime as its references, #r resolved against the script's directory, the runtime and the NuGet cache (#r "nuget: Name, Version"), #load read by the compiler for context (a loaded file is edited when it is swept as a target of its own, and a directory sweeps every loose script). Nothing builds a script, so the run is verified in memory: the error count may not grow, and a script host's globals (Args) count as errors on both sides.

Code under #if LOCAL_BUILD

Code behind a preprocessor symbol nothing defines is not in the parse tree at all: the tool neither analyses it nor sees what a fix elsewhere does to it, and the verification build compiles without it too. A repository that keeps, say, a local-development path under #if LOCAL_BUILD names the symbol for the run:

csharp-refactor Your.sln --define LOCAL_BUILD        # or --define:LOCAL_BUILD, -d:LOCAL_BUILD

csharp-refactor Your.sln --define "LOCAL_BUILD;CI" # several at once

or once for every run, in .editorconfig (csharp_refactor.defines = LOCAL_BUILD, below). The run uses both, and says at the start which symbols are active and where each came from. The symbols are added to what each project defines, exactly as dotnet build would see them with DefineConstants set in the environment: the SDK's DEBUG/TRACE, the target framework's NET8_0_OR_GREATER and the project's own $(DefineConstants);FOO all stay. (-p:DefineConstants=LOCAL_BUILD would not do: a global property replaces every one of them.) Every MSBuild the run starts — the workspace's design-time build, restores, the verification builds — gets them that way, and the loaded C# projects, legacy projects and .csx scripts get them in their parse options as well, so a project that assigns DefineConstants outright is still analysed with them. A script whose #r cannot be resolved while another #r sits under #if LOCAL_BUILD gets the hint to pass --define LOCAL_BUILD.

Configuration

Rules are configured the way every Roslyn analyzer is, in .editorconfig, nearest section winning:

[*.cs]

dotnet_diagnostic.CR0103.severity = none # off dotnet_diagnostic.CR0006.severity = suggestion # a default-off rule, on csharp_refactor.CR0006.then_at_least = 30 # a rule's knob

csharp_refactor.public_api = false # nothing links to this assembly csharp_refactor.api_changes = true # --api-changes as a standing decision csharp_refactor.suppressions = no-correctness # all | no-correctness | none csharp_refactor.skip_microsoft_duplicates = true # the Microsoft analyzers run here: skip what they already report csharp_refactor.ignore_paths = generated;external/imported csharp_refactor.defines = LOCAL_BUILD # like --define on every run

csharp_refactor.defines is a run-level key: it is read once per run, from the .editorconfig nearest the target (the walk stops at root = true), and adds to --define, never replacing it.

csharp-refactor --create-config writes the block for you, every value at this build's default, so it changes nothing until you edit a line. Each rule's knobs follow its severity line, at their defaults; a knob whose default is not one value (CR0023's measured floor, a rule's wrap_column, which falls back to the file's max_line_length) is written commented out.

A generated f

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx