Memory Bank MCP Server
存储库 MCP 服务器
受Cline Memory Bank启发,用于远程存储库管理的模型上下文协议 (MCP) 服务器实现。
概述
记忆库 MCP 服务器将传统的基于文件的记忆库转变为集中式服务,其功能如下:
通过 MCP 协议提供对存储库文件的远程访问
支持多项目存储库管理
保持一致的文件结构和验证
确保项目存储库之间适当隔离
Related MCP server: agent-context-substrate
特征
多项目支持
项目特定目录
文件结构强制执行
路径遍历预防
项目列表功能
每个项目的文件列表
远程访问
完整的 MCP 协议实现
类型安全操作
正确的错误处理
通过项目隔离实现安全
核心运营
读取/写入/更新存储库文件
列出可用项目
列出项目中的文件
项目存在验证
安全的只读操作
安装
要通过Smithery自动为 Claude Desktop 安装 Memory Bank Server:
npx -y @smithery/cli install @alioshr/memory-bank-mcp --client claude这将自动设置 MCP 服务器配置。或者,您可以按照下面“配置”部分中的说明手动配置服务器。
快速入门
在您的设置中配置 MCP 服务器(请参阅下面的配置部分)
开始使用 AI 助手中的存储库工具
配置
存储库 MCP 服务器需要在您的 Cline MCP 设置文件中进行配置。具体位置取决于您的设置:
对于 Cline 扩展:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json对于 Roo Code VS Code 扩展:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json对于 Claude 桌面应用程序:
~/Library/Application Support/Claude/claude_desktop_config.json
将以下配置添加到您的 MCP 设置中:
{
"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"
]
}
}配置详细信息
MEMORY_BANK_ROOT:存储项目存储库的目录(例如,/path/to/memory-bank)disabled:设置为false以启用服务器autoApprove:不需要明确用户批准的操作列表:memory_bank_read:读取存储库文件memory_bank_write:创建新的存储库文件memory_bank_update:更新现有的存储库文件list_projects:列出可用的项目list_project_files:列出项目中的文件
对于光标
对于 Cursor,打开设置 -> 功能 -> 添加 MCP 服务器 -> 添加以下内容:
env MEMORY_BANK_ROOT=<path-to-bank> npx -y @allpepper/memory-bank-mcp@latest自定义 IA 指令
本节包含应粘贴到 AI 自定义指令(适用于 Cline、Claude、Cursor 或任何其他 MCP 客户端)上的说明。请复制并粘贴这些规则。有关参考,请参阅包含这些规则的custom-instructions.md文件。
发展
基本开发命令:
# 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使用 Docker 运行
构建 Docker 镜像:
docker build -t memory-bank-mcp:local .运行Docker容器进行测试:
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"添加 MCP 配置,以 Roo 代码为例:
"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" ] }
贡献
欢迎贡献!请按以下步骤操作:
分叉存储库
创建功能分支(
git checkout -b feature/amazing-feature)提交您的更改(
git commit -m 'Add amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
开发指南
所有新代码均使用 TypeScript
维护整个代码库的类型安全
添加新功能测试
根据需要更新文档
遵循现有的代码风格和模式
测试
为新功能编写单元测试
包括多项目场景测试
彻底测试错误案例
验证类型约束
适当地模拟文件系统操作
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
该项目实现了Cline Memory Bank中最初记录的存储库概念,并通过远程功能和多项目支持对其进行了扩展。
Available Tools
5 toolslist_project_filesA
List all files within a specific project
Inputs: projectName (required).
list_projectsB
List all projects in the memory bank
Inputs: no named parameters.
memory_bank_readB
Read a memory bank file for a specific project
Inputs: fileName (required), projectName (required).
memory_bank_updateC
Update an existing memory bank file for a specific project
Inputs: content (required), fileName (required), projectName (required).
memory_bank_writeC
Create a new memory bank file for a specific project
Inputs: content (required), fileName (required), projectName (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource and action: listing projects, listing files within a project, reading a file, creating a file, and updating a file. There is no overlap or ambiguity between tools.
Names mix two conventions: 'list_projects' and 'list_project_files' use verb-first snake_case, while 'memory_bank_read', 'memory_bank_write', and 'memory_bank_update' use object-first with a modifier. The pattern is inconsistent but still readable.
Five tools is well-scoped for a memory bank server, covering the essential operations without unnecessary bloat. The count feels right for the domain.
The server covers list, read, create, and update of memory bank files, but it is missing a delete operation. This is a notable gap in CRUD coverage, though agents can work around it by archiving or overwriting files.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
A MCP server built for developers enabling Git based project management with project and personal…
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Remote MCP service for evidence-backed work memory and continuity.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for MongoDB-powered memory bank management with multi-project isolation, version control, and real-time statistics.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to maintain and query project memory independently of the underlying model, with versioned, auditable storage and multi-stage retrieval through a single MCP gateway.MIT
- AlicenseCqualityBmaintenanceProvides a deterministic MCP server that orchestrates projects across web, backend, games, AI, payments, fiscal, and infrastructure domains, with safe file writing, audit logging, and framework-aware context routing.88MIT
- AlicenseNot gradedqualityCmaintenanceEnables multiple MCP-compatible AI clients to share persistent, versioned project knowledge across sessions with conflict-safe updates, provenance, hybrid retrieval, stale-memory handling, and context-budgeted recall.MIT
Appeared in Searches
- MCP server for remembering key project decisions, tracking framework and settings
- Information about memory banks
- A tool for managing or utilizing cache
- A memory-efficient MCP server with vectorized memory bank synchronization
- File system requirements: mounted directory, persistent state, and full R/W access