remote memory bank file reading with project isolation
Implements read-only access to memory bank files through MCP protocol with path traversal prevention and project-scoped file retrieval. Uses clean architecture layers (Presentation → Domain → Data Access → Infrastructure) to translate MCP read requests into filesystem operations, validating project and file paths against a root directory to prevent unauthorized access. Returns file contents as structured responses with error handling for missing or inaccessible files.
Unique: Implements project-scoped file access through clean architecture layers with explicit path validation at the Presentation layer, preventing directory traversal attacks while maintaining type-safe operations across domain, data access, and infrastructure layers — a pattern not typically found in simpler file-serving implementations
vs alternatives: Provides centralized, project-isolated memory access via MCP protocol whereas direct filesystem access or simple HTTP servers lack project boundaries and MCP integration
memory bank file creation with validation and path safety
Enables creation of new memory bank files through MCP protocol with comprehensive path validation, project isolation, and file structure enforcement. The Presentation layer validates input parameters, the Domain layer enforces business rules (e.g., valid project and file paths), and the Infrastructure layer performs actual filesystem write operations. Prevents path traversal attacks by validating that resolved paths remain within the target project directory.
Unique: Validates file paths at multiple architectural layers (Presentation validates input format, Domain enforces business rules, Infrastructure performs resolved-path verification) rather than single-point validation, ensuring defense-in-depth against path traversal and invalid project references
vs alternatives: Safer than direct filesystem APIs or simple file servers because validation occurs across clean architecture layers with explicit project isolation, whereas alternatives typically validate only at entry point
data access layer abstraction with filesystem implementation
Defines data access interfaces that abstract filesystem operations, allowing domain layer to request file operations without knowing implementation details. The Data Access layer specifies interfaces for read, write, update, and list operations, and the Infrastructure layer provides concrete filesystem implementations using Node.js fs module. This abstraction enables testing domain logic with mock implementations and potentially swapping filesystem for other storage backends (cloud storage, databases) without changing domain code.
Unique: Implements explicit data access interfaces rather than direct filesystem calls in domain logic, enabling mock implementations for testing and potential storage backend swapping without domain changes
vs alternatives: More testable than direct filesystem calls because domain logic depends on interfaces rather than concrete implementations, enabling mock-based unit testing without filesystem I/O
infrastructure layer filesystem operations with error handling
Implements concrete filesystem operations using Node.js fs module to fulfill data access layer interfaces, handling file reads, writes, updates, and directory listings with proper error handling and path resolution. Performs actual filesystem I/O, manages file permissions, and translates filesystem errors into domain-level error responses. Includes path resolution to normalize paths and prevent directory traversal, and handles edge cases like missing files, permission errors, and invalid paths.
Unique: Implements filesystem operations as concrete implementations of data access interfaces rather than scattered throughout application, enabling centralized error handling and potential future storage backend swapping
vs alternatives: More maintainable than scattered filesystem calls because all I/O is centralized in Infrastructure layer, whereas ad-hoc filesystem calls throughout the codebase are harder to test and modify
environment-based configuration with memory_bank_root
Configures memory bank root directory through MEMORY_BANK_ROOT environment variable, enabling deployment flexibility without code changes. The server reads this variable at startup to determine where all project directories are located, allowing different deployments (development, staging, production) to use different filesystem locations. Supports Docker deployment where the environment variable can be set via container environment or volume mounts.
Unique: Uses environment variable for configuration rather than config files or hardcoded paths, enabling containerized deployments and infrastructure-as-code patterns without code changes
vs alternatives: More flexible than hardcoded paths because environment variables enable different deployments to use different storage locations, whereas config files require per-environment copies
type-safe operation definitions with input validation
Defines type-safe operation schemas for each MCP tool with explicit input parameters, output types, and validation rules. Each operation specifies required parameters (project_id, file_path, contents), their types (string, etc.), and validation constraints. The Presentation layer validates incoming requests against these schemas before passing to domain logic, ensuring type safety and preventing invalid inputs from reaching business logic. Supports MCP tool definition format with parameter descriptions and types.
Unique: Implements explicit type-safe operation definitions in MCP tool schemas rather than implicit parameter handling, enabling compile-time type checking and runtime validation against defined schemas
vs alternatives: More robust than untyped parameter handling because schema definitions provide compile-time type checking and runtime validation, whereas ad-hoc parameter handling is error-prone
memory bank file updating with content replacement
Provides in-place update capability for existing memory bank files through MCP protocol, replacing entire file contents while maintaining project isolation and path safety. Uses the same clean architecture pattern as file creation but targets existing files, with validation ensuring the file exists before update and the resolved path remains within project boundaries. Supports overwriting memory bank entries with new content from AI agents.
Unique: Distinguishes update from create operations at the Domain layer, enforcing existence checks before modification and using the same path validation infrastructure, providing semantic clarity that update is not idempotent with create
vs alternatives: Clearer semantics than generic write operations because it explicitly validates file existence and signals intent, whereas simple overwrite APIs don't distinguish between creation and modification
project enumeration and discovery via mcp
Lists all available projects in the memory bank root directory through MCP protocol, enabling clients to discover project structure without filesystem access. Implements read-only enumeration at the Presentation layer that queries the Infrastructure layer's filesystem operations to return project directories, with implicit filtering to exclude non-directory entries and hidden files. Supports multi-project management by allowing clients to discover which projects are available before accessing their files.
Unique: Implements project discovery as a dedicated MCP tool rather than embedding it in file operations, allowing clients to discover available projects before attempting file access — a pattern that improves UX for multi-project systems
vs alternatives: Provides explicit project discovery via MCP protocol whereas filesystem-based approaches require clients to understand directory structure or use separate APIs
+6 more capabilities