Matryoshka
Active·★ 138·Updated 2026-05-17
★ Trending★ RAG / Knowledge Base
MCP server for token-efficient large document analysis via the use of REPL state
Matryoshka (RLM) addresses the limitation of fixed LLM context windows by using a recursive language model approach. Instead of chunking or RAG, the LLM outputs commands in a constrained symbolic language called Nucleus, which are executed by the Lattice logic engine. This reduces entropy, enables safe execution, and achieves 97% token savings through handle-based storage.
#ai-assistant#document-analysis#llm#llm-tools#mcp#mcp-server#mcp-servers#model-context-protocol
01
Features
01Recursive Language Model (RLM) architecture based on a paper
02Nucleus DSL: constrained S-expression language for safe LLM output
03Lattice engine: parser, type inference, constraint resolver, and solver
04In-memory handle storage with SQLite FTS5 achieving 97% token savings
05Tree-sitter code-aware querying for structural symbols
02
Compatibility
Node.js
Node.js
Verified via docs
03
Quick start
1
$ npm install -g matryoshka-rlm
04
Use cases
↳Document analysis: search, filter, count, and sum large log files
↳Code analysis: extract functions, classes, find references in source code
↳Large-scale data queries without exceeding LLM context limits
05
Alternatives
FunASR★ 16.6k
Industrial-grade speech recognition toolkit: 170x realtime, 50+ languages, speaker diarization, emotion detection, streaming, and OpenAI-compatible API.
initrunner★ 38
Define AI agent roles in YAML and run them anywhere: CLI, API server, or autonomous daemon
Related searches
Comments
Log in to leave a comment
- JJesse PatelMay 24, 2026
Token-efficient large document analysis via REPL state management.
- PParker ChenMay 22, 2026
Good for AI workflows processing large documents where context limits are the constraint.
- RReese GarciaMay 14, 2026
Matryoshka metaphor is apt — nested analysis of document structure.
- QQuinn MartinezMar 24, 2026
REPL state approach handles documents that don't fit in context windows.