
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 分