EncrEor/rlm-claude

View on GitHub ↗

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

39 ★9 forksPythonUpdated 1mo ago

What you need to know

MCP server giving Claude Code infinite memory across sessions, with 14 tools, zero configuration and auto-save before /compact. Two memory systems (Insights and Chunks), hybrid BM25 + semantic search, smart retention lifecycle (active -> archive -> purge), multi-project organization and sub-agent skills. Inspired by the MIT RLM paper.

Install

pip install mcp-rlm-server[all]
uv tool install mcp-rlm-server[all] --python 3.12
git clone && ./install.sh (full install with hooks)
docker build -t rlm-server . (Docker)

Usage

  • rlm_recall(importance='critical', limit=50) at session startup to load universal rules
  • rlm_remember('...', category='decision', importance='critical', tags='...') to save insights
  • rlm_chunk(...) to save conversation segments; rlm_peek / rlm_grep / rlm_search to retrieve
  • rlm_retention_preview / rlm_retention_run / rlm_restore for archive lifecycle
  • /rlm-analyze and /rlm-parallel sub-agent skills

Key features

  • Auto-save snapshot before /compact via PreCompact hook
  • 14 tools: remember, recall, forget, status, chunk, peek, grep, search, list_chunks, sessions, domains, retention_preview, retention_run, restore
  • Hybrid BM25 + cosine semantic search with Model2Vec (default) or FastEmbed providers
  • 3-zone retention lifecycle with immunity system (critical tags, frequent access, keywords)
  • Multi-project organization with auto-detection from git/working directory
  • Typed chunks (snapshot/session/debug), FR/EN/JA i18n
  • Security: path traversal prevention, atomic writes, file locking, SHA-256 dedup

Best for

Claude Code users who lose context after /compact and want persistent searchable memory

Caveats

  • Requires Python 3.10+ and Claude Code CLI
  • Hooks must be configured in ~/.claude/settings.json
  • Semantic search requires optional extra installs
Clients: Claude Code
Documentation ↗

Reviewed 2026-08-11

Topics

ai-toolsclaudeclaude-codecontext-managementinfinite-memoryllm-memorymcpmcp-servermodel-context-protocol
Stars
39★
Forks
9
Language
Python
License
MIT
Created
2026-01-18
Last push
2026-08-01