
Obsidian Sync Mcp
io.github.es617由 GitHub 帳號 es617 發布v0.5.2更新於 Oct 24, 2026
Give AI agents access to your Obsidian vault via local files or Self-hosted LiveSync.
概覽
讓 AI 助理讀取、搜尋與編輯 Obsidian 儲存庫中的筆記,資料可來自本機檔案或自架的 LiveSync CouchDB。
- 可以做什麼
- 透過 HTTP 提供一組 MCP 工具,操作單一 Obsidian 儲存庫:read_note、write_note、edit_note、delete_note、move_note、list_notes、list_folders、list_tags、search_notes 與 get_note_metadata。檔案系統模式直接讀取 markdown 檔案;CouchDB 模式讀取 Self-hosted LiveSync 資料庫,支援分塊處理與端對端加密。工具回應包含 Obsidian 深層連結,伺服器可於本機執行或部署到常開主機。
- 適用情境
- 適合讓 AI 助理回答筆記相關問題或直接修改儲存庫內容,包括伺服器部署在常開主機時從手機或其他裝置存取。檔案系統模式最簡單;已使用 Self-hosted LiveSync 同步的人適合 CouchDB 模式。
- 執行需求
- npm 套件需要 Node.js 22 以上版本,也可使用 Docker。檔案系統模式需設定 VAULT_PATH;CouchDB 模式需設定 COUCHDB_URL、COUCHDB_USER、COUCHDB_PASSWORD、COUCHDB_DATABASE,可選 COUCHDB_PASSPHRASE;VAULT_NAME 用於深層連結。選用 MCP_AUTH_TOKEN 可啟用 OAuth 驗證,使用通道時需設定 BASE_URL 以處理 OAuth 回呼。CouchDB 資料庫必須已存在。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Obsidian Sync Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Obsidian Sync MCP
[MCP] [License: MIT] [Node] [TypeScript]
Give any AI agent access to your Obsidian vault over MCP. Run it locally against your vault files, or pair it with Self-hosted LiveSync and deploy to the cloud so it works even when your machine is off.
Example: From your phone, ask your AI: "What's in my daily note for today?" — and get the full content back, with a link to open it in Obsidian.
How it works
The server connects to your vault in two ways:
- Filesystem mode — reads
.mdfiles directly from your vault folder. No database needed. - CouchDB mode — reads from a CouchDB database, locally or in the cloud. Your vault syncs to CouchDB via Self-hosted LiveSync, the community Obsidian plugin (600k+ downloads). The MCP server reads from CouchDB directly using livesync-commonlib — the same library that powers the plugin — for proper chunk handling and E2E encryption support.
Both modes expose the same MCP tools over HTTP, so any MCP-compatible agent can connect: Claude, Copilot, custom agents, anything that speaks the Model Context Protocol.
Choose your setup
A. Deploy MCP to the cloud
You already have LiveSync and CouchDB on an always-on server. You just need the MCP server deployed alongside it.
Using Fly.io setup script (macOS/Linux, or WSL on Windows):
The script asks for your CouchDB connection details, vault name, and encryption passphrase.
Or run the Docker image on any always-on server:
Set COUCHDB_PASSPHRASE if you use E2E encryption in LiveSync. Set COUCHDB_OBFUSCATE_PROPERTIES=true if "Obfuscate Properties" is also enabled in your LiveSync settings. For an existing vault the server detects the actual setting from the database at startup and corrects a mismatch with a warning; only for a brand-new empty database does the value need to match your LiveSync settings. If the vault was created with LiveSync 1.0.33+ and path obfuscation, also set COUCHDB_ID_DERIVATION_KEY to your LiveSync recovery code (sls-id-v1:..., from "Show current recovery code") so the server can resolve note paths. Set BASE_URL to your public URL (required for OAuth callbacks when agents connect over HTTPS).
Your MCP endpoint is https://your-app.fly.dev/mcp (Fly.io) or https://your-server:8787/mcp (Docker behind HTTPS).
See Cost for Fly.io pricing.
Requires flyctl for the Fly.io path:
B. Deploy everything to the cloud
Starting fresh — no LiveSync yet. Deploy CouchDB and MCP together, then set up LiveSync in Obsidian.
Using Fly.io setup script (macOS/Linux, or WSL on Windows):
The script generates credentials, creates the database, and deploys. Save the credentials it prints.
Or with Docker Compose on any always-on server:
After deployment:
- In Obsidian, install Self-hosted LiveSync and configure it with the credentials from the setup output
- Your MCP endpoint is
https://your-app.fly.dev/mcp(Fly.io). With Docker Compose the MCP port is published onlocalhost:8787only; to reach it from other machines, put an HTTPS tunnel or reverse proxy in front (see remote access) and setBASE_URLto its public URL - The
MCP_AUTH_TOKENis the password you enter when an agent connects
Requires flyctl for the Fly.io path:
Cost (Fly.io)
Applies to both Setup A and Setup B.
As of March 2026, Fly.io may waive charges under $5/month, which could make this effectively free with a shared IPv4. Either way, cheaper than Obsidian Sync ($4/month) and you own the data.
C. Run on your machine
Run the MCP server locally. Works with filesystem mode (reads vault files directly) or CouchDB mode (if you have LiveSync). Machine must stay on for agents to reach it.
Filesystem mode (simplest):
CouchDB mode (if you have LiveSync):
Omit COUCHDB_PASSPHRASE if you don't use E2E encryption in LiveSync. Set COUCHDB_OBFUSCATE_PROPERTIES=true if "Obfuscate Properties" is also enabled in your LiveSync settings. For an existing vault the server detects the actual setting from the database at startup and corrects a mismatch with a warning; only for a brand-new empty database does the value need to match your LiveSync settings. If the vault was created with LiveSync 1.0.33+ and path obfuscation, also set COUCHDB_ID_DERIVATION_KEY to your LiveSync recovery code (sls-id-v1:...) so the server can resolve note paths.
Or with Docker:
Your MCP endpoint is http://localhost:8787/mcp.
Want remote access? Add a tunnel (machine must stay on):
Set BASE_URL to the tunnel URL when using authentication.
Tools
Every tool response includes an Obsidian deep link (obsidian://open?vault=...&file=...) that works on Mac and iOS.
"Add a bullet point to my daily note." "Find my notes about the MCP server and fix the typo in the second one."
Authentication
Set MCP_AUTH_TOKEN to a password to enable authentication:
The server includes a self-contained OAuth 2.1 provider. When an agent connects:
- A browser window opens with a password page
- Enter the
MCP_AUTH_TOKENpassword - The agent gets an access token and refreshes it transparently
The session is shared across all your Claude interfaces (Desktop, Web, Mobile) and persists across server restarts. You'll need to re-enter the password after 14 days of inactivity (configurable via MCP_REFRESH_DAYS).
For non-OAuth clients (curl, MCP Inspector, custom agents), you can also pass the token directly as Authorization: Bearer <MCP_AUTH_TOKEN>.
Without MCP_AUTH_TOKEN, the server runs without authentication — suitable for local use or behind a private network.
Environment variables
Set VAULT_PATH for filesystem mode or COUCHDB_URL for CouchDB mode.
Try without an agent
Test the server interactively using the MCP Inspector:
Set transport to Streamable HTTP, enter http://localhost:8787/mcp, and connect.
How to update
Known limitations
- Single vault per instance. Each server connects to one vault. For multiple vaults, run multiple instances on different ports.
- Single machine on Fly.io. Auth state is in-memory, so multiple machines break the OAuth flow. The setup script enforces this automatically.
- No conflict resolution. If an agent and Obsidian edit the same note simultaneously, last write wins.
- Text only. Binary attachments are not exposed through MCP tools.
- Deep links depend on the client. Obsidian
obsidian://deep links are included in every tool response. They work on Claude Mobile and in browsers, but some clients (Claude Desktop) may not render them as clickable links. - Node 22+ required.
- Setup script requires bash. The
deploy/setup.shscript works on macOS and Linux. On Windows, use WSL or Git Bash.
Safety
This server gives an AI agent read/write access to your Obsidian vault.
Agents can modify and delete notes. Keep backups. Use tool approval deliberately.
Authentication is optional. Always set MCP_AUTH_TOKEN when exposing to the internet.
Use HTTPS in production. Use a tunnel or deploy behind a reverse proxy.
Don't leave LOG_LEVEL=debug on in production. Debug logging records every tool call's arguments, including note contents, and full error stacks. Credentials embedded in COUCHDB_URL are redacted from logs at every level.
This software is provided as-is under the MIT license. You are responsible for what agents do with your vault.
Development
License
MIT — see LICENSE.
Acknowledgements
- Self-hosted LiveSync by vrtmrz — the Obsidian plugin and CouchDB sync protocol
- livesync-commonlib by vrtmrz — the shared library for reading/writing the LiveSync document format
- FastMCP — TypeScript MCP framework
- CouchDB — document database
- Fly.io — deployment platform
來源:README.md,提交 1a4d53f
工具
0版本歷史
1- v0.5.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分