Software Design

io.github.qwertymuzaffar由 GitHub 帳號 qwertymuzaffar 發布v0.1.3更新於 Oct 24, 2026

SOLID/OOP/DRY, the 23 GoF patterns, pattern scaffolding, and heuristic code-smell detection.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,為助理提供 SOLID、OOP 與 23 種 GoF 設計模式的參考資料,並支援模式腳手架與啟發式程式碼壞味道偵測。

可以做什麼
  • 列出並解說設計概念:瀏覽原則、SOLID、OOP 四大支柱與 23 種 GoF 模式的目錄,並依 slug、名稱或別名取得完整說明(意圖、適用時機、取捨、參與者)。
  • 產生模式腳手架:輸出與語言無關的 GoF 模式虛擬碼骨架,可將角色重新命名為你的領域名稱。
  • 掃描程式碼壞味道:對長方法、大型類別、過長參數列、深層巢狀、重複與大型檔案做啟發式檢查,門檻可逐次調整,每項結果附上建議的重構方向。
  • 讀取內建資源,了解原則、模式以及壞味道偵測的侷限。
  • 提供審查與重構提示詞,引導用戶端模型審查程式碼片段或套用指定模式。
適用情境
適合希望助理引用一致、權威的設計原則與模式定義,在撰寫程式前先勾勒模式結構,或對程式碼片段取得快速結構性提示的情境。它著重設計指引與判斷輔助,而非對架構做通過/不通過的評分。
執行需求
以本機 stdio 程序執行,通常透過 npx 啟動 npm 套件 mcp-software-design,因此需要 Node.js,首次下載還需要網路存取。未宣告任何驗證、環境變數或標頭。從原始碼建置需要 npm install 與 npm run build。
安裝前請注意
壞味道偵測明確只是啟發式提示而非結論,設計判斷交由模型完成,結果應人工複核,不宜當成 lint 規則。傳給工具與提示詞的程式碼會送至助理的模型進行分析。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Software Design,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-software-design

[npm version] [npm downloads] [License: MIT] [MCP]

An MCP server that teaches and helps apply software-design guidance — the SOLID principles, the OOP pillars, DRY / KISS / YAGNI / meaningful naming / clean code, and the 23 Gang-of-Four design patterns — plus pattern scaffolding and heuristic code-smell detection.

It's the companion to mcp-udacity-commit: same stack (TypeScript, the MCP SDK, stdio transport), same shape (pure logic modules + thin server wiring).

Install

Register it with Claude Code — one line, nothing to clone:

bash
claude mcp add software-design -- npx -y mcp-software-design

Or in an MCP client config:

json
{  "mcpServers": {    "software-design": {      "command": "npx",      "args": ["-y", "mcp-software-design"]    }  }}

Why this exists — and its one honest caveat

The commit server can lint: "subject ≤ 50 chars" is objectively checkable. Design principles and patterns are not like that — "does this violate SRP?" or "should this be a Factory?" are judgment calls, not lint rules.

So this server does not pretend to grade your architecture pass/fail. Instead it does the parts that are genuinely reliable, and hands the judgment to the model:

CapabilityPrimitiveWhat it gives you
Referenceresources + explain_conceptAuthoritative, consistent definitions so the model cites the same thing every time.
Scaffoldingscaffold_patternA language-agnostic skeleton of a pattern's participants.
Smell heuristicscheck_smellsA few genuinely-checkable proxies (long method, deep nesting, …) — hints, never verdicts.
Explain / applyreview_design, apply_pattern promptsPrime the model to review or refactor, grounded in the tools + resources above.

Design analysis is a judgment call, so the "explain/apply helper" is exposed as MCP prompts (which drive the client's model) rather than server code pretending to understand your snippet.

Tools

  • list_catalog { kind? } — list concepts, optionally filtered (principle | solid | oop | pattern | creational | structural | behavioral). solid / oop narrow to the SOLID five / the four OOP pillars.
  • explain_concept { name } — full guidance for one principle or pattern (intent, when-to-use, trade-offs, participants). Accepts a slug, name, or alias ("SRP", "open-closed", "pubsub").
  • scaffold_pattern { pattern, names? } — pseudo-code skeleton for a GoF pattern; names optionally renames roles to your domain ({ "Product": "Notification" }).
  • check_smells { code, …thresholds? } — heuristic scan for long method, large class, long parameter list, deep nesting, duplication, and large file. Each finding names the principle it hints at plus a suggested refactor. All thresholds are overridable per call.

Resources

  • design://principles — SOLID, OOP pillars, DRY, KISS, YAGNI, meaningful naming, and more.
  • design://patterns — the 23 GoF patterns, grouped creational / structural / behavioral.
  • design://smells — what check_smells detects, its thresholds, and its caveats.

Prompts

  • review_design { code, focus? } — review a snippet against the principles/patterns, grounded in check_smells + the resources.
  • apply_pattern { pattern, code } — refactor a snippet to apply a named pattern (and first judge whether it even fits).

Build from source

For local development, or to run a local checkout instead of the published package:

bash
npm installnpm run build      # compiles src → buildnpm start          # runs the stdio servernpm test           # builds, then runs the unit testsnpm run test:client  # end-to-end check against the built server

Then register it the same way as Install above — both the claude mcp add command and the MCP-client-config form work — but point at your local build instead of npx:

bash
claude mcp add software-design -- node /absolute/path/to/mcp-software-design/build/index.js

Layout

src/  catalog.ts   # principles + 23 GoF patterns (data + lookup + markdown)  smells.ts    # pure, testable code-smell heuristics  scaffold.ts  # renders a pattern's participants into a skeleton  index.ts     # MCP wiring: resources, tools, promptstest/  catalog.test.mjs   # catalog lookup + scaffolder  smells.test.mjs    # smell detectors (incl. string/comment edge cases)

The src/*.ts logic modules are pure and side-effect-free, so they're unit tested directly against the compiled output — the server (index.ts) is only thin wiring on top.

License

MIT

來源:README.md,提交 c9d7077

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分