rlm-claude
Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper
claude mcp add --transport stdio encreor-rlm-claude python -m mcp_rlm_server
How to use
RLM for Claude Code provides persistent memory across sessions by exposing a suite of MCP tools that manage memories, chunks, and retention. The server offers capabilities to remember decisions, recall context, and organize conversation history with structured categories and importance levels. Key tools include rlm_remember for saving insights, rlm_recall for keyword or category-based retrieval, and rlm_chunk along with rlm_peek and rlm_grep for managing and querying conversation history. You can also list sessions and domains with rlm_sessions and rlm_domains, and control data lifecycle with retention commands like rlm_retention_preview and rlm_retention_run, plus restoration via rlm_restore. For analysis workflows, there are sub-agent utilities such as /rlm-analyze and /rlm-parallel for focused chunk analysis and parallel processing. The MCP server is designed to plug into Claude Code so you can auto-save before context loss and search across memory using a strong hybrid of BM25 and semantic cosine similarity. To use it, run the server via the Python module, configure Claude Code to point at the container or host where the server is exposed, and then start issuing the rlm_* commands from Claude Code or via the MCP integration interface.
How to install
Prerequisites:
- Python 3.10+ (recommended; 3.12 is also supported via uv)
- Claude Code CLI available on your system
Installation steps (recommended path):
-
Install the MCP RLM server package from PyPI with all extras to enable semantic features: pip install mcp-rlm-server[all]
-
Verify installation and run the server (example): python -m mcp_rlm_server
or configure your environment to run via your preferred launcher
Alternative installation methods:
-
uv-based (no global pollution): uv tool install mcp-rlm-server[all] --python 3.12
-
From source (full install with hooks): git clone https://github.com/EncrEor/rlm-claude.git cd rlm-claude ./install.sh
Docker (optional):
- Build the container image that runs the MCP server:
docker build -t rlm-server .
Or pull from registry when published:
docker pull ghcr.io/encreor/rlm-claude
Configure Claude Code to use the running MCP server (see Docker setup in the repository) and restart Claude Code to complete the integration.
Additional notes
Tips and notes:
- The server exposes 14 memory/tools workflows (insights, chunks, retention, sessions, domains, search, grep, etc.).
- Auto-save is triggered before Claude Code context loss (via /compact hook).
- If upgrading from older versions, re-run the installer to ensure server paths are updated while keeping user data intact.
- Environment variables you may encounter or adjust include RLM_EMBEDDING_PROVIDER (e.g., 'default' for Model2Vec or 'fastembed' for the FastEmbed provider) and related embedding configuration.
- When using Docker, ensure Claude Code is pointed to the containerized endpoint and that networking between Claude Code and the container is allowed.
- For best results, start with the default embedding provider and switch to alternatives only if you need improved semantic accuracy and can tolerate longer startup times.
Related MCP Servers
mcp-config-manager
Manage MCP server configs across Claude, Gemini & other AI systems. Interactive CLI for server enable/disable, preset management & config sync.
memcp
A persistent memory MCP server for Claude Code - Recursive Language Model integration for Claude Code inspired by MIT CSAIL paper
web-research-assistant
MCP server for SearXNG with 13 production-ready tools for web search, package info, GitHub integration, error translation, API docs, and more
web-developer
A Model Context Protocol (MCP) server that provides web development tools for AI assistants. Enables browser automation, DOM inspection, network monitoring, and console analysis through Playwright.
cortivium
Create persistent AI tools through conversation. Ghost Skills turn plain-language instructions into real MCP tool registrations that trigger reliably — every time.
cc-session-search
MCP server for searching and analyzing Claude Code conversation history