
Margins
io.github.cflorczyk9由 GitHub 账号 cflorczyk9 发布v0.15.3更新于 Oct 24, 2026
Use your Claude Pro/Max subscription on your Obsidian vault. Reads markdown, proposes writes.
概览
一个本地 MCP 服务器,让 Claude 读取 Obsidian 库或 Markdown 文件夹,并把拟写入的页面暂存起来供你审核。
- 可以做什么
- 按全文和文件名搜索库,按路径读取页面,列出最近修改的页面并查找指向某页的反向链接,另提供供深度研究客户端使用的 search/fetch 组合。暂存新页面、字符串替换式编辑、追加内容,以及把 raw 中的 PDF、Word 文档、表格、邮件导出和 EPUB 等原始文档编译成结构化来源页。列出待处理提案及其覆盖风险标记,并接受或拒绝提案。为共享同一 slug 的页面建议 wikilink。记录并读取保存在库内 Markdown 文件中的归档与命名偏好。
- 适用场景
- 适合用 Obsidian 或 Markdown 文件夹记笔记、希望助手基于笔记回答问题并起草修改而不直接改动现有文件的场景。也适合需要搭建、整理或补充内部链接的库,以及想复用现有 Claude 订阅而非 API 密钥的用户。
- 运行要求
- 以 Node.js 包形式通过 stdio 在本地运行,需要 Node.js 18 或更高版本,可全局安装或经 npx 运行。需要在 MARGINS_VAULT 中提供库的绝对路径,或使用安装器的路径提示。推理依赖 Claude Pro、Max 或 Claude Code 订阅。可选 MARGINS_INDEX_ROOTS 限定索引的子文件夹。
安装
在 SourceWeft 中
- 打开 控制台中的 Margins,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
margins-mcp
Use your Claude Pro/Max subscription on your Obsidian vault. No API key. No per-token costs. No embedding pipelines. Claude reads your notes and proposes updates; your subscription pays for inference; your files stay on your disk.
margins-mcp is a small Node program that sits between Claude (Desktop or Code) and your Obsidian vault. When you chat with Claude, it reads your notes through margins-mcp. Your files stay local, Claude does the thinking, your existing subscription pays for it.
Which Margins are you?
Margins works for six common starting points. margins_start auto-detects your state on the first call, so you don't have to classify yourself — but knowing which row you're on helps set expectations.
Requirements
- Node.js 18 or newer
- An Obsidian vault, or any folder with notes, PDFs, Office/OpenDocument files, email exports, EPUBs, or plain text
- A Claude subscription: Pro ($20/mo), Max, or Claude Code
Install
Two commands:
The installer prompts for your vault path, detects Claude Desktop and Claude Code, writes the right config files, scaffolds raw/ + proposed/ + .margins/ inside your vault if missing, and runs a verification probe. Restart Claude Desktop (Cmd-Q on macOS, not just close the window), or in Claude Code run /mcp to see Margins listed.
Don't have a vault yet?
Scaffold a Margins-shaped one:
Finding your Obsidian vault path
If you already use Obsidian and don't know your vault's absolute path:
- In Obsidian: right-click the vault name in the file tree → "Reveal in Finder" (macOS) or "Show in Explorer" (Windows). The path is in the title bar.
- macOS common paths:
~/Documents/<VaultName>, or~/Library/CloudStorage/iCloudDrive/Obsidian/<VaultName>if iCloud-synced. - Linux common paths:
~/Documents/<VaultName>, or~/.local/share/Obsidian/<VaultName>. - Windows common paths:
%USERPROFILE%\Documents\<VaultName>.
Pass it to the installer via --vault /absolute/path or answer the prompt.
Try-without-installing
You'll see a warning that npm may garbage-collect the npx cache and your configs would break weeks later. For real use, prefer npm install -g above. The npx path is fine for kicking the tires.
Manual install
If you'd rather edit config yourself, add this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS; see Anthropic docs for Windows/Linux paths):
Try it
In a new Claude conversation, ask:
Use margins to give me a summary of my recent notes.
Or:
What pages support the claim that my project deadline is May 30th? Use margins to find them.
Or:
I just dropped a spreadsheet into
raw/. Compile it into a structured source page in my wiki.
The model can read your vault, propose new pages, propose edits to existing ones, and pull raw sources into structured wiki pages. propose_compile_from_raw accepts Markdown/plain text, PDFs, Word docs, spreadsheets, decks, email exports, EPUBs, OpenDocument files, RTF, HTML, CSV/TSV, JSON, YAML, and common text-ish formats. Every write stages to proposed/ first; nothing lands without you accepting.
Tools
Context (call once per conversation)
Read
Propose writes (staged — nothing lands until accepted)
Suggest (for A3 / B3 — vaults with many files but few links)
Learn
How the proposal flow works
Every write tool stages to proposed/<path> inside your vault. Nothing touches the live tree until you (or an MCP client acting on your behalf) call resolve_proposal with action: "accept". You can also inspect staged content (ls proposed/) and accept by moving files yourself.
Sequential edits stack: a second propose_edit on the same path reads from the pending proposal, not the vault.
Configuration
What Margins is NOT
To keep scope crisp:
- Not an inference layer. Your Claude subscription pays for that. Margins makes zero LLM calls.
- Not a web app. The chat surface lives in Claude Desktop / Claude Code / claude.ai. Margins is plumbing.
- Not a cloud sync. Local-first. Your files stay on your disk.
- Not a CRM integration. Different product.
- Not API-key-based. Subscription-passthrough is the whole point.
Privacy
- Vault content never leaves your machine. Margins is a Node process that reads/writes files locally and exposes structured tools over stdio.
- Anonymous telemetry (opt-in at install time) reports tool-call counts to help me prioritize what to build next. Sample event payload:
GET https://margins.goatcounter.com/count?p=/tool/search_vault. No vault content, no file paths, no user identifier beyond the standard 24-hour rolling session token GoatCounter assigns. Disable per-session withMARGINS_TELEMETRY=off. Decision stored at~/.margins/consent.json.
Develop
The compiler (src/compiler/) was originally vendored from an earlier Margins web app. The web app and its landing page live on the legacy-webapp branch in this repo. Re-vendor with scripts/vendor-compiler.sh if you ever need to pull updates back from there.
How Margins gets smarter over time
Two things compound:
- Your vault's
CLAUDE.mdis auto-loaded bymargins_start. Drop vault-specific rules in there — filing conventions, voice, naming patterns — and Claude obeys them in every conversation. No copy-paste. .margins/preferences.mdis a Margins-maintained file inside your vault. When you correct Claude ("no, that should be in projects, not personal"), Claude callsrecord_preferenceto remember the rule. Next conversation it reads them viarecall_preferencesbefore proposing writes. The file is plain Markdown — you can audit it, hand-edit it, delete sections that no longer apply.
Both files live in the vault, so they travel with it. Switch machines, switch hosts (Claude Desktop → Claude Code → ChatGPT once that lands), and your conventions follow.
Roadmap
- v0.6: web onboarding at marginsmcp.com — pick a folder via File System Access, scaffold a vault, get the install command. Closes B2/B3 personas without requiring CLI fluency.
- v0.6:
get_citations(semantic embedding search, opt-in dep). - v0.6: OCR/image, legacy Office binary, and audio/video ingestion for
propose_compile_from_raw. - v0.7: HTTP / Streamable transport for claude.ai web and ChatGPT custom connectors.
- v0.7+: Obsidian community plugin alongside MCP, if signal supports it.
- v0.8+: file watcher / auto-scaffold on drop into
raw/.
License
MIT
来源:README.md,提交 69b6af2
工具
0版本历史
1- v0.15.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分