memory-bank-mcp
by: alioshr
A Model Context Protocol (MCP) server implementation for remote memory bank management, inspired by Cline Memory Bank.
📌Overview
Purpose: To provide a centralized service for remote management of memory banks through the Model Context Protocol (MCP).
Overview: The Memory Bank MCP Server modernizes traditional file-based memory banks by centralizing their management, allowing for efficient and secure handling of multiple projects with a uniform structure.
Key Features:
-
Multi-Project Support
- Enables organization through project-specific directories and file structure enforcement while preventing path traversal.
-
Remote Accessibility
- Full implementation of the MCP protocol ensures type-safe operations with robust error handling and security through project isolation.
-
Core Operations
- Allows comprehensive operations such as reading, writing, and updating memory bank files, along with capabilities to list projects and validate existence efficiently.
Memory Bank MCP Server
A Model Context Protocol (MCP) server implementation for remote memory bank management, inspired by 1.
Overview
The Memory Bank MCP Server transforms traditional file-based memory banks into a centralized service that:
- Provides remote access to memory bank files via MCP protocol
- Enables multi-project memory bank management
- Maintains consistent file structure and validation
- Ensures proper isolation between project memory banks
Features
-
Multi-Project Support
- Project-specific directories
- File structure enforcement
- Path traversal prevention
- Project listing capabilities
- File listing per project
-
Remote Accessibility
- Full MCP protocol implementation
- Type-safe operations
- Proper error handling
- Security through project isolation
-
Core Operations
- Read/write/update memory bank files
- List available projects
- List files within projects
- Project existence validation
- Safe read-only operations
Installation
To install Memory Bank Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @alioshr/memory-bank-mcp --client claude
Quick Start
- Configure the MCP server in your settings
- Start using the memory bank tools in your AI assistant
Configuration
The memory bank MCP server needs to be configured in your Cline MCP settings file:
- For Cline extension:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- For Claude desktop app:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following configuration to your MCP settings:
{
"allpepper-memory-bank": {
"command": "npx",
"args": ["-y", "@allpepper/memory-bank-mcp"],
"env": {
"MEMORY_BANK_ROOT": "<path-to-bank>"
},
"disabled": false,
"autoApprove": [
"memory_bank_read",
"memory_bank_write",
"memory_bank_update",
"list_projects",
"list_project_files"
]
}
}
Configuration Details
MEMORY_BANK_ROOT
: Directory where project memory banks will be stored (e.g.,/path/to/memory-bank
)disabled
: Set tofalse
to enable the serverautoApprove
: List of operations that don't require explicit user approval
For Cursor
For Cursor, open the settings -> features -> add MCP server -> add the following:
env MEMORY_BANK_ROOT=<path-to-bank> npx -y @allpepper/memory-bank-mcp@latest
Development
# Install dependencies
npm install
# Build
npm run build
# Test
npm run test
# Watch mode
npm run dev
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Development Guidelines
- Use TypeScript for all new code
- Maintain type safety across the codebase
- Add tests for new features
- Update documentation as needed
- Follow existing code style and patterns
Testing
- Write unit tests for new features
- Include multi-project scenario tests
- Test error cases thoroughly
- Validate type constraints
- Mock filesystem operations appropriately
License
This project is licensed under the MIT License.