How nighttrek/software-planning-mcp works
Project type and purpose
• This is not a web frontend. It’s a backend “Model Context Protocol” (MCP) server written in Node.js/TypeScript.
• It exposes a set of “tools” (start_planning, add_todo, etc.) to any MCP‑compliant client (e.g., Claude Desktop).
• Its purpose is to orchestrate interactive planning sessions: receiving commands, managing todo items, scoring complexity, and persisting plans.
File structure
• Top level:
• Dockerfile, smithery.yaml – deployment/config files for containerization and MCP registration
• package.json, pnpm-lock.yaml, tsconfig.json – build and dependency configs
• src/ – TypeScript source code
• src/index.ts – the entrypoint that registers all tools and handles the MCP lifecycle
• src/prompts.ts – defines question templates and prompt logic
• src/storage.ts – encapsulates persistence (in memory, file system, or database)
• src/types.ts – shared type definitions for request and data models
README for additional insights
• Lists all “tools” the server offers, their inputs and outputs
• Shows how the client invokes these tools via client.callTool(…)
• Describes build, install, and configuration steps (how MCP picks up this server)
Main components
a. MCP Client (e.g., Claude Desktop)
b. MCP Server – Node.js process
• Controller Layer (index.ts)
• Prompt Service (prompts.ts)
• Storage Service (storage.ts)
• Types / DTO layer (types.ts)
c. Persistence Layer (in-memory cache or file-based JSON, or external database if added later)
d. Configuration (smithery.yaml, Dockerfile)
e. (Optional) External AI / NLP engine if prompts are forwarded
Relationships and interactions
• Client → MCP Server: sends tool invocation requests
• MCP Server (Controller) → Prompt Service: to generate or format messages/templates
• MCP Server (Controller) → Storage Service: to create, update, retrieve, or delete todos and plans
• Storage Service → (Persistent store)
• MCP Server → Client: returns tool results (todos list, confirmation, plan text)
Architectural patterns and design principles
• Command pattern: each tool maps to a function in index.ts
• Service separation: prompts and storage logic are factored into separate modules
• Type safety: DTOs and request parameters defined in types.ts
• Config-driven deployment: smithery.yaml registers commands, Dockerfile enables containerization
Relevant technologies/frameworks
• Node.js + TypeScript
• pnpm for package management
• MCP runtime (Smithery CLI integration)
• Potential file‑based or in‑memory persistence (no external DB in current scope)