Get the FREE Ultimate OpenClaw Setup Guide →

rlm-claude

Recursive Language Models for Claude Code - Infinite memory solution inspired by MIT CSAIL paper

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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):

  1. Install the MCP RLM server package from PyPI with all extras to enable semantic features: pip install mcp-rlm-server[all]

  2. 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:

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

Sponsor this space

Reach thousands of developers