Roo Code Memory Bank MCP server

Implements a file-based project context management system that maintains persistent memory across sessions through structured markdown files for tracking progress, decisions, and system patterns.
Back to servers
Provider
IncomeStreamSurfer
Release date
Apr 29, 2025
Language
TypeScript
Stats
39 stars

The Roo Code Memory Bank MCP Server implements an AI-accessible context management system for maintaining project information across sessions. It provides structured tools that allow AI assistants to read from and write to a file-based memory bank, ensuring important context is preserved over time.

Installation

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (included with Node.js)
  • An MCP client environment capable of managing MCP servers

Step-by-Step Installation

  1. Clone the repository:
git clone https://github.com/IncomeStreamSurfer/roo-code-memory-bank-mcp-server.git
cd roo-code-memory-bank-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration for MCP Client

To make this server available to your AI assistant, add its configuration to your MCP settings file (e.g., cline_mcp_settings.json):

{
  "mcpServers": {
    "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",
      "args": [
        "/path/to/your/cloned/repo/roo-code-memory-bank-mcp-server/dist/index.js"
      ],
      "env": {},
      "transportType": "stdio"
    }
  }
}

Important: Replace /path/to/your/cloned/repo/ with the actual absolute path to the repository on your system, using the appropriate path separators for your operating system.

Using the MCP Server

Available Tools

The server provides four main tools:

  • initialize_memory_bank: Creates the memory bank directory and standard files
  • check_memory_bank_status: Verifies if the memory bank exists and lists available files
  • read_memory_bank_file: Retrieves content from a specific memory bank file
  • append_memory_bank_entry: Adds new, timestamped entries to memory bank files

Basic Workflow

  1. Check if the memory bank exists:
const status = await mcp.call("roo-code-memory-bank-mcp", "check_memory_bank_status", {});
  1. Initialize the memory bank if needed:
if (!status.exists) {
  await mcp.call("roo-code-memory-bank-mcp", "initialize_memory_bank", {
    project_brief_content: "Description of the project goals and requirements."
  });
}
  1. Read content from a memory bank file:
const activeContext = await mcp.call("roo-code-memory-bank-mcp", "read_memory_bank_file", {
  file_name: "activeContext.md"
});
  1. Add a new entry to the memory bank:
await mcp.call("roo-code-memory-bank-mcp", "append_memory_bank_entry", {
  file_name: "progress.md",
  entry: "Completed the initial research phase and identified key requirements.",
  section_header: "Research Phase" // Optional
});

Memory Bank File Structure

The memory bank creates these standard files:

  • productContext.md: Overall project goals, requirements, and constraints
  • activeContext.md: Current focus areas and immediate next steps
  • progress.md: Timeline of achievements and milestones
  • decisionLog.md: Record of key decisions and their rationales
  • systemPatterns.md: Patterns, conventions, and architectural decisions

You can also create custom files by using the append_memory_bank_entry tool with new filenames.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later