Memory Bank MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add memory-bank -- npx @diazstg/memory-bank-mcp
README.md

Persistent memory for AI assistants across sessions.

Memory Bank MCP

An MCP server that gives AI assistants persistent memory across sessions. It stores project context, decisions, and progress in structured markdown files — locally or on a remote server via SSH.

Related repos:

Quick Start

# Run directly (no install needed)
npx @diazstg/memory-bank-mcp

# Or install globally
npm install -g @diazstg/memory-bank-mcp

Via Smithery (Claude Desktop)

npx -y @smithery/cli install @diazstg/memory-bank-mcp --client claude

Configuration

Add to your editor's MCP config (.vscode/mcp.json, Cursor, Claude Desktop, etc.):

{
  "servers": {
    "memory-bank-mcp": {
      "command": "npx",
      "args": ["-y",
          "@diazstg/memory-bank-mcp",
          "--username",
          "your-username"
      ],
      "type": "stdio"
    }
  }
}

Tip: Including --username is highly recommended for proper progress tracking.

Common Options

npx @diazstg/memory-bank-mcp --username "github-user"   # Username for progress tracking (recommended)
npx @diazstg/memory-bank-mcp --mode code                # Set operational mode
npx @diazstg/memory-bank-mcp --path /my/project         # Custom project path
npx @diazstg/memory-bank-mcp --folder my-memory         # Custom folder name (default: memory-bank)
npx @diazstg/memory-bank-mcp --help                     # All options

Remote Server (SSH)

Store your Memory Bank on a remote server:

npx @diazstg/memory-bank-mcp --remote \
  --remote-user username \
  --remote-host example.com \
  --remote-path /home/username/memory-bank \
  --ssh-key ~/.ssh/id_ed25519

See Remote Server Guide.

How It Works

Memory Bank stores project context as markdown files in a memory-bank/ directory:

File Purpose
product-context.md Project overview, goals, tech stack
active-context.md Current state, ongoing tasks, next steps
progress.md Chronological record of updates
decision-log.md Decisions with context and rationale
system-patterns.md Architecture and code patterns

The AI assistant reads these files at the start of each session and updates them as work progresses, maintaining continuity across conversations.

MCP Tools

Tool Description
initialize_memory_bank Create a new Memory Bank
get_memory_bank_status Check current status
read_memory_bank_file Read a specific file
write_memory_bank_file Write/update a file
track_progress Add a progress entry
log_decision Record a decision
update_active_context Update current context
switch_mode Change operational mode
graph_upsert_entity Create or update a knowledge graph entity
graph_add_observation Add an observation to an entity
graph_link_entities Create a relation between entities
graph_search Search entities by name or type
graph_open_nodes Get full details of specific entities
graph_compact Compact the event log

Modes

Mode Focus
code Implementation and development
architect System design and planning
ask Q&A and information retrieval
debug Troubleshooting and diagnostics
test Testing and quality assurance

Modes can be set via CLI (--mode code), tool call (switch_mode), or .mcprules-[mode] files. See Usage Modes.

As a Library

import { MemoryBankServer } from "@diazstg/memory-bank-mcp";

const server = new MemoryBankServer();
server.run().catch(console.error);

Documentation

Topic Link
Getting Started npx usage, build with Bun, custom folder
Guides Remote server, usage modes, [status system](docs/guides/memory-bank-status-prefix.

Tools (14)

initialize_memory_bankCreate a new Memory Bank
get_memory_bank_statusCheck current status
read_memory_bank_fileRead a specific file
write_memory_bank_fileWrite/update a file
track_progressAdd a progress entry
log_decisionRecord a decision
update_active_contextUpdate current context
switch_modeChange operational mode
graph_upsert_entityCreate or update a knowledge graph entity
graph_add_observationAdd an observation to an entity
graph_link_entitiesCreate a relation between entities
graph_searchSearch entities by name or type
graph_open_nodesGet full details of specific entities
graph_compactCompact the event log

Environment Variables

--usernameUsername for progress tracking
--modeSet operational mode (code, architect, ask, debug, test)
--pathCustom project path

Configuration

claude_desktop_config.json
{"servers": {"memory-bank-mcp": {"command": "npx", "args": ["-y", "@diazstg/memory-bank-mcp", "--username", "your-username"], "type": "stdio"}}}

Try it

Initialize a new memory bank for this project.
Log a new decision regarding the choice of database for our backend.
Update the active context with the latest progress on the authentication module.
Search the knowledge graph for entities related to the user authentication flow.
Switch the operational mode to architect to begin planning the new feature.

Frequently Asked Questions

What are the key features of Memory Bank MCP?

Persistent memory storage across AI sessions. Structured markdown file management for project context. Knowledge graph support for entity relationships. Sequential thinking and progress tracking. Support for local and remote (SSH) storage.

What can I use Memory Bank MCP for?

Maintaining project continuity for long-term development tasks. Documenting architectural decisions and rationale for team visibility. Tracking project progress and status updates chronologically. Managing complex system patterns and code architecture. Storing project-specific context on remote servers for distributed teams.

How do I install Memory Bank MCP?

Install Memory Bank MCP by running: npx @diazstg/memory-bank-mcp

What MCP clients work with Memory Bank MCP?

Memory Bank MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Memory Bank MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare