The RLM MCP Server is a large-scale context processing tool based on the Recursive Language Model pattern. It allows Claude Code to process text of over 10 million tokens through external variables, avoiding directly inputting massive content into the prompt. Through the processes of loading, chunking, sub-querying, and aggregation, it supports automatic analysis and programmatic execution, and can connect to the Claude API or the local Ollama for free inference.
2.5 points
3.3K

What is the RLM MCP Server?

The RLM MCP Server is an intelligent analysis tool specifically designed to handle ultra-large-scale text. Based on the Recursive Language Model (RLM) pattern, it can process huge documents of over 10 million tokens, such as encyclopedias, large code repositories, and log files. Different from traditional methods, RLM stores large text as an external variable and analyzes it through intelligent chunking, parallel querying, and result aggregation, greatly improving processing efficiency and accuracy.

How to use the RLM MCP Server?

Users do not need to directly call the RLM tool. Simply submit a request to Claude to analyze a large file (e.g., 'Analyze this 2MB log file'), and Claude will automatically use the RLM tool in the background for processing and finally return the analysis results. The entire process is transparent to the user, and the operation is simple and intuitive.

Use Cases

RLM is particularly suitable for the following scenarios: • Analyze large log files to find error patterns • Process large reference documents such as encyclopedias • Audit security vulnerabilities in large code repositories • Analyze research papers or technical documents • Process large-scale data exported from databases • Any text analysis task that exceeds the context limit of conventional LLMs

Main Features

Intelligent Chunking Processing
Automatically detect the text type (code, log, document, etc.) and select the optimal chunking strategy (by line, character, or paragraph) to ensure that each chunk is within the processing capacity of the LLM.
Parallel Sub-query
Support parallel analysis of multiple chunks simultaneously, significantly improving processing speed, especially suitable for handling ultra-large-scale documents.
Recursive Analysis Capability
Support multi-layer recursive analysis. Sub-LLMs can continue to use the RLM tool for deeper analysis, suitable for complex document structures.
Multi-model Support
Support Claude Haiku (cloud) and Ollama local models. Users can choose paid or free inference services according to their needs.
Automatic Analysis Mode
Provide the rlm_auto_analyze tool to automatically complete type detection, chunking, querying, and result aggregation, simplifying the operation process.
Python Code Execution
Support the execution of Python code in a sandbox environment for deterministic analysis (e.g., regular matching, data extraction), and provide more accurate results in combination with AI inference.
Advantages
Powerful processing capability: Can handle ultra-large documents of over 10 million tokens, far exceeding the limit of conventional LLMs
Cost-effective: Use lightweight models (such as Haiku) to process chunks, which is more economical than using large models to process the entire document
Flexible configuration: Support cloud and local inference. Users can choose according to their needs
High degree of automation: Users only need to submit a request, and Claude will automatically call the RLM tool for processing
Accurate results: Avoid information loss through chunk analysis and result aggregation
Recursive analysis: Support multi-layer analysis, suitable for complex document structures
Limitations
Learning curve: Need to understand the basic concepts of RLM to fully utilize all functions
Complex configuration: Additional steps are required for local Ollama configuration
Recursive cost: Using cloud models for deep recursion may increase costs
Context management: Need to manually manage the loaded context to avoid excessive memory usage
Dependence on Claude: Currently mainly integrated with Claude Code, with limited support in other environments

How to Use

Install RLM
Clone the RLM repository and install the dependency packages
Configure Claude Code
Add RLM to the MCP server configuration of Claude Code
Enable Automatic Detection
Copy the configuration file and hooks to let Claude automatically recognize when to use RLM
Start Using
Directly submit a request to analyze a large file in Claude Code

Usage Examples

Analyze a Large Log File
Analyze a 2MB server log file to identify error patterns and frequencies
Process an Encyclopedia
Analyze an 11MB encyclopedia to extract relevant articles on a specific topic
Code Security Audit
Check the security vulnerabilities in a large code repository
Research Paper Analysis
Analyze multiple research papers to extract key findings and methodologies

Frequently Asked Questions

What is the difference between RLM and directly using Claude?
Is additional payment required to use RLM?
How to choose between cloud models and local models?
What types of files can RLM handle?
How long does it take to process an 11MB encyclopedia?
How to install and configure Ollama?
What is the difference between rlm_exec and rlm_sub_query?
Where is the data stored? Is it secure?

Related Resources

RLM GitHub Repository
The source code and latest version of the RLM MCP Server
RLM Research Paper
The original research paper on the Recursive Language Model (RLM)
Ollama Official Website
Local LLM running environment, supporting free inference
Claude Code Documentation
The official documentation for using Claude Code
Project Gutenberg
Free e-book resources, including test data such as encyclopedias
MCP Protocol Documentation
The official specification of the Model Context Protocol

Installation

Copy the following command to your Client for configuration
{
  "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"
      }
    }
  }
}

{
     "mcpServers": {
       "rlm": {
         "command": "uv",
         "args": ["run", "--directory", "/Users/your_username/projects/rlm", "python", "-m", "src.rlm_mcp_server"],
         "env": {
           "RLM_DATA_DIR": "/Users/your_username/.rlm-data",
           "OLLAMA_URL": "http://localhost:11434"
         }
       }
     }
   }
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

V
Vestige
Vestige is an AI memory engine based on cognitive science. By implementing 29 neuroscience modules such as prediction error gating, FSRS - 6 spaced repetition, and memory dreaming, it provides long - term memory capabilities for AI. It includes a 3D visualization dashboard and 21 MCP tools, runs completely locally, and does not require the cloud.
Rust
6.2K
4.5 points
M
Moltbrain
MoltBrain is a long-term memory layer plugin designed for OpenClaw, MoltBook, and Claude Code, capable of automatically learning and recalling project context, providing intelligent search, observation recording, analysis statistics, and persistent storage functions.
TypeScript
5.7K
4.5 points
B
Bm.md
A feature-rich Markdown typesetting tool that supports multiple style themes and platform adaptation, providing real-time editing preview, image export, and API integration capabilities
TypeScript
5.1K
5 points
S
Security Detections MCP
Security Detections MCP is a server based on the Model Context Protocol that allows LLMs to query a unified security detection rule database covering Sigma, Splunk ESCU, Elastic, and KQL formats. The latest version 3.0 is upgraded to an autonomous detection engineering platform that can automatically extract TTPs from threat intelligence, analyze coverage gaps, generate SIEM-native format detection rules, run tests, and verify. The project includes over 71 tools, 11 pre-built workflow prompts, and a knowledge graph system, supporting multiple SIEM platforms.
TypeScript
6.4K
4 points
P
Paperbanana
Python
7.5K
5 points
F
Finlab Ai
FinLab AI is a quantitative financial analysis platform that helps users discover excess returns (alpha) in investment strategies through AI technology. It provides a rich dataset, backtesting framework, and strategy examples, supporting automated installation and integration into mainstream AI programming assistants.
6.1K
4 points
B
Better Icons
An MCP server and CLI tool that provides search and retrieval of over 200,000 icons, supports more than 150 icon libraries, and helps AI assistants and developers quickly obtain and use icons.
TypeScript
6.4K
4.5 points
A
Assistant Ui
assistant - ui is an open - source TypeScript/React library for quickly building production - grade AI chat interfaces, providing composable UI components, streaming responses, accessibility, etc., and supporting multiple AI backends and models.
TypeScript
6.6K
5 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
20.5K
4.5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
24.7K
4.3 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
72.9K
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
35.6K
5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
32.6K
5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
63.9K
4.5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
22.1K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
49.6K
4.8 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2026AIBase