MCP Catalogs
首页

Matryoshka

by yogthos·134·综合分 48

通过递归语言模型和符号命令分析超出上下文窗口大小的文档的 MCP 服务器。

ai-llmdeveloper-toolsfile-system
16
Forks
0
活跃 Issue
本月
最近提交
2 天前
收录于

概述

Matryoshka 是一个创新的 MCP 服务器,能够分析比语言模型上下文窗口大 100 倍的文档。它采用递归语言模型方法,让 LLM 输出专门的 Nucleus DSL 符号命令,由逻辑引擎执行。这种架构减少 97%+ 的令牌使用,无需向量数据库即可保持文档级上下文。服务器提供两个 MCP 接口:一个具有完整 LLM 编排功能,另一个暴露直接 Nucleus 命令以实现程序化访问。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:分析超出上下文限制的大型日志文件或错误报告
:无需分块即可处理和查询多文档集合
:构建能够高效引用大型上下文的智能代理
:Matryoshka 如何处理超出上下文窗口的文档?
:什么是 Nucleus DSL?

什么时候选它

当你需要分析超过 LLM 上下文窗口的超大型文档时,选择 Matryoshka,特别是当传统的分块或向量数据库方法会丢失文档各部分之间的重要连接时。

什么时候不要选它

如果你需要细粒度控制单个文档块或需要超出其符号语言能力的高级元数据保留,不要选择 Matryoshka。

此 server 暴露的工具

从 README 抽取出 9 个工具
  • lattice_load

    Load a document for analysis

  • lattice_query

    Execute Nucleus commands on the loaded document

  • lattice_expand

    Expand a handle to see full data with optional limit/offset

  • lattice_memo

    Store arbitrary context as a memo handle

  • lattice_memo_delete

    Delete a stale memo to free memory

  • lattice_close

    Close the session and free memory

  • lattice_status

    Get session status, document info, and memo usage

  • lattice_bindings

    Show current variable bindings and memo labels

  • lattice_reset

    Reset all bindings and clear the current document

可对比工具

vectorstore-mcpdoc-search-mcpfile-system

安装

通过 npm 安装:

pnpm add -g matryoshka-rlm

或直接运行(无需安装):

npx matryoshka-rlm "有多少错误条目?" ./server.log

对于 Claude Desktop 集成,创建 claude_desktop_config.json 文件:

{
  "mcpServers": {
    "matryoshka": {
      "command": "npx",
      "args": ["matryoshka-rlm", "mcp"]
    }
  }
}

FAQ

Matryoshka 如何处理超出上下文窗口的文档?
它采用递归语言模型方法,LLM 输出由逻辑引擎针对完整文档执行的符号命令,无需分块。
什么是 Nucleus DSL?
Nucleus 是基于 S 表达式的受限符号语言,专为文档分析设计。它提供 grep、filter、sum 等命令,供 LLM 输出来操作文档数据。

Matryoshka 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。