lanternkb

io.github.ankitb073由 GitHub 账号 ankitb073 发布v0.1.3更新于 Oct 24, 2026

Private, local search over your own files, by meaning and keywords, with secrets redacted.

已验证STDIO仅桌面文件与存储知识与记忆

概览

AI 生成的概览

Lanternkb 是一个本地 MCP 服务器,为助手索引你选定的文件夹,支持按语义和关键词搜索,并会遮蔽检测到的密钥。

可以做什么
按语义和精确词语搜索已索引的文件夹,可按文件类型或时间范围筛选,并列出最近改动的文件。索引笔记、代码、PDF、Word 与 OpenDocument 文件、富文本、保存的网页和字幕,可选启用 OCR 与音频。将文件夹设为开放或仅本地,使会把结果发往云端的助手只能看到你允许的内容。在内容被切分或嵌入前遮蔽检测到的密钥,并跳过凭据文件夹和疑似密钥文件。通过插件扩展支持的文件类型、嵌入模型和文件夹规则。
适用场景
适合让助手基于你自己的笔记、代码和文档回答问题,而不把内容上传到托管搜索服务;也适合需要按文件夹控制云端助手可见范围的场景。
运行要求
以本地 stdio 进程运行,通过 uv 从 PyPI 安装;需要 Apple 芯片上的 macOS 14 或更高版本,或 Linux,并显式选用 Python 3.12。需先运行 lanternkb setup 选择并索引文件夹。安装约需 0.9 GB,嵌入模型另需约 1.2 GB,经你同意后下载。未声明账号、API 密钥或请求头。
安装前请注意
密钥扫描器只是第二道防线:会漏掉部分密钥,并放过类似示例的值,因此应把凭据文件夹排除在索引之外或设为仅本地。检测到密钥的文件会变为仅本地。除非添加其输出的拒绝规则,Claude Code 自带的文件工具仍可访问仅本地文件夹。模型下载是唯一的网络流量。

安装

在 SourceWeft 中

  1. 打开 控制台中的 lanternkb,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

lanternkb

Private, local search over your own files, for you and the AI tools you choose.

lanternkb indexes the folders you pick and searches them by meaning and by exact words. It runs as a local MCP server for Claude Code and other assistants, with no daemon, no open port and no telemetry. Secrets it detects are redacted before anything is stored, and you decide which folders an assistant that sends results to the cloud may see.

Install

macOS 14 or later on Apple silicon, or Linux, with uv:

sh
uv tool install --managed-python --python 3.12 "lanternkb[embed,ui]"lanternkb setup        # asks for folders and whether an assistant may see them, offers the models, indexes

--python 3.12 matters: without it uv may pick an older Python already on the machine, and the install fails. The install takes about 0.9 GB on macOS, plus about 1.2 GB for the embedding model. uv tool upgrade lanternkb updates it.

Search

sh
lanternkb search "what did the plumber say about the boiler"lanternkb search "boiler quote" --type pdf,docx --since 30dlanternkb recent       # files changed latelylanternkb ui           # the settings page, with a search boxlanternkb doctor       # checks the setup and says what to fix

Run lanternkb setup before connecting an assistant: the server searches the folders you chose there.

Use it from your AI tools

Claude Code:

  1. lanternkb mcp-setup prints a claude mcp add command. Run it.
  2. The server it registers returns files from folders you marked open, and nothing else.
  3. Claude Code can also read files with its own tools, so mcp-setup prints deny rules too. Add them to ~/.claude/settings.json to keep its tools away from your local-only folders and the index.

Codex, Cursor, VS Code, Gemini CLI and any other MCP client: run lanternkb serve --tier open as a stdio server. For Codex, in ~/.codex/config.toml:

toml
[mcp_servers.lanternkb]command = "lanternkb"args = ["serve", "--tier", "open"]

The user guide has the JSON form the other clients take, and what to watch for.

What it reads

Notes, code, PDFs, Word and OpenDocument files, rich text, saved web pages and subtitles; scanned pages and audio optionally. Plugins can add file types, embedding models and rules for which folder is open (plugins).

Privacy and safety

  • Every folder is open or local-only, and new folders are local-only.
  • Credential folders and secret-shaped files are skipped, and a secret scanner redacts what it finds before anything is split up or embedded. A file in which it finds a secret becomes local-only, even in an open folder.
  • Files are read in sandboxed worker processes that deny by default: sandbox-exec on macOS, Landlock and seccomp on Linux.
  • Nothing goes over the network except the model downloads you agree to.

The threat model says what is protected and what is not.

How well it works

Tested on a synthetic set of files (three open-source code bases and 654 generated notes) with 330 held-out questions: nDCG@10 0.831, against 0.777 for grooveseek with its reranker and 0.760 for QMD, at about 30 ms a search (about 120 ms with reranking, on an M5 Max). On the hardest held-out test of planted fake secrets, the scanner kept 71.9% out of the index, so treat it as a second line of defence: keep credential folders out of indexed folders, or local-only.

Limits

  • The secret scanner misses some secrets, and values that read as examples (example, changeme, a <placeholder>, a ${VARIABLE}) are left alone.
  • On Linux, reranking runs on the CPU at 0.4 to 1 s a search, so it is off until you enable it.
  • Email, browser history, calendars and contact cards are not indexed.
  • Scanned PDFs and images need OCR, which is off by default.

More

Licence

Apache-2.0: see LICENSE, NOTICE and THIRD_PARTY_NOTICES.md.

来源:README.md,提交 b56630a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.3最新Oct 13, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分