
ragnarok
io.github.freyr由 GitHub 帳號 freyr 發布v1.1.0更新於 Nov 6, 2026
Local RAG search over Obsidian vaults: SQLite hybrid search with local Ollama embeddings.
概覽
本機 MCP 伺服器,為 Obsidian Markdown 筆記庫建立索引,讓 Claude Code 透過本機 Ollama 向量進行混合檢索。
- 可以做什麼
- 以向量加關鍵字的混合方式檢索筆記,可依 vault、專案、領域、類型或封存狀態篩選
- 依提示找出相似的既有專案、列出某專案的全部筆記,並依狀態列出進行中的專案
- 開啟某篇筆記或其中一節,附上連結與反向連結;長筆記先回傳大綱
- 找出包含 Jira 風格工單編號的筆記
- 建立索引,並從 frontmatter 或路徑規則推導筆記中繼資料,私有路徑的筆記不會回傳
- 適用情境
- 適合把筆記、決策與過往工作放在 Obsidian 筆記庫,希望 Claude Code 在退回 grep 之前先找到這些脈絡的人。特別適合希望索引與向量都留在本機的 macOS 使用者。
- 執行需求
- 在 macOS 上透過 Homebrew 本機執行。需要 Ollama 並拉取嵌入模型、Claude Code 以及 uv(用來安裝 Python 3.12);套件名為 ragnarok-mcp,透過 uvx 執行。初始化會寫入 config.toml、把 Ollama 設為 brew 服務、建立索引並註冊伺服器。選用環境變數 RAGNAROK_HOME 指定主目錄(預設 ~/.ragnarok)。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ragnarok,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ragnarok
Local RAG search over Obsidian vaults for Claude Code.
ragnarok indexes the Markdown notes of one or more Obsidian vaults on your computer. A local MCP server gives Claude Code search tools over the index. No note leaves the computer: the embeddings come from a local Ollama model, and the index is one SQLite file.
Features
- Hybrid search. Each query runs a dense search (embeddings in
sqlite-vec) and a keyword search (SQLite FTS5 with BM25). Reciprocal rank fusion joins the two lists. The unit of rank is the note, with its best section. - Heading chunks. The splitter cuts each note at its headings and joins very short sections.
- Metadata from frontmatter or path. Each note gets a vault, a project, an area, a type, a status and ticket keys. The frontmatter gives these values first. For a note without them, path rules in the configuration give them.
- Project search.
find_projectsfinds the earlier projects that a prompt continues or resembles, also when the prompt does not name the project.list_projectgives all notes of a project. - Always current. Each tool call first scans the vaults for changed notes (usually less than 100 ms) and embeds them. There is no watcher process.
- Private notes. Notes under the configured private paths are in the index, but the server does not
return them. Only the user can open them, with
allow_private = truein the configuration. - Credential redaction. The indexer and
open_notereplace literal passwords, tokens and keys with[REDACTED]. The vault files do not change. - Frontmatter backfill.
ragnarok backfill proposewrites a proposal of the missing frontmatter keys for a vault.ragnarok backfill exportwrites a JSON file with the title and the first lines of each public note that needs a description (credentials removed). Claude writes the descriptions into one or more JSON files,{path: {"description": "...", "type": "..."}}.ragnarok backfill merge <vault> <file>...puts them into the proposal, removes credentials, reports each description of more than 25 words and each row with no description, and replaces a default type with a valid type from Claude. You examine the proposal, thenragnarok backfill applymakes a backup archive of the vault and adds only the missing keys. - Evaluation.
ragnarok evalcompares grep, keyword, dense and hybrid search on your own question sets.ragnarok eval agentcompares a Claude Code agent with grep and an agent with the MCP tools. - One-command setup.
ragnarok initinstalls the model and the index, and registers the MCP server in Claude Code when the Claude Code plugin does not give it.ragnarok doctorchecks the setup.
Requirements
- macOS with Homebrew. The setup uses
brew servicesfor Ollama. - Ollama:
brew install ollama. - Claude Code.
- uv:
brew install uv. uv installs Python 3.12.setup.shinstalls uv if it is missing.
Setup
ragnarok is on PyPI as ragnarok-mcp and in the
MCP Registry as io.github.freyr/ragnarok.
With the Claude Code plugin (no clone)
In Claude Code:
Then in a terminal:
The plugin starts the server with uvx ragnarok-mcp serve and adds the search guidance to each session. The home
folder is ~/.ragnarok. To use a different folder, set RAGNAROK_HOME in the env of
~/.claude/settings.json and in your shell.
From a checkout
The checkout is the home folder.
What init does
ragnarok init does six steps. It skips each step that is already done:
- It writes
config.tomlfromconfig.example.toml. It asks for the vault root, the folder that holds your vault folders, and adds each subfolder as a vault. - It checks that Ollama is installed.
- It runs Ollama as a login service with
brew services start ollama(it asks first). If Ollama runs outside brew services, for exampleollama servein a terminal, init stops it and starts the service. - It pulls the embedding model.
- It builds the index. A vault with 1,500 notes takes approximately 12 minutes on an Apple Silicon Mac.
- When the plugin
ragnarokgives the MCP server, it removes a registration at the user scope (it asks first). Else it registers the MCP serverragnarokin Claude Code at the user scope (it asks before it replaces another registration).
Restart Claude Code after step 6. ragnarok doctor checks the same six parts and prints the fix for each
failure.
Before step 5, examine config.toml: remove a folder that is not a vault, and add your private paths. A later
change of the configuration applies at the next ragnarok index or MCP tool call, with no restart.
Use in Claude Code
The server gives six tools:
The plugin adds the guidance below to each session itself, with the plugin tool names
mcp__plugin_ragnarok_ragnarok__*. Without the plugin, Claude Code loads MCP tools on demand. To make Claude
use them before grep, add a short instruction to your ~/.claude/CLAUDE.md file, for example:
Adapting to your vaults
docs/vault-requirements.md tells how a vault must look to get the most from
ragnarok: headings, project folders, SUMMARY.md, frontmatter and private folders.
The default path rules expect <vault>/<area>/<project>/note.md. If your vaults look different, the repo
skill .claude/skills/adapt-vault/ guides Claude Code through the changes. Open Claude Code in the checkout
and ask it to adapt ragnarok to your vaults. The skill:
- runs
ragnarok surveyon each vault; - agrees the private folders with you, before any other change and before a new vault goes into
vaults; - writes the path rules into
config.toml, checked withragnarok inspect; - runs the frontmatter backfill, if you agree, with your review before
apply; - writes a small evaluation set from your notes and runs
ragnarok eval mechanical; - adds the guidance above to your
~/.claude/CLAUDE.md, after it asks you.
It changes only config.toml and adds frontmatter keys. It never moves, renames or deletes a note or a folder.
Configuration
config.toml is in the home folder. A relative path in it is relative to the home folder.
config.example.toml explains each key. The most important keys:
Note metadata
ragnarok reads these frontmatter keys. Each key is optional:
Without frontmatter, the path rules give the metadata. The default rules work for a vault with the layout
<vault>/<area>/<project>/note.md. For a different layout, add a [vault_rules.<vault>] table. Use
ragnarok inspect <note path> to see the metadata of a note.
Commands
Run each command with uvx ragnarok-mcp, for example uvx ragnarok-mcp search "boiler", or with uv run in the
checkout.
Where things are
Everything is in the home folder: RAGNAROK_HOME, else the checkout, else ~/.ragnarok. In a checkout, git
ignores config.toml, data/ and logs/.
Ollama keeps the model in ~/.ollama.
Development
Release
- Set the version in
pyproject.tomland in bothversionfields ofserver.json, and add the section toCHANGELOG.md. - After the merge, push the tag:
git tag v1.2.3 && git push origin v1.2.3. - The workflow
publish.ymlchecks that the three versions match the tag, runs the tests, publishes the package to PyPI with trusted publishing, then publishesserver.jsonto the MCP Registry.
License
MIT. See LICENSE.
來源:README.md,提交 615ed14
工具
0版本歷史
1- v1.1.0最新Nov 6, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分