Skip to main content
Glama

Memory Bank MCP Server

Memory Bank MCP Server

A Model Context Protocol (MCP) server implementation for remote memory bank management, inspired by Cline Memory Bank.

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

This will set up the MCP server configuration automatically. Alternatively, you can configure the server manually as described in the Configuration section below.

Quick Start

  1. Configure the MCP server in your settings (see Configuration section below)
  2. 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. The location depends on your setup:

  • For Cline extension: ~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • For Roo Code VS Code extension: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/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 to false to enable the server
  • autoApprove: List of operations that don't require explicit user approval:
    • memory_bank_read: Read memory bank files
    • memory_bank_write: Create new memory bank files
    • memory_bank_update: Update existing memory bank files
    • list_projects: List available projects
    • list_project_files: List files within a project

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

Custom IA instructions

This section contains the instructions that should be pasted on the AI custom instructions, either for Cline, Claude or Cursor, or any other MCP client. You should copy and paste these rules. For reference, see custom-instructions.md which contains these rules.

Development

Basic development commands:

# Install dependencies npm install # Build the project npm run build # Run tests npm run test # Run tests in watch mode npm run test:watch # Run the server directly with ts-node for quick testing npm run dev

Running with Docker

  1. Build the Docker image:
    docker build -t memory-bank-mcp:local .
  2. Run the Docker container for testing:
    docker run -i --rm \ -e MEMORY_BANK_ROOT="/mnt/memory_bank" \ -v /path/to/memory-bank:/mnt/memory_bank \ --entrypoint /bin/sh \ memory-bank-mcp:local \ -c "ls -la /mnt/memory_bank"
  3. Add MCP configuration, example for Roo Code:
    "allpepper-memory-bank": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MEMORY_BANK_ROOT", "-v", "/path/to/memory-bank:/mnt/memory_bank", "memory-bank-mcp:local" ], "env": { "MEMORY_BANK_ROOT": "/mnt/memory_bank" }, "disabled": false, "alwaysAllow": [ "list_projects", "list_project_files", "memory_bank_read", "memory_bank_update", "memory_bank_write" ] }

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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 - see the LICENSE file for details.

Acknowledgments

This project implements the memory bank concept originally documented in the Cline Memory Bank, extending it with remote capabilities and multi-project support.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Provides a centralized MCP-based system for managing and accessing multi-project memory banks remotely, with features like project isolation, file structure validation, and type-safe operations.

  1. Overview
    1. Features
      1. Installation
        1. Quick Start
          1. Configuration
            1. Configuration Details
          2. For Cursor
            1. Custom IA instructions
              1. Development
                1. Running with Docker
              2. Contributing
                1. Development Guidelines
                2. Testing
              3. License
                1. Acknowledgments

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.
                    Last updated -
                    1
                    5
                    TypeScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A bridge between MCP Host applications and mem0 cloud service, specialized for project management with capabilities to store, retrieve, and search project information within a structured format.
                    Last updated -
                    6
                    Python
                  • -
                    security
                    A
                    license
                    -
                    quality
                    Provides MCP multi-cluster Kubernetes management and operations. It can be integrated as an SDK into your own project and includes nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.
                    Last updated -
                    122
                    Go
                    MIT License
                    • Linux
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    An MCP server that helps teams create, manage, and access structured project documentation through six core document types, leveraging AI to generate comprehensive project knowledge management.
                    Last updated -
                    5
                    21
                    97
                    TypeScript

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/alioshr/memory-bank-mcp'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server