Integrations
Manages a project memory bank using Markdown files, providing tools to initialize, read, and append to structured context files that maintain project knowledge across sessions.
Serves as the runtime environment for the memory bank system, allowing file operations to create, check, read, and update the contextual knowledge base.
Roo 代码记忆库 MCP 服务器
该项目将Roo Code 记忆库系统的核心功能实现为模型上下文协议 (MCP) 服务器。它允许 AI 助手通过使用结构化 MCP 工具与基于文件的记忆库进行交互,从而跨会话维护项目上下文。
特征
该 MCP 服务器提供以下工具:
initialize_memory_bank
:使用初始模板创建memory-bank/
目录和标准.md
文件(productContext.md
、activeContext.md
、progress.md
、decisionLog.md
、systemPatterns.md
)。- 输入:(可选)
{ "project_brief_content": string }
- 输出:
{ "status": "success" | "error", "messages"?: string[], "message"?: string }
- 输入:(可选)
check_memory_bank_status
:检查memory-bank/
目录是否存在并列出其中的.md
文件。- 输入:
{}
- 输出:
{ "exists": boolean, "files": string[] }
- 输入:
read_memory_bank_file
:读取指定存储库文件的全部内容。- 输入:
{ "file_name": string }
- 输出:
{ "content": string }
或错误对象。
- 输入:
append_memory_bank_entry
:将新的带时间戳的条目附加到指定文件,可选地附加到指定的 Markdown 标头下。如果文件不存在,则创建该文件。- 输入:
{ "file_name": string, "entry": string, "section_header"?: string }
- 输出:
{ "status": "success" | "error", "message": string }
- 输入:
先决条件
- Node.js(建议使用 v18 或更高版本)
- npm(通常包含在 Node.js 中)
- MCP 客户端环境(如 Cline 使用的环境)能够管理和启动 MCP 服务器。
安装
- 克隆存储库:Copy
- 安装依赖项:Copy
- 构建项目:这会将Copy
dist/
目录中的 TypeScript 代码编译为 JavaScript。
配置(适用于 Cline MCP 客户端)
为了使您的 AI 助手(如 Cline)可以使用此服务器,您需要将其配置添加到您的 MCP 设置文件(例如, cline_mcp_settings.json
)中。
在您的设置文件中找到mcpServers
对象并添加以下条目:
**重要提示:**请将/path/to/your/cloned/repo/
替换为您在计算机上克隆仓库的正确绝对路径。请确保路径分隔符与您的操作系统匹配(例如,在 Windows 上使用反斜杠\
)。
运行服务器
通常情况下,您无需手动运行服务器。MCP 客户端(例如 Cline)会在首次调用其工具时,使用配置文件中指定的command
和args
自动启动服务器。
如果您想手动测试,您可以从项目目录运行npm start
。
用法
AI助手使用定义的工具与服务器交互。典型的工作流程包括:
- 检查存储库状态(
check_memory_bank_status
)。 - 如果需要则初始化(
initialize_memory_bank
)。 - 读取相关文件(
read_memory_bank_file
)以获取上下文。 - 在做出决策或出现进展时附加条目(
append_memory_bank_entry
)。
memory-bank/
目录将在服务器进程启动的同一目录中创建(通过 MCP 客户端配置启动时,该目录应该是该项目目录的根目录)。
自定义指令
在 Roo 中设置这些指令
您必须在需要的地方使用 MCP
我有一个特定的 MCP 流程:
使用 context7 查找此过程所需的任何相关文档,确保将任何相关信息提供给任何相关子任务 - 如果您不确定某些内容,请始终使用 context7 研究重要文档 使用谷歌地图 mcp 搜索 + - 这将使我们能够找到完成任务所需的基本业务 使用勇敢搜索 mcp 查找要抓取的 URL 使用 fetch mcp 与 fetch_txt 和 fetch_markdown 在页面上查找文本和图像,以便转换为 JSON 文件并创建深入的内容 使用 openrouter 搜索来查找主题、评论等的一般情绪。
利用roo-code-memory-bank-mcp
服务器来维护项目上下文:
- 在任务或重要子任务开始时,使用
check_memory_bank_status
。 - 如果内存库存在(
exists: true
),则使用read_memory_bank_file
获取相关文件(例如productContext.md
、activeContext.md
)来加载当前项目上下文。 - 将这种重要的背景纳入到您的计划和执行中。
- 在做出重大决策、进度更新或架构变更时,使用
append_memory_bank_entry
将信息记录在适当的文件(decisionLog.md
、progress.md
等)中,确保上下文持久性。 - 如果存储库不存在,请考虑使用适合项目的
initialize_memory_bank
。
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
通过在存储库目录中组织的 markdown 文件中存储和检索结构化信息,使 AI 助手能够在会话之间维护持久的项目上下文。
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol implementation that enables AI assistants to interact with markdown documentation files, providing capabilities for document management, metadata handling, search, and documentation health analysis.Last updated -1434611TypeScriptMIT License
- AsecurityAlicenseAqualityProvides tools for interacting with Targetprocess, a project management and agile planning platform, enabling AI assistants to search, create, and update project entities with proper validation.Last updated -5TypeScriptMIT License
- AsecurityAlicenseAqualityMemory 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.Last updated -1511113TypeScriptMIT License
- -securityAlicense-qualityA server for managing project documentation and context across Claude AI sessions through global and branch-specific memory banks, enabling consistent knowledge management with structured JSON document storage.Last updated -3177TypeScriptMIT License