PKV Sync
io.github.CyberKurry/pkv-sync · 11 stars · Rust · AGPL-3.0
MCP server Self-hosted, Git-native Obsidian vault sync with a built-in MCP server, search, and wiki lint.
Install
The repo has no one-line install. Follow its README.
Published as
- Docker
ghcr.io/cyberkurry/pkv-sync:1.10.2stdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
PKV_TOKENRequired · Secret | Env var | A PKV Sync device token with access to the vault this session should expose |
PKV_VAULT_IDRequired | Env var | Vault id the MCP session exposes (the vault is listed in the admin panel) |
Files
PKV Sync
PKV Sync is a self-hosted, Git-native sync server for Obsidian vaults.
The name is PKV Sync: PKV is the initialism of Personal Knowledge Vault, and Sync is spelled out in full.
Document version: v1.10.2.
English · 简体中文 · 繁體中文 · 日本語 · 한국어
Status
PKV Sync 1.10.2 ships its MCP Registry metadata under the canonical
GitHub namespace case (io.github.CyberKurry/pkv-sync), which is the name
the registry's OCI ownership check compares against. The product content
matches 1.10.1: an edit made while a pull is downloading a file becomes a
visible conflict instead of being pushed over the other device's committed
version; a file the server refuses is reported on every pass instead of
turning the status bar green, and one per-file rejection no longer wedges
the rest of the vault; moving a note with a non-ASCII name keeps its
Markdown links intact; and an interrupted self-update restores the previous
plugin build. Upgrade the server and plugin together.
Features
Sync
- Multi-user, multi-vault sync over authenticated devices, with per-vault push locks and idempotent retries.
- Real-time push. Small edits land sub-second over Server-Sent Events; polling stays as a safety net.
- Git is the source of truth. Every vault is a bare git repo, so per-file history, unified diff, and single-file restore work out of the box — in the plugin and in the admin panel.
- Conflict-safe. The plugin never silently overwrites local edits;
conflicts surface as
.conflict-*files with a one-click resolver.
Operate
- Admin panel in five languages (English, 简中, 繁中, 日本語, 한국어) for users, device tokens, vaults, invites, activity, and blob GC, with confirmation dialogs for destructive vault and user actions.
- AI-readable vaults. MCP exposes read/write tools over stdio or the
embedded
/mcproute onpkvsyncd serve(default on), and a ready-to-use MCP Registry entry ships with every release (io.github.CyberKurry/pkv-sync). - Built for LLM-maintained wikis. Beyond reading and writing, an agent can search by frontmatter, page through results exactly, lint a layer's links, find the pages whose sources went stale, and write behind a dry run plus content-hash guards — see the LLM Wiki workflow.
- Bounded by default. Admin-created passwords follow the setup-grade strong policy, token secrets are shown exactly once, uploads and MCP responses are size-capped, and live SSE streams revalidate revoked tokens.
Design
- Mature technology, on purpose. Single binary, single SQLite metadata DB, one bare git repo per vault, one content-addressed blob per attachment.
Quick start with Docker Compose
The recommended path. Caddy in deploy/caddy/ fronts HTTPS via Let's
Encrypt; PKV Sync sits on 127.0.0.1:6710 inside the compose network and
never sees plain HTTP from the public internet.
You need a domain name (e.g. sync.example.com) with A/AAAA records
pointing at the server, and ports 80 and 443 reachable from the
internet (port 80 is needed for ACME HTTP-01 validation).
Set up the stack
-
Generate a deployment key:
docker run --rm ghcr.io/cyberkurry/pkv-sync:latest genkey
-
Drop
config.tomlnext todocker-compose.yml:[server] bind_addr = "0.0.0.0:6710" deployment_key = "k_0123456789abcdef0123456789abcdef" # replace with genkey output public_host = "sync.example.com" # required, makes admin POSTs work [storage] data_dir = "/var/lib/pkv-sync" db_path = "/var/lib/pkv-sync/metadata.db" [network] trusted_proxies = ["172.16.0.0/12"] # Docker bridge network [mcp] embed_in_serve = true # default; set false to disable
-
Edit
deploy/caddy/Caddyfileand replacesync.example.comwith your real domain. -
Bring the stack up:
# The server runs as uid 65532. Docker would create ./data as # root:root and the first start would fail to create the database. mkdir -p data && sudo chown 65532:65532 data docker compose up -d
Open
https://sync.example.com/setupin your browser and create the first administrator account. -
Install
pkv-sync-plugin.zipin Obsidian (<vault>/.obsidian/plugins/pkv-sync/), enable it, paste the share URL from the admin panel, then log in or register and pick a vault.
Update
docker compose pull && docker compose up -d
Where to go next
Native installs, reverse-proxy tuning (Caddy / Nginx / Traefik),
public_host semantics, backup and restore, and disk encryption are covered
in the deployment hardening guide.
MCP deployment modes
MCP HTTP is embedded-only: [mcp].embed_in_serve defaults to true, so
pkvsyncd serve mounts /mcp on the main server port, sharing the same TLS
termination, reverse proxy, deployment key, and bearer token enforcement. Set
embed_in_serve = false to disable it. The standalone
pkvsyncd mcp --transport http --bind process was removed in this version —
point existing standalone deployments at the main server's /mcp. Local AI
tools can also use the stdio transport: pkvsyncd mcp --vault <id>.
Obsidian plugin
Local files are the source of truth — the plugin reads and writes your
normal Obsidian vault on disk, no proxy filesystem. Non-sensitive plugin
settings and sync indexes live in
<vault>/.obsidian/plugins/pkv-sync/data.json; login state, the active bearer
device token, deployment key, and stable device identity live in Obsidian's
device-local storage instead. Treat Obsidian device-local storage, plaintext
backups, and legacy plugin data.json copies as sensitive. Device tokens renew
on use, expire after 90 idle days, and have a 365-day absolute lifetime; logging
in again on the same device rotates the active token.
Day-to-day features — command palette, file history, side-by-side diff,
conflict resolution, selective .obsidian sync, device management, and
self-update — are covered in the
user manual.
Encryption today
PKV Sync 1.0 does not yet ship native end-to-end encryption — the server can read vault contents. Native per-vault E2EE is planned for the 1.x roadmap as an opt-in mode, because encryption trades away the server-side features (history diff, three-way auto-merge, inline SSE payload, MCP read/write) that make Git-native PKV useful.
If you need E2EE before it lands, layer
git-crypt on your vault: marked
paths reach the server as ciphertext blobs it cannot decrypt. Filenames
stay plaintext on the server (acceptable for most threat models). Standard
git clone and pkvsyncd materialize still work for clients that hold
the key.
For real deployments, also run behind HTTPS, restrict
trusted_proxies, encrypt the data disk, and encrypt backups — see the
deployment hardening guide.
Documentation
| Topic | Doc |
|---|---|
| Day-to-day plugin usage | user manual |
| Server admin and runtime settings | admin manual |
| Every CLI command and flag | CLI reference |
| Upgrading from 0.x to 1.0 | 1.0 upgrade notes |
| Reverse proxy, TLS, backups, hardening | deployment hardening |
| HTTP API contract | OpenAPI spec |
| MCP setup and tool list | MCP how-to |
| LLM-maintained wiki workflow | LLM Wiki how-to |
| Migrating from Obsidian Sync | migration guide |
| Security disclosures | SECURITY.md |
| Release history | CHANGELOG.md |
Development
cargo fmt --all -- --check cargo clippy --workspace -- -D warnings cargo test --workspace cd plugin npm run typecheck npm exec vitest run npm run build
CI runs the full Rust matrix on Linux and Windows, plus plugin tests/typecheck/build/package, a Docker build, and release-binary smoke tests.
Contributing
Bug reports, feature requests, and pull requests are welcome. Open an issue first for anything larger than a bug fix. See CONTRIBUTING.md for build and test commands, the commit and release flow, and the docs rules that CI enforces.
License
AGPL-3.0-only. See LICENSE.
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 11
- License
- AGPL-3.0
- Language
- Rust
- Last push
- 2026-11-19
- Forks
- 1
- MCP Registry
- io.github.CyberKurry/pkv-sync
- Topics
- git, obsidian, rust, self-hosted, sqlite, sync
Also new this week
- 73rust-anythingio.github.erkamyaman/rust-anythingRewrite an app in Rust one piece at a time, checked against the original's recorded behavior.8.1k
- 144obsidian-wikiio.github.Ar9av/obsidian-wikiMemory for agents in a markdown vault you own: search, read, write, recap, context packs.3.8k
- 150Z-Libraryio.github.heartleo/zlibSearch and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.3.5k
- 178LearnHouseapp.learnhouse/learnhouseBuild, edit and run courses, learning paths and communities in your LearnHouse academy.2.5k
- 183MR Officeai.mroffice/officeCreate, open and edit documents, spreadsheets and PDFs in MR Office's editor, inline in chat.2.4k
- 227Seal Open Datafr.sealopendata/open-dataFrench public open data (data.gouv.fr) cross-referenced by commune, EPCI and department.1.7k