{
  "markdown": "# mcp-software-design\n\n[![npm version](https://img.shields.io/npm/v/mcp-software-design)](https://www.npmjs.com/package/mcp-software-design)\n[![npm downloads](https://img.shields.io/npm/dm/mcp-software-design)](https://www.npmjs.com/package/mcp-software-design)\n[![License: MIT](https://img.shields.io/npm/l/mcp-software-design)](./LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-server-blue)](https://modelcontextprotocol.io)\n\nAn [MCP](https://modelcontextprotocol.io) server that teaches and helps apply\n**software-design guidance** — the SOLID principles, the OOP pillars, DRY /\nKISS / YAGNI / meaningful naming / clean code, and the 23 Gang-of-Four design\npatterns —\nplus pattern scaffolding and heuristic code-smell detection.\n\nIt's the companion to\n[`mcp-udacity-commit`](https://github.com/qwertymuzaffar/mcp-udacity-commit): same stack (TypeScript, the MCP\nSDK, stdio transport), same shape (pure logic modules + thin server wiring).\n\n## Install\n\nRegister it with Claude Code — one line, nothing to clone:\n\n```bash\nclaude mcp add software-design -- npx -y mcp-software-design\n```\n\nOr in an MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"software-design\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-software-design\"]\n    }\n  }\n}\n```\n\n## Why this exists — and its one honest caveat\n\nThe commit server can *lint*: \"subject ≤ 50 chars\" is objectively checkable.\n**Design principles and patterns are not like that** — \"does this violate\nSRP?\" or \"should this be a Factory?\" are judgment calls, not lint rules.\n\nSo this server does **not** pretend to grade your architecture pass/fail.\nInstead it does the parts that are genuinely reliable, and hands the judgment\nto the model:\n\n| Capability | Primitive | What it gives you |\n|---|---|---|\n| **Reference** | resources + `explain_concept` | Authoritative, consistent definitions so the model cites the same thing every time. |\n| **Scaffolding** | `scaffold_pattern` | A language-agnostic skeleton of a pattern's participants. |\n| **Smell heuristics** | `check_smells` | A few genuinely-checkable proxies (long method, deep nesting, …) — **hints, never verdicts**. |\n| **Explain / apply** | `review_design`, `apply_pattern` prompts | Prime the model to review or refactor, grounded in the tools + resources above. |\n\nDesign analysis is a judgment call, so the \"explain/apply helper\" is exposed\nas MCP **prompts** (which drive the client's model) rather than server code\npretending to understand your snippet.\n\n## Tools\n\n- **`list_catalog`** `{ kind? }` — list concepts, optionally filtered\n  (`principle` | `solid` | `oop` | `pattern` | `creational` | `structural` |\n  `behavioral`). `solid` / `oop` narrow to the SOLID five / the four OOP pillars.\n- **`explain_concept`** `{ name }` — full guidance for one principle or\n  pattern (intent, when-to-use, trade-offs, participants). Accepts a slug,\n  name, or alias (`\"SRP\"`, `\"open-closed\"`, `\"pubsub\"`).\n- **`scaffold_pattern`** `{ pattern, names? }` — pseudo-code skeleton for a GoF\n  pattern; `names` optionally renames roles to your domain\n  (`{ \"Product\": \"Notification\" }`).\n- **`check_smells`** `{ code, …thresholds? }` — heuristic scan for long\n  method, large class, long parameter list, deep nesting, duplication, and\n  large file. Each finding names the principle it hints at plus a suggested\n  refactor. All thresholds are overridable per call.\n\n## Resources\n\n- **`design://principles`** — SOLID, OOP pillars, DRY, KISS, YAGNI, meaningful\n  naming, and more.\n- **`design://patterns`** — the 23 GoF patterns, grouped creational /\n  structural / behavioral.\n- **`design://smells`** — what `check_smells` detects, its thresholds, and its\n  caveats.\n\n## Prompts\n\n- **`review_design`** `{ code, focus? }` — review a snippet against the\n  principles/patterns, grounded in `check_smells` + the resources.\n- **`apply_pattern`** `{ pattern, code }` — refactor a snippet to apply a named\n  pattern (and first judge whether it even fits).\n\n## Build from source\n\nFor local development, or to run a local checkout instead of the published\npackage:\n\n```bash\nnpm install\nnpm run build      # compiles src → build\nnpm start          # runs the stdio server\nnpm test           # builds, then runs the unit tests\nnpm run test:client  # end-to-end check against the built server\n```\n\nThen register it the same way as [Install](#install) above — both the\n`claude mcp add` command and the MCP-client-config form work — but point at\nyour local build instead of `npx`:\n\n```bash\nclaude mcp add software-design -- node /absolute/path/to/mcp-software-design/build/index.js\n```\n\n## Layout\n\n```\nsrc/\n  catalog.ts   # principles + 23 GoF patterns (data + lookup + markdown)\n  smells.ts    # pure, testable code-smell heuristics\n  scaffold.ts  # renders a pattern's participants into a skeleton\n  index.ts     # MCP wiring: resources, tools, prompts\ntest/\n  catalog.test.mjs   # catalog lookup + scaffolder\n  smells.test.mjs    # smell detectors (incl. string/comment edge cases)\n```\n\nThe `src/*.ts` logic modules are pure and side-effect-free, so they're unit\ntested directly against the compiled output — the server (`index.ts`) is only\nthin wiring on top.\n\n## License\n\nMIT\n",
  "bytes": 5173,
  "sha": "3cf7246e13e90b511311a9b8a4470889a423d3d34108f6f824a8089e22ea3b31",
  "repo_slug": "qwertymuzaffar/mcp-software-design",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_qwertymuzaffar_software_design_c20c691b/readme"
}