
DocsAgent — Zotero, Obsidian & Apple Notes MCP Server
io.github.docsagent由 GitHub 帳號 docsagent 發布v5.0.1更新於 Nov 3, 2026
Instant, private access to your knowledge base: Zotero, Obsidian, Apple Notes (macOS).
概覽
本機 MCP 伺服器,讓 AI 助理私密地搜尋與閱讀 Zotero 文獻庫、Obsidian 儲存庫與 Apple Notes,並可對 Zotero 做有限寫入。
- 可以做什麼
- 列出可搜尋來源及其能力、目標類型與文件數量
- 搜尋與 grep Zotero 項目、註記和筆記、Obsidian 筆記及 Apple Notes,支援標籤、年份、作者、類型篩選,或依排名融合所有來源
- 以排序段落或分頁全文讀取項目,並取得中繼資料、摘要、註記、筆記及 BibTeX/CSL-JSON 引用
- 瀏覽集合、資料夾、標籤、已儲存的搜尋與獨立筆記
- 匯入 PDF 或解析 DOI/ISBN/arXiv 識別碼、新增子筆記、批次增刪集合與標籤(僅 Zotero,需開啟寫入)
- 適用情境
- 適合讓助理根據自己的論文、註記與筆記回答問題而不上傳任何內容,例如文獻回顧、引用查詢,或同時在 Zotero 文獻庫與 Obsidian 儲存庫中尋找某段文字。
- 執行需求
- 透過 npx 或 uvx 以 stdio 在本機執行,並需另外啟動隨附的原生核心(start/status 指令)。需要 Zotero 資料目錄、Obsidian 儲存庫路徑,macOS 上還需 Apple Notes 資料庫;路徑與選項寫在 ~/.docsagent/config.json 或 DOCSAGENT_CONFIG 指定的共用設定檔。Zotero 寫入需本機 Zotero API 執行中。僅支援 macOS、Windows x64 與 Linux x64,不支援 Linux ARM。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 DocsAgent — Zotero, Obsidian & Apple Notes MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
DocsAgent MCP — Zotero, Obsidian & Apple Notes for AI agents 📚⚡
DocsAgent gives AI agents instant, private access to your personal knowledge base.
docsagent is the spec-driven MCP (Model Context Protocol) server that lets
any AI agent — Claude Desktop, Cursor, Cline, Qwen Code, or any MCP client — search, read, and
write your Zotero library, Obsidian vault, and Apple Notes (macOS) through a resident
C++ search engine. BM25 full-text search + query-ranked passage retrieval over 1,000+ PDFs
at ~15 ms, fully local (RAG-ready knowledge base).
- 🔒 Local-first & private — the engine reads your Zotero library, Obsidian vault, and Apple Notes store directly on your machine. Your notes and PDFs never leave it.
- 🗂 Three sources, one query — Zotero items/annotations/notes, Obsidian vaults, and Apple Notes (macOS only); mixed search fuses all three by reciprocal rank.
- ⚡ Native C++ search core — inverted-index BM25 + passage ranking, millisecond lookup, low memory footprint (160–227 MB for a 1,500-paper library).
- 🧩 8 MCP tools — 5 read + 3 write, with JSON-schema validated arguments, token budgets, result dedup, and a three-layer write safety gate.
- 🌐 Two transports — stdio for local MCP clients, Streamable HTTP for remote deployment
(origin checks, API-key / OAuth 2.0 token introspection, per-request RBAC,
/healthprobe). - 🐍 Two shells, one core — this TypeScript package and a feature-equal Python wrapper ship the same tools over the same JSON-RPC contract.
Architecture
The shell never spawns the core during tool calls and never touches your source files. The core runs as a background service and stays available across MCP client restarts. Tool schemas and error codes: spec/.
Quick Start
1. Start the core
Python shell (same verbs, under the core subcommand):
(core stop / core restart also available. The core indexes every configured source — your
Zotero data directory, your Obsidian vault, and (macOS) Apple Notes — and serves JSON-RPC on
http://0.0.0.0:23120/rpc.)
2. Configure your MCP client
Claude Desktop / Cursor / Cline / Qwen Code (mcpServers):
Python shell (same tools, same contract, installed from this repo) — mcpServers:
Install the Python package first (step 1) so docsagent-mcp is on your PATH.
On startup the shell connects to the core, loads sources, and checks index status. If the core is not running it fails fast with startup instructions — it never spawns anything.
MCP Tools (external API)
8 tools, 5 read + 3 write. Schemas are the single-sourced contract in
spec/tools/*.json (mirrored into both packages); arguments are validated
before handlers run and failures map to typed docsagent error codes.
list_sources
Every searchable source with capabilities, supported targets/includes/browse modes, filters, and document counts. Call this first.
Sources today: zotero (targets items, annotations, notes; collections/tags browse),
obsidian (a vault — notes as items, folders/tags browse), and apple-notes (macOS only —
the engine omits the source on other platforms). The vault is found at
~/Documents/Obsidian Vault (override with DOCSAGENT_OBSIDIAN_VAULT); Apple Notes is read
from the system Notes store (override with DOCSAGENT_APPLE_NOTES_DB).
search
Cross-entry search over one source (items, annotations, and notes).
Returns results[] with global ids (zotero:KEY, obsidian:<path>, apple-notes:<uuid>),
titles, relevance, snippets; multi-target
searches group by target. In mode=grep each result carries matchCount and snippets[]
hit windows (hits[] with line/column/offset, and meta hits tagged with field),
relevance is 0, and the response adds totalMatches. Results are deduped (id, then
normalized title + year) and packed under a token budget.
search runs against config.defaultSource (default zotero). Mixed search is a core
capability: pass source: "all" to the core's search / grep methods and every source is
ranked independently, then fused with reciprocal rank fusion (k=60) — each hit is tagged
with its source. BM25 scores are not comparable across corpora, so fusion is rank-based.
get_content
Read one entry. mode=passages (query-ranked passages, k) or mode=fulltext
(offset pagination with nextOffset). Notes return their body with tags and metadata.
get_metadata
include: metadata, abstract, annotations, notes, citation (bibtex / csljson /
formatted via citationFormat/citationStyle). Notes are packed under the token budget.
list_library
Browse modes: collections (drill-down via parentId), items (by containerId),
tags, saved_searches, standalone_notes. Browse modes are per source — Zotero exposes
all of these, while Obsidian and Apple Notes expose folders (drill-down) / tags / items.
Write tools (three-layer safety gate)
Write tools target Zotero sources only — the Obsidian and Apple Notes sources are read-only.
Write safety gate (spec/algorithms/write-gate.md): layer 1 write tools are not
registered unless enableWrites=true; layer 2 confirmed=false returns a preview and
consumes no rate-limit quota; layer 3 confirmed writes consume a per-hour rate limit
(default 30/h). Anything above 20 items in batch_modify additionally reports
requiresConfirmation in the preview.
Engine performance
The C++ engine powers PapersGPT — the same index and retrieval stack ships in this MCP server. Benchmark on a real Zotero installation (full write-up):
- Indexing cost scales roughly linearly with library size; retrieval latency stays constant — a 10,000-paper library (~30 GB) indexes in about 15–20 minutes, and everyday search stays at ~15 ms.
- For comparison: a typical web page load takes 1,000–3,000 ms; a blink of an eye is 100–150 ms. PapersGPT answers in ~15 ms, fully offline.
- Privacy: your library never leaves your machine.
Configuration
Config lives at ~/.docsagent/config.json (or $DOCSAGENT_CONFIG) — one file shared by
the JS shell, the Python wrapper, and the C++ core. Validated against
spec/config.json.
Distribution
Bundled core platforms: macOS universal (Intel + Apple Silicon), Windows x64
(x86_64), Linux x64 (x86_64) — Linux ARM is not supported. Source availability:
Zotero and Obsidian work on every platform; Apple Notes is macOS-only (list_sources
omits it elsewhere).
Both shells read the same config and talk to the same core — pick either (or both) as
your MCP distribution channel. Core lifecycle (start / stop / restart / status)
is available from both CLIs.
Links
- spec/ — the single-sourced contract: 8 tool schemas, 23 JSON-RPC methods, error codes + suggested calls, config schema
- PapersGPT search performance benchmark
- Zotero · Model Context Protocol
License
Apache-2.0
來源:README.md,提交 e9d98c3
工具
0版本歷史
3- v5.0.1最新Sep 28, 2026
- v5.0.0Sep 28, 2026
- v4.0.1Sep 21, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。