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 as well as a knowledge graph and sequential thinking for better memory storage.
README
Memory Bank MCP
<a href="https://glama.ai/mcp/servers/@diaz3618/memory-bank-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@diaz3618/memory-bank-mcp/badge" /> </a>
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:
- HTTP + Postgres + Redis variant → diaz3618/memory-bank-mcp-http — Docker deployment with HTTP transport
- VS Code Extension → diaz3618/Memory-Bank-VSCode-Ext — sidebar UI and GitHub Copilot integration
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
--usernameis 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, debug MCP |
| Integrations | VS Code/Copilot, Claude Code, Cursor, Cline, Roo Code, generic MCP |
| Reference | MCP protocol, rules format, file naming |
| Development | Architecture, testing, logging |
Alternative: HTTP + PostgreSQL + Redis
The feature/http-postgres-redis-supabase branch provides a cloud-native variant that replaces stdio/local-filesystem with HTTP Streamable MCP transport, PostgreSQL (via Supabase) for storage, and Redis for caching. It is deployed exclusively via Docker and is not published to npm. See the branch README for setup instructions.
Contributing
See CONTRIBUTING.md.
License
See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。