A Model Context Protocol (MCP) server implementing the Memory Bank system based on the cursor-memory-bank custom modes.
This MCP server provides structured workflow tools for managing software development projects through different complexity levels and phases:
- VAN Mode: Project initialization and complexity assessment
- PLAN Mode: Detailed implementation planning
- CREATIVE Mode: Design and architecture decisions
- IMPLEMENT Mode: Code implementation and execution
- REFLECT+ARCHIVE Mode: Project reflection and documentation archiving
- Initialize new projects with complexity levels 1-4
- Set up Memory Bank file structure
- Determine appropriate next mode based on complexity
- Generate implementation plans based on complexity level
- Create detailed step-by-step approaches
- Identify components requiring creative phases
- Architecture design with multiple options analysis
- Algorithm design with complexity considerations
- UI/UX design with accessibility and usability focus
- Structured documentation of design decisions
- Phase-based implementation for complex projects
- Integration testing and documentation
- Progress tracking and status updates
- Implementation reflection and lessons learned
- Complete project archiving
- Preparation for next task initialization
npm install
npm run buildnpm startInitialize a project with complexity assessment.
Parameters:
complexity(required): "1" | "2" | "3" | "4"- Level 1: Quick bug fix
- Level 2: Simple enhancement
- Level 3: Complex feature
- Level 4: Major feature/refactor
task_description(optional): Description of the task
Example:
{
"complexity": "3",
"task_description": "Implement user authentication system"
}Create detailed implementation plan.
Parameters:
complexity(optional): Complexity level (reads from tasks.md if not provided)
Perform design and architecture work.
Parameters:
component_name(required): Name of component requiring designcreative_type(required): "architecture" | "algorithm" | "uiux"requirements(required): Requirements and constraints
Example:
{
"component_name": "user_auth_system",
"creative_type": "architecture",
"requirements": "Secure authentication with JWT tokens, OAuth integration, and role-based access control"
}Execute implementation based on plan.
Parameters:
phase(optional): Implementation phase for complex projectscomplexity(optional): Complexity level (reads from tasks.md if not provided)
Reflect on implementation and archive documentation.
Parameters:
action(required): "reflect" | "archive"- "reflect": Review and document implementation experience
- "archive": Create final documentation archive
The server creates and manages several files in the .memory_bank directory:
tasks.md: Main task tracking and statusactiveContext.md: Current context and focusprogress.md: Implementation progress trackingimplementation-plan.md: Detailed implementation planreflection.md: Post-implementation reflectioncreative-{component}.md: Creative phase documentationdocs/archive/project-archive.md: Final project archive
# 1. Initialize project
van_mode(complexity="3", task_description="Build REST API")
# 2. Create implementation plan
plan_mode()
# 3. Design complex components (if Level 3-4)
creative_mode(component_name="api_architecture", creative_type="architecture", requirements="...")
# 4. Implement the solution
implement_mode(phase="core_components")
# 5. Reflect and archive
reflect_archive_mode(action="reflect")
reflect_archive_mode(action="archive")- Level 1: Quick bug fixes - Direct implementation, minimal planning
- Level 2: Simple enhancements - Streamlined planning, straightforward implementation
- Level 3: Complex features - Comprehensive planning, creative phases may be required
- Level 4: Major features/refactors - Detailed architecture, phased implementation, creative design required
# Development mode with auto-reload
npm run dev
# Build TypeScript
npm run build
# Run compiled server
npm startIf you encounter ERR_MODULE_NOT_FOUND errors when running the server, ensure:
- Build First: Always run
npm run buildbeforenpm start - ES Module Imports: All imports in source files use
.jsextensions - TypeScript Config: The
tsconfig.jsonis configured for ES modules with"module": "ESNext"
# Clean build if issues persist
rm -rf dist/
npm run build
npm startIf the server can't create the .memory_bank directory:
# Ensure write permissions in the working directory
chmod 755 .This MCP server can be integrated with:
- Claude Desktop: Add to MCP server configuration
- Cursor IDE: Use with MCP client capabilities
- VS Code: Through MCP extensions
- Custom clients: Any MCP-compatible application
This implementation is based on the excellent cursor-memory-bank project by vanzan01, adapted for use as an MCP server.
MIT