
该项目将Roo代码内存库系统的核心功能作为模型上下文协议(MCP)服务器实现。
概览
该项目实现了Roo代码内存库系统的核心功能,作为模型上下文协议(MCP)服务器。它允许AI助手通过使用结构化MCP工具与基于文件的内存库交互,维护项目会话间的上下文。 该MCP服务器提供以下工具: * : 创建内存银行/目录和标准.md文件(productContext.md、activeContext.md、progress.md、decisionLog.md、systemPatterns.md),并带有初始模板。* 输入:(可选){ “project_brief_content”: 字符串} * 输出: { “status”: “success” |“error”, “messages”?: string[], “message”?: string } * : 检查内存银行/目录是否存在,并列出其中的.md文件。* 输入: {} * 输出: { “exists”: boolean, “files”: string[] } * : 读取指定内存库文件的全部内容。* 输入: { “file_name”: 字符串 } * 输出: { “content”: 字符串 } 或错误对象。
概述(AI 翻译)
该项目实现了Roo代码内存库系统的核心功能,作为模型上下文协议(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:在指定文件下添加新的、带时间戳的条目,可选择性地在特定的标记下。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Roo Code Memory Bank MCP Server
This project implements the core functionality of the Roo Code Memory Bank system as a Model Context Protocol (MCP) server. It allows AI assistants to maintain project context across sessions by interacting with a file-based memory bank using structured MCP tools.
Features
This MCP server provides the following tools:
initialize_memory_bank: Creates thememory-bank/directory and standard.mdfiles (productContext.md,activeContext.md,progress.md,decisionLog.md,systemPatterns.md) with initial templates.- Input: (Optional)
{ "project_brief_content": string } - Output:
{ "status": "success" | "error", "messages"?: string[], "message"?: string }
- Input: (Optional)
check_memory_bank_status: Checks if thememory-bank/directory exists and lists the.mdfiles within it.- Input:
{} - Output:
{ "exists": boolean, "files": string[] }
- Input:
read_memory_bank_file: Reads the full content of a specified memory bank file.- Input:
{ "file_name": string } - Output:
{ "content": string }or error object.
- Input:
append_memory_bank_entry: Appends a new, timestamped entry to a specified file, optionally under a specific markdown header. Creates the file if it doesn’t exist.- Input:
{ "file_name": string, "entry": string, "section_header"?: string } - Output:
{ "status": "success" | "error", "message": string }
- Input:
Prerequisites
- Node.js (v18 or later recommended)
- npm (usually included with Node.js)
- An MCP client environment (like the one used by Cline) capable of managing and launching MCP servers.
Installation
- Clone the repository:
git clone https://github.com/IncomeStreamSurfer/roo-code-memory-bank-mcp-server.git cd roo-code-memory-bank-mcp-server - Install dependencies:
npm install - Build the project:
This compiles the TypeScript code into JavaScript in thenpm run builddist/directory.
Configuration (for Cline MCP Client)
To make this server available to your AI assistant (like Cline), you need to add its configuration to your MCP settings file (e.g., cline_mcp_settings.json).
Find the mcpServers object in your settings file and add the following entry:
{
"mcpServers": {
// ... other server configurations ...
"roo-code-memory-bank-mcp": {
"autoApprove": [
"initialize_memory_bank",
"check_memory_bank_status",
"read_memory_bank_file",
"append_memory_bank_entry"
],
"disabled": false,
"timeout": 60,
"command": "node", // Or "cmd.exe" with "/c node ..." on Windows if needed
"args": [
// IMPORTANT: Replace this path with the actual absolute path
// to the compiled index.js file on your system
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
// ... other server configurations ...
"roo-code-memory-bank-mcp": {
"autoApprove": [
"initialize_memory_bank",
"check_memory_bank_status",
"read_memory_bank_file",
"append_memory_bank_entry"
],
"disabled": false,
"timeout": 60,
"command": "node", // Or "cmd.exe" with "/c node ..." on Windows if needed
"args": [
// IMPORTANT: Replace this path with the actual absolute path
// to the compiled index.js file on your system
"/path/to/your/cloned/repo/roo-code-memory-bank-mcp-server/dist/index.js"
],
"env": {},
"transportType": "stdio"
}
// ... other server configurations ...
}
}