← Back to directory
M

Matryoshka

Community
Analyze large documents with constrained symbolic commands and compact results.
Category
Dev Tools #357 of 751
Stars
★ 151 Popular
Transport
stdio (local process)
Runtime
Node.js
Credentials
No credential needed
License
Apache-2.0
Last commit
⚠
Tools
12
51FMRS · D

The README describes a document-analysis MCP server built around the Nucleus DSL and provides a stdio configuration example and tool list. The server manifest was not provided, so other transports and client compatibility cannot be confirmed.

Strongest · Documentation 14/20 Weakest · Maintenance 8/20

Reliability
9/20
Security and permissions
11/20
Maintenance
8/20
Documentation
14/20
Setup experience
9/20
Why each score
Reliability 9/20
The README describes `lattice-mcp` tools, Nucleus commands, and the MCP suspension/resumption flow, and discloses limits such as multi-document loading. This makes the intended path fairly specific. However, the server manifest is not cached, so the actual tool definitions, initialization and tool-list handshake, dependency controls, and error handling cannot be checked. A test badge is present, but the supplied material contains no reviewable CI workflow or tests covering key server paths, so the score stays within the static-review cap and is reduced.
Security and permissions 11/20
The README says Nucleus uses a constrained language with parsing and type checks, and that Lattice does not execute arbitrary code; this supports some execution-scope limits. It also describes local file loading, session memory for content, and configurable external LLM providers, but does not establish file-access boundaries, data-flow disclosure, credential protections, or confirmation controls. The supplied material shows no red-line behavior; missing evidence about security boundaries lowers the score.
Maintenance 8/20
The material shows an Apache-2.0 license, a GitHub Actions test badge, and zero open issues, which are limited maintenance signals. It provides no release history, commit activity, dependency-update evidence, security-response channel, or clear governance information, so ongoing maintenance is uncertain and the score is substantially reduced. Stars do not count toward the score.
Documentation 14/20
The README gives substantial guidance on installation, configuration, tool names, DSL examples, memory limits, and the MCP multi-turn suspension flow. It also discloses several differences between execution paths. Deductions reflect the lack of per-tool parameter and error details, end-to-end troubleshooting, cost and data-flow information; the missing server manifest also prevents checking documentation claims against the actual interface.
Setup experience 9/20
The README provides a global installation command and a stdio MCP configuration example, plus local configuration and provider setup guidance. Users still need to prepare the runtime, install the package, and configure an LLM provider. There is no complete copy-ready configuration for a mainstream client, platform-compatibility guidance, or verifiable startup evidence, so the score remains conservative.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the networkConnects to a database

Best for

  • Users analyzing text that exceeds a model's context window.
  • Developers who want constrained document operations through Nucleus commands.
  • Agent workflows that store context in session memos and expand it later.

Not for

  • Workflows that require the entire document to be read directly into model context.
  • Users needing precise, language-server-grade code relationship analysis; the README describes the graph results as heuristic approximations.
  • Users requiring MCP multi-document loading or concurrent recursive batches; the README says multi-document loading is not exposed in MCP and recursive batches run sequentially.

Required permissions

  • The stdio client configuration must be able to launch lattice-mcp.
  • Loading a document requires access to the supplied document path; exact file permissions depend on the runtime environment.
  • Using an external LLM provider requires its URL and model configuration, and may require an API key.

Risks and side effects

  • Nucleus commands are parsed and type-checked, and the README says only known operations are executed; loaded documents may still contain misleading or malicious text.
  • The MCP service keeps session memory and document data; close the session when finished.
  • The code relationship graph uses line-based heuristics and may miss or misidentify relationships.
  • External LLM provider settings may send prompts and related content to the configured service.

Setup

Before you start

Runtime:Node.js

DEEPSEEK_API_KEY optionalsecret Optional DeepSeek API key used when the DeepSeek provider is selected in configuration.
ZHIPU_API_KEY optionalsecret Optional Zhipu API key used when the GLM provider is selected in configuration.

The README gives a global npm package installation command: pnpm add -g matryoshka-rlm. Its example client configuration uses stdio with the command lattice-mcp.

MCP config · JSON
{"mcp":{"lattice":{"type":"stdio","command":"lattice-mcp"}}}

Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.

.vscode/mcp.json
{
  "mcp": {
    "lattice": {
      "type": "stdio",
      "command": "lattice-mcp"
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
{
  "mcp": {
    "lattice": {
      "type": "stdio",
      "command": "lattice-mcp"
    }
  }
}

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Check that it works

Confirm that lattice_load, lattice_query, and lattice_status appear in the client's tool list. Call lattice_status to inspect the session, then load a document and query it to confirm a result or handle is returned.

Troubleshooting

  1. Check that the client uses stdio configuration and can locate the lattice-mcp command.
  2. Load a document with lattice_load before running lattice_query.
  3. For large results, inspect a subset with lattice_expand limit and offset options.
  4. When llm_query or llm_batch suspends, use the matching respond tool to submit responses and continue.
  5. Check the configured external LLM URL, model, and API key.

Things to try

Once connected, you can ask your AI assistant things like:

  • Load server.log and count its ERROR entries.
  • Search the loaded document for timeout and expand the first 10 matches.
  • Save this file summary as a memo labeled auth architecture.

Tools 12

lattice_load writes
Load a document for analysis.
lattice_query writes
Run Nucleus commands against the loaded document.
lattice_expand read-only
Expand a handle to view its data, with optional limit and offset.
lattice_memo writes
Store context as a memo handle without requiring a loaded document.
lattice_memo_delete destructive
Delete a stale memo to free memory.
lattice_close destructive
Close the session and free memory.
lattice_status read-only
Get session status, document information, and memo usage.
lattice_bindings read-only
Show current variable bindings and memo labels.
Show 4 more tools
lattice_reset destructive
Reset bindings and memos while keeping the loaded document.
lattice_llm_respond writes
Respond to a pending llm_query suspension.
lattice_llm_batch_respond writes
Submit all responses for a pending llm_batch request.
lattice_help read-only
Get the Nucleus command reference.

Use cases

Search, filter, and aggregate content in large logs or documents.
Process large query results incrementally using server-side handles.
Classify or summarize document chunks using chunking and sub-LLM calls.
Extract symbols from code files and query approximate call relationships.

Overview

Matryoshka provides MCP document analysis using the Nucleus symbolic language and the Lattice engine. Query results can be stored server-side and returned as compact handles. The README also describes memos, code-symbol extraction, and approximate code relationship graphs.

Similar servers

Source revision ccf3ca05855f Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/matryoshka.svg)](https://followmcp.com/en/servers/matryoshka)