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 分