
kObsidian
io.github.bezata由 GitHub 帳號 bezata 發布v0.2.1更新於 Oct 24, 2026
Filesystem-first MCP for Obsidian — an LLM-maintained wiki inspired by Karpathy's LLM Wiki.
概覽
在本機執行的 MCP 伺服器,讓助理直接在磁碟上讀取、編輯和整理 Obsidian 儲存庫,並可選用由 LLM 維護的 wiki 層。
- 可以做什麼
- 讀取、建立、編輯、移動、刪除和搜尋筆記,管理 frontmatter 與資料夾,並可在工作階段中切換多個儲存庫。管理標籤並分析連結關係:反向連結、出鏈、失效連結、孤立筆記、樞紐筆記和儲存庫統計。處理任務、Dataview 查詢與欄位、圍欄程式碼區塊、Marp 簡報、Kanban 看板、Canvas 檔案和範本。建立並維護 wiki:初始化、收錄來源、查詢、重建索引、合併摘要,並檢查孤立頁面、失效連結和過期頁面。設定 Local REST API 外掛後,可橋接正在執行的 Obsidian 應用程式執行工作區和命令操作。
- 適用情境
- 適合將筆記、研究資料或工程文件存放在 Obsidian 儲存庫中,並希望助理搜尋、編輯和交叉連結這些內容,或自動維護由來源、概念和實體組成的結構化 wiki 的情境。
- 執行需求
- 透過 npx(Node.js)或桌面安裝包在本機執行。需要在 OBSIDIAN_VAULT_PATH 中提供儲存庫的絕對路徑。workspace、commands 和即時 Dataview 工具還需要 Obsidian Local REST API 外掛,並在 OBSIDIAN_API_URL 中填寫其基礎位址、在 OBSIDIAN_REST_API_KEY 中填寫其 bearer 金鑰;OBSIDIAN_API_VERIFY_TLS 為選用項目。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 kObsidian,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
kObsidian MCP
Filesystem-first MCP server for Obsidian vaults — with an LLM-Wiki layer on top.
Inspired by Andrej Karpathy's LLM Wiki idea. You curate the sources; the LLM does the bookkeeping.
[npm version] [npm downloads] [GitHub release] [license] [Release CI]
[MCP] [Bun] [TypeScript] [Tools] [Resources] [Prompts] [Smithery] [MCP Registry] [VirusTotal]
Install · Quick start · Architecture · LLM Wiki · Tools · Docs
🧰 The only Obsidian MCP with workspaces.
vault.list/vault.selectlet an LLM discover and switch between your Obsidian vaults in-session — no restart, no config edit, no per-tool path threading. Backwards compatible withOBSIDIAN_VAULT_PATH. Added in v0.3.0. See docs/WORKSPACES.md.
New in v0.3.7
Configure each vault independently with .kobsidian.json: customize wiki folders, filenames, headings, and the stale-page threshold without sharing one configuration across every vault. notes.edit heading inserts also preserve paragraph spacing and join existing lists cleanly.
Configuration example and upgrade notes.
Why kObsidian
- Filesystem-first. Operates on your vault directly. Obsidian doesn't need to be running for 55+ of the 66 tools.
- 66 typed MCP tools across vaults, notes, links, tags, tasks, Dataview, Canvas, Kanban, fenced blocks, Marp, Templates — every one Zod-validated with
structuredContentoutput and the full 4-hint MCP annotation set (readOnlyHint,destructiveHint,idempotentHint,openWorldHint). - Multi-vault
vault.*(v0.3.0). The LLM canvault.listyour known Obsidian vaults (discovered from Obsidian's own registry orOBSIDIAN_VAULT_<NAME>env vars) andvault.selectbetween them for the session. Fully backwards compatible:OBSIDIAN_VAULT_PATHstays the default and per-callvaultPatharguments always win. - LLM-Wiki orchestration — a
wiki.*namespace that turns your vault into a compounding knowledge base: ingest sources, auto-update an index + greppable log, lint for orphans / broken links / stale pages. Agent applies cross-refs via aproposedEditscontract so every write is visible in the transcript. - Both transports. Classic stdio for local MCP clients and Streamable HTTP (Hono) for remote, with CORS preflight,
MCP-Protocol-Versionhandling, origin 403, and optional bearer auth — all per the 2025-11-25 spec. - Claude Code schema compatibility (v0.3.5+, refined in v0.3.6). Tools advertise JSON Schema 2020-12 over both stdio and stateless Streamable HTTP. Union-shaped tools expose their fields and selectors to the client, while Zod still validates each call and structured output. See compatibility details.
- Ships everywhere. npm (
npx -y kobsidian-mcp), cross-platform.mcpbbundles for Claude Desktop drag-and-drop, asmithery.yamlfor Smithery, and aserver.jsonfor the MCP Registry. Each.mcpbrelease asset is VirusTotal-scanned with links appended to the release body.
Install
Pick your client below. Every client supports the full hybrid mode
— filesystem-first tools (80+ of them) run against the vault path
alone, and the same config can simultaneously carry the Local REST
API key to unlock workspace.*, commands.*, and live DQL via
dataview.query*. Set the whole env block once per client and every
tool namespace lights up; leave the REST key blank and the
filesystem-first tools keep working.
Full list in docs/ENVIRONMENT.md. Swap npx
for bunx anywhere if you want ≈10 ms cold-start instead of ≈200 ms.
Claude Code — claude mcp add
On Windows, wrap the command in cmd /c:
-- cmd /c npx -y kobsidian-mcp.
Claude Desktop — drag-and-drop .mcpb
Download kobsidian-<platform>.mcpb from the
latest release and
drag it into Claude Desktop. The installer prompts for vault path +
optional API URL / key. Every release asset is VirusTotal-scanned — the
links are in the release body.
Build one locally:
Codex CLI (OpenAI) — codex mcp add
Cursor — ~/.cursor/mcp.json or deeplink
Edit ~/.cursor/mcp.json (or the per-project .cursor/mcp.json):
Or hand a one-click deeplink to your users:
cursor://anysphere.cursor-deeplink/mcp/install?name=kobsidian&config=<base64-encoded-config>.
VS Code (Copilot) — code --add-mcp
Or create .vscode/mcp.json in your workspace with the same shape under
a top-level servers key.
Gemini CLI — gemini mcp add
Or hand-edit ~/.gemini/settings.json under mcpServers.
Antigravity (Google) — mcp_config.json
Edit ~/.gemini/antigravity/mcp_config.json
(Windows: %USERPROFILE%\.gemini\antigravity\mcp_config.json):
Zed — settings.json under context_servers
In ~/.config/zed/settings.json:
OpenCode — opencode.json under mcp
Factory Droid — droid mcp add
Other clients (Cline, JetBrains AI, Continue, custom hosts) — generic mcpServers JSON
Any MCP client that reads a standard mcpServers object will accept:
"type": "stdio" is optional on clients that infer transport from
command (Claude Code), but required by Claude Desktop, Cursor,
VSCode, and Antigravity — include it for maximum portability.
Smithery
smithery.ai renders an install UI straight from
smithery.yaml and collects the four env vars for you
— vault path plus the optional Local REST API URL / TLS / bearer key
trio, so hybrid mode works out of the box.
From source (contributing / hacking)
Obsidian plugins
kObsidian is filesystem-first — 55+ of the 66 tools work against a bare vault directory with no Obsidian plugins installed. The plugins below only matter if you want the specific tool namespaces that depend on them.
Enabling community plugins (one-time, if not already on)
Obsidian ships with community plugins disabled by default. Enable them once per vault:
- Open your vault in Obsidian.
- Settings (⚙️, bottom-left) → Community plugins.
- Click Turn on community plugins.
- Browse → search → Install → Enable.
Required for the REST-bridged tools
Obsidian Local REST API (by Adam Coddington) — needed for:
workspace.*(activeFile, openFile, navigate, closeActiveFile, toggleEditMode)commands.*(execute, list)dataview.query/dataview.listByTag/dataview.listByFolder/dataview.table(runtime DQL — the offlinedataview.fields.*/dataview.index/blocks.*tools work without it)templates.usewithengine: "templater"
Setup after install:
- Enable the plugin.
- Open its settings — scroll to API key → click Copy (or Reset first if you want a fresh one).
- Paste that key as
OBSIDIAN_REST_API_KEYin your MCP client config'senv:block. TheOBSIDIAN_API_URLdefault (https://127.0.0.1:27124) works out of the box.
Leave the plugin running while you use the REST-bridged tools — the endpoint is local-only (127.0.0.1) so nothing leaves your machine.
Enhances (but not required for) specific tool namespaces
The
obsidian://show-plugin?id=…links jump straight to the plugin in Obsidian's in-app browser — click one with Obsidian open and it deep-links to the install screen.
TLDR
No combination of plugins makes kObsidian depend on Obsidian being running — the REST-bridged tools just return a clear error if the plugin isn't reachable, and the filesystem-first tools keep working.
Quick start
Before the first session — kObsidian works on a bare Obsidian vault, but enabling a few Obsidian plugins unlocks the full tool surface. See Obsidian plugins below for the 5-minute setup (Local REST API, Dataview, Templater, Marp, Kanban, Tasks). Skip it if you only need the 80+ filesystem-first tools.
Once installed, a typical session opens with three natural-language
prompts. The wiki.* tools + the .claude skills handle the rest.
Full loop, frontmatter contracts, and the proposedEdits design in
docs/wiki.md.
Example use cases
The same primitives cover several real-world flavors of knowledge base.
Three worked examples below; longer walkthroughs in docs/examples.md.
A. Personal research wiki
B. Architecture Decision Records (ADRs) for a codebase
Model each ADR as a Source, architectural patterns as Concepts, and services / teams / libraries as Entities. The wiki becomes your ADR archive with cross-links you never have to maintain by hand.
C. Codebase wiki (design docs + post-mortems + RFCs)
Engineering teams abandon wikis because nobody updates them. Let the LLM do it. Ingest design docs, RFCs, and post-mortems as Sources; architectural patterns become Concepts; services and teams become Entities.
Why this works for engineering teams
- The
proposedEditscontract means every cross-reference write is visible in the transcript — no silent vault corruption from an LLM hallucination about which services a decision affects. - The greppable log format (
## [YYYY-MM-DD] ingest | ADR-004 …) makesgrep '^## \[' wiki/log.md | tail -20a valid "what did the team decide recently" query. wiki.lintsurfaces broken links to services that were deprecated months ago — the bookkeeping humans never get around to.
Architecture
Full module map in docs/architecture.md.
LLM Wiki (60 seconds)
The tedious part of maintaining a knowledge base is not the reading or the thinking — it's the bookkeeping. Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don't get bored.
kObsidian implements the LLM Wiki pattern from Andrej Karpathy's gist: a persistent, compounding knowledge base the LLM maintains. The vault becomes a private, curated Memex (Vannevar Bush, 1945) where cross-references, log-keeping, and lint are the LLM's job while you focus on curating sources and asking questions.
"Instead of just retrieving from raw documents at query time, the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files that sits between you and the raw sources." — Andrej Karpathy
Default layout under the vault:
The key design decision is that wiki.ingest never rewrites
cross-references blindly. It creates exactly one file (the Sources
page), appends one file (log.md), and returns a proposedEdits array
the agent applies with existing notes.* tools. Every write is visible
in the transcript — so LLM hallucinations show up as reviewable edits
rather than silent vault corruption.
Full contract in docs/wiki.md.
Claude Code skills
Four skills at skills/ trigger on natural language:
wiki-bootstrap, wiki-ingest, wiki-query, wiki-lint. Copy or
symlink them into ~/.claude/skills/ — see
skills/README.md.
Tool surface
66 MCP tools across 16 namespaces (v0.2.5 consolidated from ~90 to 62;
v0.3.0 added the vault.* namespace for multi-vault support — see
CHANGELOG for the full history). Always-current
inventory at docs/tool-inventory.json.
Client-safety annotations (MCP 2025-11-25):
MCP resources (URI-addressable; any client can browse without tool calls):
MCP prompts (for clients that don't consume the skills/ files):
ingest-source, answer-from-wiki, health-check-wiki.
Details in docs/tools.md.
Configuration
Every wiki tool also accepts a per-call wikiRoot override, and wiki.ingest
accepts per-call indexHeading / conceptHeading / entityHeading overrides
for vaults whose pages use localized headings (e.g. ## Fontes). When a
target heading is missing from a page, the proposal degrades to append so it
can still be applied via notes.edit.
Per-vault config file
Settings that belong to one vault rather than to the server — folder names,
filenames, and section headings of a localized wiki — go in a
.kobsidian.json at the vault root. Every key is optional and beats the
matching env var; a per-call tool argument beats both
(per-call → .kobsidian.json → env → default).
Unknown keys and malformed JSON are rejected with the file path in the error
so typos surface immediately; vault.current returns the effective
configuration under config (or the error).
Docs
Localized docs are available in 简体中文, 日本語, and 한국어.
Roadmap
The next two milestones are tracked in TODO.md:
- v0.4 — Obsidian LiveSync bridge. Free, end-to-end-encrypted vault access via the community Self-Hosted LiveSync plugin (CouchDB / S3 / R2 / WebRTC peer) — so an MCP client can reach the same Obsidian vault from any machine the user owns, without Obsidian itself being live.
- v0.5 — Cross-semantic vault verification. A
wiki.crossChecktool that reconciles two or more LiveSync-paired vaults at the wiki layer, gated by a newschema_versionfrontmatter field that uses the project's semver discipline as the compatibility contract.
TODO.md carries the motivation, the per-milestone task breakdown,
and the rules for how items move from there into the CHANGELOG.
Development
Project conventions in AGENTS.md.
Security & supply chain
-
Every
.mcpbrelease asset is VirusTotal-scanned. TheReleaseworkflow uploads eachkobsidian-<platform>.mcpbbundle to VirusTotal viacrazy-max/ghaction-virustotal@v4right after the release is published, then appends the analysis links to the release body. Any user installing from a GitHub release can click through to the public VirusTotal report for their platform's bundle before they run it — no trust in the maintainer required. -
Transport hardening. Streamable HTTP validates
Originagainst an allowlist (403 on mismatch), implements CORS preflight (OPTIONS /mcp→ 204 +Access-Control-*), requires or defaultsMCP-Protocol-Version, and supports optional bearer auth viaKOBSIDIAN_HTTP_BEARER_TOKEN. stdio has no network surface. -
Pinned SDK floor.
@modelcontextprotocol/sdk@^1.26.0— mitigatesGHSA-345p-7cg4-v4c7(cross-client response leak) andCVE-2026-0621(UriTemplate ReDoS). This repo pins1.30.0. -
npm Trusted Publishing. No long-lived
NPM_TOKENis stored in the repo. GitHub Actions mints a short-lived OIDC token on every tag push and the npm CLI exchanges it for a one-time publish token scoped to this exact workflow file (.github/workflows/release.ymlon thebezata/kObsidianrepo). Provenance attestations are automatic — every published version has a cryptographically-linked build statement pointing at the exact Actions run that produced it. Forks, other branches, or modified workflow files cannot publish — the OIDC audience claim won't match.
Full notes in docs/SECURITY.md.
Compatibility notes
- Protocol version —
2025-11-25(current MCP spec). HTTP clients withoutMCP-Protocol-Versionfall back to2025-03-26per spec; explicit-but-unsupported versions return 400. - Dataview split — offline tools index frontmatter / inline / list /
task / fenced
dataview/ fenceddataviewjsblocks. Runtime DQL is delegated to Obsidian + Dataview through the Local REST API. DataviewJS is source-preserving but not executed inside this server. - Mermaid + Marp — source-preserving parse/edit only; rendering is the client's job.
- SDK floor —
@modelcontextprotocol/sdk@^1.26.0(mitigatesGHSA-345p-7cg4-v4c7cross-client response leak +CVE-2026-0621UriTemplate ReDoS). This repo pins1.30.0.
Credits
- LLM Wiki pattern — Andrej Karpathy's gist. kObsidian is one concrete, filesystem-first TypeScript implementation of the idea.
- Memex — Vannevar Bush, As We May Think, 1945. The associative-trails concept is what the wiki's cross-reference graph tries to be.
- Model Context Protocol — Anthropic + the Agentic AI Foundation.
- Obsidian — obsidian.md. The vault format is authoritative; kObsidian respects it, doesn't migrate it.
License
MIT — see LICENSE. Contributions welcome; open an issue first for anything non-trivial.
來源:README.md,提交 8f192de
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分