Rlm Claude
Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper
Your Claude Code sessions forget everything after
/compact. RLM fixes that.
The Problem
Claude Code has a context window limit. When it fills up:
/compactwipes your conversation history- Previous decisions, insights, and context are lost
- You repeat yourself. Claude makes the same mistakes. Productivity drops.
The Solution
RLM is an MCP server that gives Claude Code persistent memory across sessions:
You: "Remember that the client prefers 500ml bottles"
→ Saved. Forever. Across all sessions.
You: "What did we decide about the API architecture?"
→ Claude searches its memory and finds the answer.
3 lines to install. 14 tools. Zero configuration.
Quick Install
Requirements: Python 3.10+ (download), Claude Code CLI
Via PyPI (recommended)
pip install mcp-rlm-server[all]
The hooks and templates ship inside the package. Since a pip install gives you no repo checkout, ask the package where they landed:
python -m mcp_server --hooks-dir # e.g. .../site-packages/mcp_server/hooks
python -m mcp_server --templates-dir
Point your ~/.claude/settings.json hook commands at that path (see
Hook Configuration), or copy them to ~/.claude/rlm/hooks/.
Via uv (fast, no global pollution)
uv tool install mcp-rlm-server[all] --python 3.12
Via Git (full install with hooks)
git clone https://github.com/EncrEor/rlm-claude.git
cd rlm-claude
./install.sh
Via Docker
docker build -t rlm-server .
# Or pull from registry (when published):
# docker pull ghcr.io/encreor/rlm-claude
Then configure Claude Code to use the Docker container (see Docker setup below).
Restart Claude Code. Done.
Upgrading from v0.9.0 or earlier
v0.9.1 moved the source code from mcp_server/ to src/mcp_server/ (PyPA best practice). A compatibility symlink is included so existing installations keep working, but we recommend re-running the installer:
cd rlm-claude
git pull
./install.sh # reconfigures the MCP server path
Your data (~/.claude/rlm/) is untouched. Only the server path is updated.
How It Works
┌─────────────────────────┐
│ Claude Code CLI │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ RLM MCP Server │
│ (14 tools) │
└────────────┬────────────┘
│
┌──────────────────┼──────────────────┐
│ │ │
┌─────────▼────────┐ ┌──────▼──────┐ ┌──────────▼─────────┐
│ Insights │ │ Chunks │ │ Retention │
│ (key decisions, │ │ (full conv │ │ (auto-archive, │
│ facts, prefs) │ │ history) │ │ restore, purge) │
└──────────────────┘ └─────────────┘ └────────────────────┘
Nothing Lost Silently
From the project's README.