Handles 10M+ token contexts with chunking, sub-queries, and local Ollama inference.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Handle massive contexts (10M+ tokens) with chunking, sub-queries, and free local inference via Ollama.
Based on the Recursive Language Model pattern. Inspired by richardwhiteii/rlm.

Instead of feeding massive contexts directly into the LLM:
Option 1: PyPI (Recommended)
With Optional Extras:
Option 2: Claude Desktop One-Click
Download the .mcpb from Releases and double-click to install.
Option 3: From Source
Add to ~/.claude/.mcp.json (Claude Code) or claude_desktop_config.json (Claude Desktop):
| Tool | Purpose |
|---|---|
rlm_system_check | Check system requirements β verify macOS, Apple Silicon, 16GB+ RAM, Homebrew |
rlm_setup_ollama | Install via Homebrew β managed service, auto-updates, requires Homebrew |
rlm_setup_ollama_direct | Install via direct download β no sudo, fully headless, works on locked-down machines |
rlm_ollama_status | Check Ollama availability β detect if free local inference is available |
| Tool | Purpose |
|---|---|
rlm_auto_analyze | One-step analysis β auto-detects type, chunks, and queries |
rlm_load_context | Load context as external variable |
rlm_inspect_context | Get structure info without loading into prompt |
rlm_chunk_context | Chunk by lines/chars/paragraphs |
rlm_get_chunk | Retrieve specific chunk |
rlm_filter_context | Filter with regex (keep/remove matching lines) |
rlm_exec | Execute Python code against loaded context (sandboxed) |
rlm_sub_query | Make sub-LLM call on chunk |
rlm_sub_query_batch | Process multiple chunks in parallel |
rlm_store_result | Store sub-call result for aggregation |
rlm_get_results | Retrieve stored results |
rlm_list_contexts | List all loaded contexts |
rlm_auto_analyzeFor most use cases, just use rlm_auto_analyze β it handles everything automatically:
What it does automatically:
Supported goals:
| Goal | Description |
|---|---|
summarize | Summarize content purpose and key points |
find_bugs | Identify errors, issues, potential problems |
extract_structure | List functions, classes, schema, headings |
security_audit | Find vulnerabilities and security issues |
answer:<question> | Answer a custom question about the content |
rlm_execFor deterministic pattern matching and data extraction, use rlm_exec to run Python code directly against a loaded context. This is closer to the paper's REPL approach and provides full control over analysis logic.
Tool: rlm_exec
Purpose: Execute arbitrary Python code against a loaded context in a sandboxed subprocess.
Parameters:
code (required): Python code to execute. Set the result variable to capture output.context_name (required): Name of a previously loaded context.timeout (optional, default 30): Maximum execution time in seconds.Features:
context variablere, json, collectionsExample β Finding patterns in a loaded context:
Example Response:
Example β Extracting structured data:
When to use rlm_exec vs rlm_sub_query:
| Use Case | Tool | Why |
|---|---|---|
| Extract all dates, IDs, amounts | rlm_exec | Regex is deterministic and fast |
| Find security vulnerabilities | rlm_sub_query | Requires reasoning and context |
| Parse JSON/XML structure | rlm_exec | Standard libraries work perfectly |
| Summarize themes or tone | rlm_sub_query | Natural language understanding needed |
| Count word frequencies | rlm_exec | Simple computation, no AI needed |
| Answer "Why did X happen?" | rlm_sub_query | Requires inference and reasoning |
Tip: For large contexts, combine both β use rlm_exec to filter/extract, then rlm_sub_query for semantic analysis of filtered results.
For enhanced security, integrate code-firewall-mcp to filter dangerous code patterns before execution:
When installed, rlm_exec can automatically check code against a blacklist of known dangerous patterns (e.g., os.system(), eval(), subprocess with shell=True). The firewall uses structural similarity matching β normalizing code to its skeleton and comparing against blacklisted patterns via embeddings.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/massive-context-mcp)<a href="https://allmcps.com/mcp/massive-context-mcp"><img src="https://allmcps.com/api/badge/massive-context-mcp?style=directory" alt="Massive Context MCP on AllMCPs" /></a>