存储库 MCP 服务器
受Cline Memory Bank启发,用于远程存储库管理的模型上下文协议 (MCP) 服务器实现。
概述
记忆库 MCP 服务器将传统的基于文件的记忆库转变为集中式服务,其功能如下:
- 通过 MCP 协议提供对存储库文件的远程访问
- 支持多项目存储库管理
- 保持一致的文件结构和验证
- 确保项目存储库之间适当隔离
特征
- 多项目支持
- 项目特定目录
- 文件结构强制执行
- 路径遍历预防
- 项目列表功能
- 每个项目的文件列表
- 远程访问
- 完整的 MCP 协议实现
- 类型安全操作
- 正确的错误处理
- 通过项目隔离实现安全
- 核心运营
- 读取/写入/更新存储库文件
- 列出可用项目
- 列出项目中的文件
- 项目存在验证
- 安全的只读操作
安装
安装
要通过Smithery自动为 Claude Desktop 安装 Memory Bank Server:
这将自动设置 MCP 服务器配置。或者,您可以按照下面“配置”部分中的说明手动配置服务器。
快速入门
- 在您的设置中配置 MCP 服务器(请参阅下面的配置部分)
- 开始使用 AI 助手中的存储库工具
配置
存储库 MCP 服务器需要在您的 Cline MCP 设置文件中进行配置。具体位置取决于您的设置:
- 对于 Cline 扩展:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- 对于 Claude 桌面应用程序:
~/Library/Application Support/Claude/claude_desktop_config.json
将以下配置添加到您的 MCP 设置中:
配置详细信息
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 服务器 -> 添加以下内容:
自定义 IA 指令
本节包含应粘贴到 AI 自定义指令(适用于 Cline、Claude、Cursor 或任何其他 MCP 客户端)上的说明。请复制并粘贴这些规则。有关参考,请参阅包含这些规则的custom-instructions.md文件。
发展
贡献
欢迎贡献!请按以下步骤操作:
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
开发指南
- 所有新代码均使用 TypeScript
- 维护整个代码库的类型安全
- 添加新功能测试
- 根据需要更新文档
- 遵循现有的代码风格和模式
测试
- 为新功能编写单元测试
- 包括多项目场景测试
- 彻底测试错误案例
- 验证类型约束
- 适当地模拟文件系统操作
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
该项目实现了Cline Memory Bank中最初记录的存储库概念,并通过远程功能和多项目支持对其进行了扩展。
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
提供基于 MCP 的集中式系统,用于远程管理和访问多项目存储库,具有项目隔离、文件结构验证和类型安全操作等功能。
- Overview
- Features
- Installation
- Quick Start
- Configuration
- For Cursor
- Custom IA instructions
- Development
- Contributing
- License
- Acknowledgments
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA custom Memory MCP Server that acts as a cache for Infrastructure-as-Code information, allowing users to store, summarize, and manage notes with a custom URI scheme and simple resource handling.Last updated -231PythonMIT License
- AsecurityAlicenseAqualityAn 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 -14TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that allows Claude and other LLMs to manage persistent memories across conversations through text file storage, enabling commands to add, search, delete and list memory entries.Last updated -2TypeScript
- -securityFlicense-qualityAn MCP server that connects to the Resource Hub, allowing centralized configuration and management of tools and resources across different MCP environments.Last updated -2JavaScript