{"repo":"yogthos/Matryoshka","free":true,"listed":false,"github":"https://github.com/yogthos/Matryoshka","clone":"git clone https://github.com/yogthos/Matryoshka.git","description":"MCP server for token-efficient large document analysis via the use of REPL state","language":"TypeScript","stars":146,"topics":["ai-assistant","document-analysis","llm","llm-tools","mcp","mcp-server","model-context-protocol"],"license":"Apache-2.0","category":"mcp-servers","readme_excerpt":"Matryoshka Process documents 100x larger than your LLM's context window—without vector databases or chunking heuristics. The Problem LLMs have fixed context windows. Traditional solutions (RAG, chunking) lose information or miss connections across chunks. RLM takes a different approach: the model reasons about your query and outputs symbolic commands that a logic engine executes against the document. Based on the Recursive Language Models paper. How It Works Unlike traditional approaches where an LLM writes arbitrary code, RLM uses Nucleus —a constrained symbolic language based on S-expressions. The LLM outputs Nucleus commands, which are parsed, type-checked, and executed by Lattice , our logic engine. Why this works better than code generation: 1. Reduced entropy - Nucleus has a rigid grammar with fewer valid outputs than JavaScript 2. Fail-fast validation - Parser rejects malformed commands before execution 3. Safe execution - Lattice only executes known operations, no arbitrary code 4. Small model friendly - 7B models handle symbolic grammars better than freeform code Architecture The Nucleus DSL The LLM outputs commands in the Nucleus DSL—an S-expression language designed for document analysis: Feature availability by execution path Matryoshka has two execution paths and not every primitive works in both: Feature runRLM (CLI / programmatic) lattice-mcp (MCP server) --- --- --- (grep …) , (filter …) , (map …) , etc. ✅ ✅ (llm query …) , (llm batch …) ✅ ✅ via MCP sampling p","default_branch":null,"files":null,"tree":[],"storefront":"/r/yogthos","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yogthos/Matryoshka/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}