Matryoshka
by yogthos
Overview
Processes large documents beyond LLM context windows using a Recursive Language Model (RLM) that executes symbolic commands for iterative document analysis.
Installation
npx matryoshka-rlm "What is the total of all sales values?" ./report.txtEnvironment Variables
- DEEPSEEK_API_KEY
Security Notes
The server's core functionality involves executing LLM-generated code, albeit within a constrained symbolic language (Nucleus) that is interpreted by a logic engine (Lattice) or compiled to JavaScript and run in a Node.js `vm.Context` sandbox. The `vm.Context` is explicitly noted in the source code (`src/sandbox.ts`) as providing 'contextual isolation but NOT security isolation.' Additionally, `new Function()` is used for dynamic code evaluation in `src/constraints/verifier.ts`, `src/persistence/predicate-compiler.ts`, `src/synthesis/relational/interpreter.ts`, and `src/synthesis/sandbox-tools.ts`. While there are attempts at validation (e.g., `isSafeInvariant`, `PredicateCompiler` blacklisting), running untrusted or maliciously crafted LLM outputs could still pose significant risks, as the sandbox is not designed for full security isolation. External network calls are made to LLM providers.
Similar Servers
DevDocs
DevDocs is a web crawling and content extraction platform designed to accelerate software development by converting documentation into LLM-ready formats for intelligent data querying and fine-tuning.
consult7
Enables AI agents to analyze extensive file collections (e.g., codebases) using large context window models via OpenRouter, overcoming agent context limits.
pageindex-mcp
This MCP server acts as a bridge, enabling LLM-native, reasoning-based RAG on documents (local or online PDFs) for MCP-compatible agents like Claude and Cursor, without requiring a vector database locally.
flexible-graphrag
The Flexible GraphRAG MCP Server integrates document processing, knowledge graph building, hybrid search, and AI query capabilities via the Model Context Protocol (MCP) for clients like Claude Desktop and MCP Inspector.