Atlas / MCP servers / richardwhiteii / RLM

RLMBLOCK

mcp/richardwhiteii/rlm

Recursive Language Model patterns for Claude Code — handle massive contexts (10M+ tokens) by treating them as external variables

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
12 11r · 1w · 0d
Transport
stdio
License
MIT
Stars
49
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

Recursive Language Model patterns for Claude Code — handle massive contexts (10M+ tokens) by treating them as external variables.

Based on: https://arxiv.org/html/2512.24601v1

How Users Interact

You don't call RLM tools directly. You ask Claude to analyze large files, and Claude uses RLM behind the scenes.

Example:

  • You say: "Analyze this 2MB log file for errors"
  • Claude uses RLM tools internally
  • You get: "I found 3 error patterns: database timeouts (47), auth failures (23)..."

Core Idea

Instead of feeding massive contexts directly into the LLM:

  1. Load context as external variable (stays out of prompt)
  2. Inspect structure programmatically
  3. Chunk strategically (lines, chars, or paragraphs)
  4. Sub-query recursively on chunks
  5. Aggregate results for final synthesis

Quick Start

Installation

git clone https://github.com/richardwhiteii/rlm.git
cd rlm
uv sync

Or with pip:

python -m venv .venv
source .venv/bin/activate
pip install -e .

Configure for Claude Code

Option 1: Quick Setup (recommended)

# From the rlm directory
claude mcp add rlm -s user -- uv run --directory "$(pwd)" python -m src.rlm_mcp_server

This adds RLM globally (-s user) so it's available in all your Claude Code sessions.

Option 2: With Ollama (free local inference)

First set environment variables, then add:

export RLM_DATA_DIR="$HOME/.rlm-data"
export OLLAMA_URL="http://localhost:11434"

claude mcp add rlm -s user -- uv run --directory "$(pwd)" python -m src.rlm_mcp_server

Option 3: Manual JSON config

Add to ~/.claude/.mcp.json for full control:

{
"mcpServers": {
"rlm": {
"command": "uv",
"args": ["run", "--directory", "/path/to/rlm", "python", "-m", "src.rlm_mcp_server"],
"env": {
"RLM_DATA_DIR": "/path/to/.rlm-data",
"OLLAMA_URL": "http://localhost:11434"
}
}
}
}
Note: Replace `/path/t
Read from source at commit 0bf6fd0958f2OBSERVED · 2026-10-08
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add rlm-mcp-server -- uvx rlm-mcp-server
claude-desktop
{
  "mcpServers": {
    "rlm-mcp-server": {
      "command": "uvx",
      "args": [
        "rlm-mcp-server"
      ]
    }
  }
}
03

Exposed tools (12)

11 read · 1 write · 0 destructive.

ToolRiskDescription
rlm_auto_analyzereadAutomatically detect content type and analyze with optimal chunking strategy. One-step analysis for common tasks.
rlm_chunk_contextreadChunk a loaded context by strategy. Returns chunk metadata, not full content.
rlm_execwriteExecute Python code against a loaded context in a sandboxed subprocess. Set result variable for output.
rlm_filter_contextreadFilter context using regex/string operations. Creates a new filtered context.
rlm_get_chunkreadGet a specific chunk by index. Use after chunking to retrieve individual pieces.
rlm_get_resultsreadRetrieve stored results for aggregation.
rlm_inspect_contextreadInspect a loaded context - get structure info without loading full content into prompt.
rlm_list_contextsreadList all loaded contexts and their metadata.
rlm_load_contextreadLoad a large context as an external variable. Returns metadata without the content itself.
rlm_store_resultreadStore a sub-call result for later aggregation.
rlm_sub_queryreadMake a sub-LLM call on a chunk or filtered context. Core of recursive pattern. Set max_depth > 0 to allow the sub-LLM to use RLM tools for hierarchical decomposition.
rlm_sub_query_batchreadProcess multiple chunks in parallel. Respects concurrency limit to manage system resources. Set max_depth > 0 to allow sub-LLMs to use RLM tools for hierarchical decomposition.
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (2 observation(s))
Shell
declared (1 observation(s))
Dependencies
pinned
Secrets in source
none-found

Findings (3)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/rlm_mcp_server.py:892
"python": "Find security vulnerabilities: SQL injection, command injection, eval(), exec(), unsafe deserialization, hardcoded secrets, path traversal.",
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
INFOInventory / provenance · inv.oversize · CWE-1104
docs/arxiv-2512.24601v1.pdf
docs/arxiv-2512.24601v1.pdf
Why it matters. 8250587 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
docs/encyclopedia/merged_encyclopedia.txt
docs/encyclopedia/merged_encyclopedia.txt
Why it matters. 11091851 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 0bf6fd0958f2full audit observations/trust-audit/mcp-server/richardwhiteii__rlm.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-080bf6fd0958f2BLOCKD69first audit
06

Questions

What is the RLM MCP server?

Recursive Language Model patterns for Claude Code — handle massive contexts (10M+ tokens) by treating them as external variables

What tools does RLM expose?

12 in total: 11 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is RLM safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.

What credentials does RLM need?

No credential environment variables were found in its source, so it appears to need none.

How does RLM run?

It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as rlm-mcp-server.

How current is this page?

The grade is for one exact copy of the source (0bf6fd0958f2), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement