The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Obsidian Sync MCP listing page.
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.
The server connects to your vault in two ways:
.md files directly from your vault folder. No database needed.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.
| Need it always available? | Have LiveSync? | Go to |
|---|---|---|
| Yes | Yes | Setup A — add MCP alongside your existing CouchDB |
| Yes | No | Setup B — CouchDB + MCP + LiveSync from scratch |
| No | — | Setup C — filesystem or CouchDB, npx or Docker |
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. 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:
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:
https://your-app.fly.dev/mcp (Fly.io) or http://your-server:8787/mcp (Docker)MCP_AUTH_TOKEN is the password you enter when an agent connectsRequires flyctl for the Fly.io path:
Applies to both Setup A and Setup B.
| Component | Cost |
|---|---|
| CouchDB + MCP VM (shared, 512MB) | ~$3-4/month (kept alive by LiveSync) |
| MCP-only VM (shared, 256MB) | ~$0-2/month (suspends when idle) |
| 1GB persistent volume | ~$0.15/month |
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.
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.
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.
| Tool | Description |
|---|---|
read_note | Read a note's markdown content by path |
write_note | Create or overwrite a note (replaces entire content) |
edit_note | Edit a note without rewriting it — append, prepend (after frontmatter), or replace exact text |
list_folders | List all folders in the vault with note counts — use to discover folder names |
list_tags | List all tags in the vault with counts — use to discover tags before filtering |
list_notes | List notes with timestamps. Filter by folder, name, tag, or date. Sort by name or modified. |
delete_note | Delete a note |
move_note | Move or rename a note — works across folders, creates destination folders automatically |
get_note_metadata | Get frontmatter, tags, outgoing links, backlinks, size, and timestamps — navigate the knowledge graph |
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."
Set MCP_AUTH_TOKEN to a password to enable authentication:
The server includes a self-contained OAuth 2.1 provider. When an agent connects:
MCP_AUTH_TOKEN passwordThe 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.
| Variable | Required | Default | Description |
|---|---|---|---|
VAULT_PATH | Filesystem mode | — | Path to your Obsidian vault directory |
COUCHDB_URL | CouchDB mode | — | CouchDB server URL |
COUCHDB_USER | CouchDB mode | admin | CouchDB username |
COUCHDB_PASSWORD | CouchDB mode | — | CouchDB password (required) |
COUCHDB_DATABASE | CouchDB mode | obsidian | CouchDB database name |
COUCHDB_PASSPHRASE | CouchDB mode | — | LiveSync E2E encryption passphrase (must match plugin setting) |
COUCHDB_OBFUSCATE_PROPERTIES | CouchDB mode | false | Set to true if "Obfuscate Properties" is enabled in LiveSync (obfuscates file paths, sizes, dates in the database). For existing vaults the actual setting is auto-detected at startup; this value only decides the format for a brand-new empty database |
VAULT_NAME | Both | MyVault | Vault name (used for deep links and index storage) |
MCP_AUTH_TOKEN | Optional | — | Password for authentication |
BASE_URL | Optional | http://localhost:PORT | Public URL (for OAuth callbacks when using a tunnel) |
PORT | Optional | 8787 | HTTP port |
HOST | Optional | 0.0.0.0 | Bind address (127.0.0.1 to restrict to localhost) |
MCP_ALLOWED_HOSTS | Optional | — | Comma-separated extra Host values accepted in no-auth mode (e.g. 192.168.1.5,mybox.local). No-auth mode rejects any other Host to block browser DNS-rebinding; localhost is always allowed. Ignored when MCP_AUTH_TOKEN is set. |
DATA_DIR | Optional | ~/.obsidian-mcp | Directory for persisted data (metadata index, auth tokens) |
LOG_LEVEL | Optional | — | Set to debug for verbose logging (library logs, change feed, index sync) |
MCP_REFRESH_DAYS | Optional | 14 | Days before auth session expires |
READ_ONLY | Optional | false | Set to true to disable all write tools (write_note, edit_note, delete_note, move_note). Only read tools are exposed via MCP. Useful when sharing the server with multiple AI clients and write access should be opt-in. |
WRITE_FOLDERS | Optional | — | Comma-separated list of vault-relative folders where writes are allowed (e.g. MCP,Inbox). When set, the whole vault stays readable but write_note, edit_note, delete_note, and move_note refuse paths outside these folders (move_note requires both source and destination to be writable). Enforced server-side, unlike MCP_INSTRUCTIONS. Matching is case-sensitive and folder-boundary-aware (MCP matches MCP/note.md but not MCP-private/note.md). Ignored when READ_ONLY=true; unset means the whole vault is writable. |
MCP_INSTRUCTIONS | Optional | — | Extra text appended to the server's MCP instructions (the string clients inject into the system prompt). Use this to bake vault-specific conventions into the server — e.g. folder structure, naming rules, folders to avoid — so they apply across every MCP client without per-client config. Best-effort: not all clients respect instructions. |
MCP_INSTRUCTIONS_FILE | Optional | — | Path to a file (e.g. markdown) whose contents are appended to the MCP instructions. Easier than MCP_INSTRUCTIONS for multi-line conventions. If both are set, the file wins and MCP_INSTRUCTIONS is ignored (with a startup warning). Missing/unreadable file or files larger than 32 KB are fatal startup errors. Store this file somewhere only the service user can write (e.g. chmod 600) — its contents land in every MCP session's system prompt, so write access to it = prompt-injection access to every client. |
Set VAULT_PATH for filesystem mode or COUCHDB_URL for CouchDB mode.
Test the server interactively using the MCP Inspector:
Set transport to Streamable HTTP, enter http://localhost:8787/mcp, and connect.
| How you run it | How to update |
|---|---|
npx obsidian-sync-mcp | Automatic — npx pulls latest |
| Fly.io | From the same directory where you ran setup: fly deploy. If you lost the fly.toml, run fly config save --app your-app-name to restore it. |
| Docker | docker pull ghcr.io/es617/obsidian-sync-mcp:latest and restart |
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.deploy/setup.sh script works on macOS and Linux. On Windows, use WSL or Git Bash.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.
This software is provided as-is under the MIT license. You are responsible for what agents do with your vault.
MIT — see LICENSE.