Aakarsh S/memory-bank-mcp
Built by Metorial, the integration platform for agentic AI.
Aakarsh S/memory-bank-mcp
Server Summary
Store information
Retrieve data
Track context
Support for remote connections
Manage user sessions
A Model Context Protocol (MCP) server for managing Memory Banks, allowing AI assistants to store and retrieve information across sessions. Now with remote server support!
Memory Bank Server provides a set of tools and resources for AI assistants to interact with Memory Banks. Memory Banks are structured repositories of information that help maintain context and track progress across multiple sessions.
By default, Memory Bank uses a memory-bank
directory in the root of your project. When you specify a project path using the --path
option, the Memory Bank will be created or accessed at /memory-bank
.
You can customize the name of the Memory Bank folder using the --folder
option. For example, if you set --folder custom-memory
, the Memory Bank will be created or accessed at /custom-memory
.
For more details on customizing the folder name, see Custom Memory Bank Folder Name.
For more details, see Memory Bank Bug Fixes.
To install Memory Bank for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @aakarsh-sasi/memory-bank-mcp --client claude
# Install from npm
npm install @aakarsh-sasi/memory-bank-mcp
# Or install globally
npm install -g @aakarsh-sasi/memory-bank-mcp
# Or run directly with npx (no installation required)
npx @aakarsh-sasi/memory-bank-mcp
You can run Memory Bank MCP directly without installation using npx:
# Run with default settings
npx @aakarsh-sasi/memory-bank-mcp
# Run with specific mode
npx @aakarsh-sasi/memory-bank-mcp --mode code
# Run with custom project path
npx @aakarsh-sasi/memory-bank-mcp --path /path/to/project
# Run with custom folder name
npx @aakarsh-sasi/memory-bank-mcp --folder custom-memory-bank
# Run with remote server
npx @aakarsh-sasi/memory-bank-mcp --remote --remote-user username --remote-host example.host.com --remote-path /home/username/memory-bank
# Show help
npx @aakarsh-sasi/memory-bank-mcp --help
For more detailed information about using npx, see npx-usage.md.
Memory Bank MCP now supports storing your Memory Bank on a remote server via SSH. This allows you to:
To set up SSH key authentication for the remote server:
Generate a new SSH key pair (if you don't already have one):
# Using modern Ed25519 algorithm (recommended)
ssh-keygen -t ed25519 -C "[email protected]"
# OR using RSA if required for compatibility
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Start the SSH agent and add your key:
# Start the agent
eval "$(ssh-agent -s)"
# Add your key
ssh-add ~/.ssh/id_ed25519 # or ~/.ssh/id_rsa if you used RSA
Copy your public key to the remote server:
# Easiest method (if available)
ssh-copy-id [email protected]
# Alternative: manually copy your public key
cat ~/.ssh/id_ed25519.pub # copy the output
Then paste the key into the ~/.ssh/authorized_keys
file on the remote server.
Test your connection:
ssh [email protected]
You should be able to log in without a password.
For more detailed SSH key setup instructions, see our SSH Keys Guide.
To use remote server mode, you need to provide the following parameters:
npx @aakarsh-sasi/memory-bank-mcp --remote \
--ssh-key ~/.ssh/your_ssh_key \
--remote-user username \
--remote-host example.host.com \
--remote-path /home/username/memory-bank
By default, the SSH key is assumed to be at ~/.ssh/your_ssh_key
. You can specify a different key using the --ssh-key
option.
# Using with a server at example.host.com
npx @aakarsh-sasi/memory-bank-mcp --remote \
--remote-user username \
--remote-host example.host.com \
--remote-path /home/username/memory-bank
Cursor is an AI-powered code editor that supports the Model Context Protocol (MCP). To configure Memory Bank MCP in Cursor:
Use Memory Bank MCP with npx:
No need to install the package globally. You can use npx directly:
# Verify npx is working correctly
npx @aakarsh-sasi/memory-bank-mcp --help
Open Cursor Settings:
Configure the MCP Server:
@aakarsh-sasi/memory-bank-mcp --mode code
(or other mode as needed)For remote server:
@aakarsh-sasi/memory-bank-mcp --mode code --remote --remote-user username --remote-host example.host.com --remote-path /home/username/memory-bank
Save and Activate:
Verify Connection:
For detailed instructions and advanced usage with Cursor, see cursor-integration.md.
Once configured, you can interact with Memory Bank MCP in Cursor through AI commands:
/mcp memory-bank-mcp initialize_memory_bank path=./memory-bank
/mcp memory-bank-mcp track_progress action="Feature Implementation" description="Implemented feature X"
/mcp memory-bank-mcp log_decision title="API Design" context="..." decision="..."
/mcp memory-bank-mcp switch_mode mode=code
Memory Bank MCP supports different operational modes to optimize AI interactions for specific tasks:
Code Mode 👨💻
npx @aakarsh-sasi/memory-bank-mcp --mode code
Architect Mode 🏗️
npx @aakarsh-sasi/memory-bank-mcp --mode architect
Ask Mode ❓
npx @aakarsh-sasi/memory-bank-mcp --mode ask
Debug Mode 🐛
npx @aakarsh-sasi/memory-bank-mcp --mode debug
Test Mode ✅
npx @aakarsh-sasi/memory-bank-mcp --mode test
You can switch modes in several ways:
When starting the server:
npx @aakarsh-sasi/memory-bank-mcp --mode architect
During a session:
memory-bank-mcp switch_mode mode=debug
In Cursor:
/mcp memory-bank-mcp switch_mode mode=test
Using .clinerules files:
Create a .clinerules-[mode]
file in your project to automatically switch to that mode when the file is detected.
Memory Bank MCP is built on the Model Context Protocol (MCP), which enables AI assistants to interact with external tools and resources. Here's how it works:
Memory Bank: A structured repository of information stored as markdown files:
product-context.md
: Overall project information and goalsactive-context.md
: Current state, ongoing tasks, and next stepsprogress.md
: History of project updates and milestonesdecision-log.md
: Record of important decisions with context and rationalesystem-patterns.md
: Architecture and code patterns used in the projectMCP Server: Provides tools and resources for AI assistants to interact with Memory Banks:
Mode System: Supports different operational modes:
code
: Focus on code implementationask
: Focus on answering questionsarchitect
: Focus on system designdebug
: Focus on debugging issuestest
: Focus on testingMemory Banks use a standardized structure to organize information:
This project follows Semantic Versioning and uses Conventional Commits for commit messages. The version is automatically bumped and a changelog is generated based on commit messages when changes are merged into the main branch.
BREAKING CHANGE
or !:
)feat:
or feat(scope):
)For the complete history of changes, see the CHANGELOG.md file.
# Initialize a Memory Bank
memory-bank-mcp initialize_memory_bank path=./memory-bank
# Track progress
memory-bank-mcp track_progress action="Feature Implementation" description="Implemented feature X"
# Log a decision
memory-bank-mcp log_decision title="API Design" context="..." decision="..."
# Switch mode
memory-bank-mcp switch_mode mode=code
import { MemoryBankServer } from "@aakarsh-sasi/memory-bank-mcp";
// Create a new server instance
const server = new MemoryBankServer();
// Start the server
server.run().catch(console.error);
Please see CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Memory Bank MCP implements a status prefix system that provides immediate visibility into the operational state of the Memory Bank:
Every response from an AI assistant using Memory Bank MCP begins with one of these status indicators:
[MEMORY BANK: ACTIVE]
: The Memory Bank is available and being used to provide context-aware responses[MEMORY BANK: INACTIVE]
: The Memory Bank is not available or not properly configured[MEMORY BANK: UPDATING]
: The Memory Bank is currently being updated (during UMB command execution)This system ensures users always know whether the AI assistant is operating with full context awareness or limited information.
For more details, see Memory Bank Status Prefix System.