RLM Claude

v1.0.0Knowledge & Memorystable

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

ai-toolsclaudeclaude-codecontext-managementinfinite-memory
Share:
35
Stars
0
Downloads
0
Weekly
0/5

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

Maintain infinite memory for Claude Code applications.
Store and retrieve context beyond token limits.
Enable long-running AI projects with persistent memory.
EncrEor

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx rlm-claude

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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

Register the MCP server with Claude Code

Add rlm-server to your Claude Code MCP configuration.

claude mcp add rlm-server -- python3 -m mcp_server
3

Run 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.sh
4

Configure 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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "rlm-claude": { "command": "npx", "args": ["-y", "rlm-claude"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides