Roo Code Memory Bank
STDIOMCP server allowing AI assistants to maintain project context across sessions using memory bank.
MCP server allowing AI assistants to maintain project context across sessions using memory bank.
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.
This MCP server provides the following tools:
initialize_memory_bank
: Creates the memory-bank/
directory and standard .md
files (productContext.md
, activeContext.md
, progress.md
, decisionLog.md
, systemPatterns.md
) with initial templates.
{ "project_brief_content": string }
{ "status": "success" | "error", "messages"?: string[], "message"?: string }
check_memory_bank_status
: Checks if the memory-bank/
directory exists and lists the .md
files within it.
{}
{ "exists": boolean, "files": string[] }
read_memory_bank_file
: Reads the full content of a specified memory bank file.
{ "file_name": string }
{ "content": string }
or error object.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.
{ "file_name": string, "entry": string, "section_header"?: string }
{ "status": "success" | "error", "message": string }
git clone https://github.com/IncomeStreamSurfer/roo-code-memory-bank-mcp-server.git cd roo-code-memory-bank-mcp-server
npm install
This compiles the TypeScript code into JavaScript in thenpm run build
dist/
directory.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 "/path/to/your/cloned/repo/roo-code-memory-bank-mcp-server/dist/index.js" ], "env": {}, "transportType": "stdio" } // ... other server configurations ... } }
Important: Replace /path/to/your/cloned/repo/
with the correct absolute path to where you cloned the repository on your machine. Ensure the path separator is correct for your operating system (e.g., use backslashes \
on Windows).
You don't typically need to run the server manually. The MCP client (like Cline) will automatically start the server using the command
and args
specified in the configuration file when one of its tools is called for the first time.
If you want to test it manually, you can run npm start
from the project directory.
The AI assistant interacts with the server using the defined tools. The typical workflow involves:
check_memory_bank_status
).initialize_memory_bank
).read_memory_bank_file
) to gain context.append_memory_bank_entry
) as decisions are made or progress occurs.The memory-bank/
directory will be created in the same directory where the server process is started (which should be the root of this project directory when launched via the MCP client configuration).
Set these instructions inside Roo
You must use MCPs where needed
I have a specific MCP flow:
Use context7 to find any relevant documentation pieces you will need for this process, ensure to feed any relevant knoweldege to any relevant subtasks - use context7 at all times to do research on important documentation if you're unsure of something
Use google maps mcp in order to search for
Utilize the roo-code-memory-bank-mcp
server to maintain project context:
check_memory_bank_status
.exists: true
), use read_memory_bank_file
for relevant files (e.g., productContext.md
, activeContext.md
) to load the current project context.append_memory_bank_entry
to record the information in the appropriate file (decisionLog.md
, progress.md
, etc.), ensuring context persistence.initialize_memory_bank
if appropriate for the project.