RLM Claude
Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper
What is RLM Claude?
RLM Claude is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to recursive language models for claude code - infinite memory solution inspired by mit csail paper
Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper
This server falls under the Knowledge & Memory and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Recursive Language Models for Claude Code - Infinite memory
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx rlm-claudeConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use RLM Claude
RLM (Recursive Language Models) for Claude Code is an infinite memory MCP server that solves the context window limitation by persisting conversation history, decisions, and insights across sessions using a hybrid BM25 + semantic search index. Inspired by MIT CSAIL research on recursive memory architectures, it hooks into Claude Code's /compact event to automatically snapshot conversations before context is lost, and exposes 14 tools for storing, recalling, chunking, searching, and managing a structured memory store at ~/.claude/rlm/context/. It supports multi-project organization, fuzzy search with typo tolerance, and a retention lifecycle that archives old memories to gzip.
Prerequisites
- Python 3.12 or later installed
- uv or pip installed
- Claude Code (claude CLI) installed and configured
- The mcp-rlm-server package installed with all optional dependencies
Install the mcp-rlm-server package
Install mcp-rlm-server with all optional dependencies for full embedding and search support.
pip install mcp-rlm-server[all]
# Or with uv (recommended):
uv tool install mcp-rlm-server[all] --python 3.12Register the MCP server with Claude Code
Add rlm-server to your Claude Code MCP configuration.
claude mcp add rlm-server -- python3 -m mcp_serverRun the installer for automatic hook setup (alternative)
If you prefer the guided installer that also configures the PreCompact hook automatically, clone the repo and run the install script.
git clone https://github.com/EncrEor/rlm-claude.git
cd rlm-claude
./install.shConfigure optional environment variables
Optionally set RLM_LANG for hook message language (en, fr, ja), RLM_CONTEXT_DIR for a custom storage path, or RLM_EMBEDDING_PROVIDER to switch between model2vec and fastembed.
Test memory storage and recall
Ask Claude to remember a key decision and then recall it in a new session to verify end-to-end memory persistence is working.
RLM Claude Examples
Client configuration
Claude Desktop JSON config for the RLM server (use after pip install).
{
"mcpServers": {
"rlm-server": {
"command": "python3",
"args": ["-m", "mcp_server"],
"env": {
"RLM_LANG": "en",
"RLM_CONTEXT_DIR": "~/.claude/rlm/context/",
"RLM_EMBEDDING_PROVIDER": "model2vec"
}
}
}
}Prompts to try
Example prompts for storing, recalling, searching, and managing memory across sessions.
- "Remember that we always deploy to VPS before merging to main — this is a critical deployment rule"
- "Recall all critical decisions about our deployment workflow"
- "Search memory for anything related to API authentication"
- "Show me the current memory status and how many chunks are stored"
- "Chunk this conversation with summary 'API v2 design decisions' and tags api,architecture"
- "Forget the old database migration notes from last month"Troubleshooting RLM Claude
rlm_recall returns empty results even though memories were saved
Ensure the RLM_CONTEXT_DIR path is consistent between sessions. If you changed the default path, set the same RLM_CONTEXT_DIR environment variable in your MCP config. Also verify the embedding provider is available: run python3 -c "import model2vec" to check.
PreCompact hook does not fire automatically on /compact
Run the ./install.sh script from the cloned repository — it sets up the hooks.PreCompact configuration in your Claude Code settings.json automatically. Manual hook setup requires adding the pre_compact_chunk.py hook command to ~/.claude/settings.json.
Installation fails with missing dependency errors
Use pip install mcp-rlm-server[all] (with the [all] extras) to include all optional dependencies like fastembed and model2vec. On Python 3.11 or earlier, upgrade to Python 3.12 as required by the package.
Frequently Asked Questions about RLM Claude
What is RLM Claude?
RLM Claude is a Model Context Protocol (MCP) server that recursive language models for claude code - infinite memory solution inspired by mit csail paper It connects AI assistants to external tools and data sources through a standardized interface.
How do I install RLM Claude?
Follow the installation instructions on the RLM Claude GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with RLM Claude?
RLM Claude works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is RLM Claude free to use?
Yes, RLM Claude is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
RLM Claude Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to RLM Claude? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up RLM Claude in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use RLM Claude?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.