MM

muhammadindar/mcp-rlm

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 4 forks 质量 74 趋势 18MIT

MCP-RLM is an open-source implementation of the Recursive Language Models (RLMs) architecture introduced by researchers at MIT CSAIL (Zhang et al., 2025)

概览

is an open-source implementation of the architecture introduced by researchers at MIT CSAIL (Zhang et al., 2025). It enables LLMs to process documents far beyond their context window limits through programmatic decomposition and recursive querying. - - Handle documents with millions of tokens - - OpenRouter, OpenAI, Anthropic, Ollama - - Two-tier architecture reduces costs by 70-80% - - Isolated chunk analysis prevents hallucinations - - Works with Claude Desktop, Cursor, etc. - - Mix and match LLM providers - - Dynamic code generation for query planning - - Use OpenRouter's free models MCP-RLM employs a that separates strategic planning from execution: The config.yaml file defines available LLM providers: Configure which models power each agent: Use Case Root Agent Sub Agent Provider Cost Free Tier mistral-small-3.1:free qwen-2.5-vl-7b:free OpenRouter $0 Best Performance claude-3.5-sonnet gpt-4o-mini Mixed $$ Cost Optimized gpt-4o gpt-4o-mini OpenAI $ Privacy First claude-3.

README

以下为原文 README 节选,完整内容请查看原文。


📋 Overview

MCP-RLM is an open-source implementation of the Recursive Language Models (RLMs) architecture introduced by researchers at MIT CSAIL (Zhang et al., 2025). It enables LLMs to process documents far beyond their context window limits through programmatic decomposition and recursive querying.

The Challenge

Traditional LLM Approach MCP-RLM Approach
❌ Limited to 4K-128K token context windows ✅ Handles 10M+ tokens seamlessly
❌ Context degradation (“lost in the middle”) ✅ Maintains accuracy through chunked analysis
❌ Expensive for long documents ($15/1M tokens) ✅ Cost-effective ($3/1M tokens, 80% savings)
❌ Single-pass processing bottleneck ✅ Parallel recursive decomposition

✨ Features


🏗 Architecture

MCP-RLM employs a two-tier agent system that separates strategic planning from execution:

graph TB
    subgraph Input
        A[User Query]
        B[Large Document10M+ tokens]
    end
    
    subgraph "Root Agent (Planner)"
        C[Analyze Metadata]
        D[Generate Strategy]
        E[Write Python Code]
    end
    
    subgraph "Execution Layer"
        F[Python REPL]
        G[Chunk Manager]
    end
    
    subgraph "Sub Agents (Workers)"
        H1[Worker 1]
        H2[Worker 2]
        H3[Worker N]
    end
    
    subgraph Output
        I[Aggregated Results]
        J[Final Answer]
    end
    
    A --> C
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G
    G --> H1
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "rlm-researcher": { "command": "/absolute/path/to/MCP-RLM/venv/bin/python", "args": ["/absolute/path/to/MCP-RLM/server.py"] } } }