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.
git clone https://github.com/IncomeStreamSurfer/roo-code-memory-bank-mcp-server.git
cd roo-code-memory-bank-mcp-server
npm install
npm run build
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.
The server provides four main tools:
const status = await mcp.call("roo-code-memory-bank-mcp", "check_memory_bank_status", {});
if (!status.exists) {
await mcp.call("roo-code-memory-bank-mcp", "initialize_memory_bank", {
project_brief_content: "Description of the project goals and requirements."
});
}
const activeContext = await mcp.call("roo-code-memory-bank-mcp", "read_memory_bank_file", {
file_name: "activeContext.md"
});
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
});
The memory bank creates these standard files:
You can also create custom files by using the append_memory_bank_entry
tool with new filenames.
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.
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"
]
}
}
}
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.
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.