Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

MCP server · Audited from source

Matryoshka MCP server

by yogthos/matryoshkaApache-2.0 licenceAudited 7 Oct 2026 · source 3a2549633d52

npm matryoshka-rlm 0.2.39stdio★ 149
✕BLOCKGrade F · 59/100 · 7 Oct 2026 · 3a25496

Is it safe? No — BLOCK, grade F (59/100). It exposes 78 tools: 71 read, 4 write and 3 destructive. The audit recorded 20 findings (0 critical, 5 high, 2 medium, 13 low). Maintainer's description: MCP server for token-efficient large document analysis via the use of REPL state

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Matryoshka MCP server (yogthos/matryoshka)”. Retrieved 7 Oct 2026. https://modelsatlas.com/mcp/yogthos/matryoshka

Why this is BLOCK. The audit found 0 critical and 5 high findings; the most severe is Code injection at src/constraints/verifier.ts:359. Each finding is listed below with its file and line.

Why this page is still public. People search for this server by name. Hiding it would leave them with the README's word alone; here they see what the code does. We list it so you can decide, and we do not show connect commands for BLOCK servers.

Trust audit

Audit 0.4.1 · full source read 7 Oct 2026

Trust score59/100✕BLOCK F
0 critical5 high2 medium13 low0 info

20 findings, listed below with the file and line each was found on. Grade A needs a sandboxed behavioural run too; this audit read the source only.

What the source does

  • FilesystemDeclared3 observations
  • NetworkDeclared10 observations
  • ShellDeclared5 observations
  • DependenciesNot pinnedSome ranges float
  • SecretsNone foundNo keys in source

Findings (20)

Sorted by severity

HIGHCode injectioncode.eval_exec · src/constraints/verifier.ts:359
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
const fn = new Function("result", `"use strict"; return (${invariant});`);
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/logic/synthesis-integrator.ts:814
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
const fn = new Function("input", `return ${generatedCode}`) as (
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/persistence/predicate-compiler.ts:191
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
return new Function("item", `"use strict"; return (${code});`);
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/persistence/session-db.ts:31
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
exec(sql: string, params?: SqlValue[]): SqlJsQueryExecResult[];
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
HIGHCode injectioncode.eval_exec · src/persistence/session-db.ts:113
F-02 Code injectionCWE-78 · CWE-94 · CWE-95Layer L1
exec(sql: string): void {
Why
evaluates text as code
Fix
remove; use a parser or a dispatch table
MEDIUMNetwork egressnet.raw_ip · src/tool/adapters/http.ts:222
F-04 Network egressCWE-200 · CWE-319Layer L1
const url = new URL(req.url || "/", `http://127.0.0.1:${localPort}`);
Why
No further detail recorded for this rule.
Fix
—
MEDIUMFilesystem / pathmcp.destructive_tools
F-05 Filesystem / pathCWE-22 · CWE-59Layer L3
lattice_memo_delete, lattice_reset, prefix_suffix_strip
Why
3 tool(s) can delete or overwrite
Fix
prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInformation disclosuredisclose.log_secret · tests/persistence/comparison.test.ts:326
F-12 Information disclosureCWE-209 · CWE-532Layer L1
console.log(`Token savings: ${savings}%`);
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.system_paths · tests/tool/lattice-tool.test.ts:292
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
const result = await tool.executeAsync({ type: "load", filePath: "/etc/passwd" });
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · demos/phase1-rlm-query/harness.ts:13
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { runRLM } from "../../src/rlm.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · demos/phase1-rlm-query/harness.ts:14
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { createNucleusAdapter } from "../../src/adapters/nucleus.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · demos/phase3-multi-context/after.test.ts:22
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { runRLMFromContent } from "../../src/rlm.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · demos/phase3-multi-context/after.test.ts:23
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { createNucleusAdapter } from "../../src/adapters/nucleus.js";
Why
No further detail recorded for this rule.
Fix
—
LOWFilesystem / pathfs.traversal · demos/phase3-multi-context/before.test.ts:20
F-05 Filesystem / pathCWE-22 · CWE-59Layer L1
import { runRLMFromContent } from "../../src/rlm.js";
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · tests/tool/http-adapter.test.ts:77
F-04 Network egressCWE-200 · CWE-319Layer L1
const response = await fetch(`http://127.0.0.1:${port}/load`, {
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · tests/tool/http-adapter.test.ts:94
F-04 Network egressCWE-200 · CWE-319Layer L1
await fetch(`http://127.0.0.1:${port}/load`, {
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · tests/tool/http-adapter.test.ts:100
F-04 Network egressCWE-200 · CWE-319Layer L1
const response = await fetch(`http://127.0.0.1:${port}/reset`, {
Why
No further detail recorded for this rule.
Fix
—
LOWNetwork egressnet.raw_ip · tests/tool/http-adapter.test.ts:115
F-04 Network egressCWE-200 · CWE-319Layer L1
const response = await fetch(`http://127.0.0.1:${port}/health`);
Why
No further detail recorded for this rule.
Fix
—
LOWObfuscation / stealthobf.decode_call · tests/synthesis/coordinator.test.ts:387
F-07 Obfuscation / stealthCWE-506 · CWE-94Layer L1
expect(() => safeEvalSynthesized(`(x) => atob(x)`)).toThrow();
Why
No further detail recorded for this rule.
Fix
—
LOWSupply chainsupply.unpinned · package.json
F-08 Supply chainCWE-829 · CWE-1357Layer L1
@modelcontextprotocol/sdk, @tree-sitter-grammars/tree-sitter-markdown, @types/sql.js, @vscode/tree-sitter-wasm, @yogthos/tree-sitter-clojure, graphology, graphology-communities-louvain, graphology-dag
Why
30 dependency range(s) float
Fix
pin exact versions or ship a lockfile

Tools it exposes

78 declared in source · 3 destructive

71 read4 write3 destructive

3 tools can delete or overwrite. An agent that can be talked into calling a tool can be talked into calling this one, so give it a token scoped to what you need.

ToolWhat it doesRisk
lattice_memo_deleteDelete a memo that is no longer needed to free memory. Use this when context becomes stale or irrelevant (e.g., after finishing work on a module). Check lattice_bindings to see current memos and their handles.destructive
lattice_resetClear all handles and bindings but keep the document loaded. Use this to start fresh analysis.destructive
prefix_suffix_stripRemove prefix ${JSON.stringify(inputPrefix.slice(0, 50))} and suffix ${JSON.stringify(inputSuffix.slice(0, 50))}destructive
batch_llm_queryExecute multiple LLM queries in parallel. Much faster than sequential llm_query calls when you need to process multiple chunks or sections. All prompts are sent simultaneously.write
lattice_queryExecute a Nucleus query on the loaded document. RETURNS HANDLE STUBS (not full data): - Array results return a handle likewrite
nucleus_executeExecute Nucleus commands directly on a document without LLM orchestration.write
triggerNo description in the sourcewrite
analyze_documentAnalyze a document using the Recursive Language Model (RLM).read
auto_synthesizedSynthesized from ${inputs.length} examplesread
badNo description in the sourceread
bracket_contentExtract content from bracketsread
bracket_extractExtract content from square bracketsread
child1No description in the sourceread
child2No description in the sourceread
context.matchSearch context with a regular expression. Returns all matches.read
context.sliceGet a portion of the context by character indices. Use sparingly - prefer fuzzy_search to find relevant sections first.read
count_tokensEstimate the token count of text. Useful for checking if a section will fit in an LLM call. Uses word-based heuristics (most words = 1 token).read
currencyCurrency patternread
currencyExtractorExtracts currency as numberread
currency_decimalExtract decimal from dollar currencyread
currency_extractorNo description in the sourceread
currency_integerExtract integer from dollar currencyread
dateDate patternread
derivedNo description in the sourceread
digitsNo description in the sourceread
emptyNo description in the sourceread
extractor1No description in the sourceread
fuzzy_searchFind approximate keyword matches using fuzzy string matching. Returns matching lines with line numbers and match scores (lower score = better match). NOTE: Takes a single search term, NOT regex. For regex patterns use grep() instead.read
goodNo description in the sourceread
grepFast regex search with line numbers. More efficient than context.match for finding specific patterns. Returns matches with line numbers and character indices.read
highNo description in the sourceread
high-usagehigh usage componentread
importedNo description in the sourceread
integer_commasParse integer with comma separatorsread
integer_plainParse plain integerread
key_equals_value_extractExtract value from key=value patternread
key_value_extract_keyExtract key from key: value patternread
key_value_extract_valueExtract value from key: value patternread
lattice_bindingsShow current handle bindings. Returns all active handles with their stubs: $grep_error: Array(500) [preview of first item...] $filter: Array(50) [preview...] RESULTS: -> $filter Use this to see what data you have available before deciding what to expand.read
lattice_closeClose the current session and free memory.read
lattice_expandGet full data from a handle when you need to inspect actual results. USE THIS WHEN: - You need to see actual content to make decisions - You want to verify whatread
lattice_helpGet complete Nucleus command reference documentation.read
lattice_llm_respondResolve a pending (llm_query ...) suspension with a single string response. When lattice_query hits (llm_query ...) and the client doesnread
lattice_loadLoad a document for analysis. Call this first before querying.read
lattice_statsGet statistics about the currently loaded document.read
lattice_statusGet current session status including document info, active handles, and timeout.read
llm_queryQuery a sub-LLM to process a chunk of text. Expensive operation - batch related information when possible to minimize calls. Use format:read
locate_lineExtract lines by line number (1-based). More precise than slice() for line-based navigation. Supports negative indices to count from end.read
log_level_extractExtract log level from log lineread
lonelyNo description in the sourceread
lowNo description in the sourceread
minikanren_synthesizedSynthesized via miniKanren relational searchread
new-componentNo description in the sourceread
nucleus_commandsGet reference documentation for available Nucleus commands.read
numberNumber patternread
originaltest descriptionread
paren_contentExtract content from parenthesesread
parentNo description in the sourceread
percentage_to_decimalConvert percentage to decimalread
regexNo description in the sourceread
regex1No description in the sourceread
regex2No description in the sourceread
removableNo description in the sourceread
split_commaSplit by commaread
split_pipeSplit by piperead
structured_currency_extractExtract currency value from structured textread
structured_number_extractExtract number from structured textread
template_synthesizedTemplate synthesized from ${inputs.length} examplesread
testNo description in the sourceread
test1No description in the sourceread
test2No description in the sourceread
test_highNo description in the sourceread
test_lowNo description in the sourceread
test_regextestread
test_transformtestread
text_statsGet document metadata WITHOUT reading tokens: length, line count, and 5-line samples from start/middle/end. Use this first to understand document structure.read
toNumberNo description in the sourceread
zero-usagenever used componentread

Safer alternatives

Audit history

  1. ✕BLOCK F 59 / 100

    First audit · 3a2549633d52

README badge

Badges show the current verdict, BLOCK included

ModelsAtlas: BLOCK FMODELSATLASBLOCK · F

A badge cannot be hidden by the maintainer while the verdict is BLOCK. Fix the findings, push, and the re-audit updates it.

Questions about Matryoshka MCP server

What is the Matryoshka MCP server?
MCP server for token-efficient large document analysis via the use of REPL state
What tools does Matryoshka expose?
78 in total: 71 read-only, 4 that write, and 3 that can delete or overwrite (lattice_memo_delete, lattice_reset, prefix_suffix_strip). Every one is listed on this page with its risk.
Is Matryoshka safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (59/100) and found 5 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 3 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Matryoshka need?
It reads API_KEY, MISSING_KEY, TEST_API_KEY and TEST_EMBEDDED_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Matryoshka run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as matryoshka-rlm at 0.2.39.
How current is this page?
The grade is for one exact copy of the source (3a2549633d52), read on 2026-10-07. The repository is watched and re-audited when it changes.
I already installed Matryoshka. What should I do?
Remove it from your client's MCP configuration, then rotate any API keys and tokens that were in your environment while it ran.
Can the verdict change?
Yes. The repository is watched and re-audited when its source changes. If the findings are removed the verdict updates, and the history on this page shows it.

Sources

  • yogthos/matryoshka on GitHub — the source we read, its licence, stars and activityObserved · 7 Oct 2026
  • ModelsAtlas trust audit — BLOCK verdict for commit 3a2549633d52Observed · 7 Oct 2026

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.