# livesync-workers [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/odiak/livesync-workers  
**GitHub Stars:** 20  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/livesync-workers

## Description
Self-hosted LiveSync-compatible backend for Obsidian with search and MCP, on Cloudflare Workers

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/odiak/livesync-workers), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/odiak/livesync-workers.git
```

2. Run:

```sh
cd livesync-workers
```

3. Install:

```sh
npm install
```

4. Configure:

```sh
npm run setup            # creates the Vectorize index and R2 bucket
```

5. Configure:

```sh
npx wrangler secret put LIVESYNC_PASSWORD
```

6. Configure:

```sh
npx wrangler secret put ADMIN_PASSWORD
```

## Documentation

## What livesync-workers does

livesync-workers combines two interfaces for one Obsidian vault. Its `/livesync` route implements the subset of the CouchDB API used by the Self-hosted LiveSync plugin, while `/mcp` exposes the vault to AI assistants through Streamable HTTP. Vault data is held in a SQLite-backed Cloudflare Durable Object, so a separate CouchDB deployment is not required.

As notes synchronize, the Worker updates search data. Full-text search is stored in R2, and semantic search uses embeddings from Workers AI with a Vectorize index. Notes created or changed through MCP become ordinary LiveSync revisions and appear in Obsidian during the next synchronization cycle.

## How it works

Configure the LiveSync plugin to use the Worker URL with `/livesync` as its CouchDB-compatible endpoint. The default database name is `vault`, and the default LiveSync username is `obsidian`. End-to-end encryption must remain disabled because the Worker needs readable note contents for indexing and MCP responses.

MCP clients connect to `/mcp`. OAuth authorization uses the admin password and lets you grant read, append, and write scopes. Read access covers browsing, reading, searching, and status inspection. Append and write permissions are separate and disabled by default. Clients without OAuth support can use a static bearer token; its default permission is read-only, with additional scopes configured separately.

The Worker also sends MCP instructions asking assistants to inspect `AGENTS.md` at the vault root before working with notes. That file can describe vault layout and conventions for generated content.

## Setup and configuration

Deploy through the Cloudflare deployment button or with Wrangler. A Wrangler deployment uses `npm install`, `npm run setup`, three secret commands, then `npm run build` and `npm run deploy`. The setup process provisions the Vectorize index and R2 bucket; the OAuth KV namespace is created on the first deployment.

Required secrets are `LIVESYNC_PASSWORD`, `ADMIN_PASSWORD`, and `SESSION_SECRET`. An optional `MCP_STATIC_TOKEN` supports clients that cannot complete OAuth. Runtime variables include `LIVESYNC_DATABASE`, `LIVESYNC_USERNAME`, `VAULT_EXCLUDED_FOLDERS`, `SEMANTIC_SEARCH`, and `MCP_STATIC_TOKEN_SCOPES`. Excluded folders remain readable but are omitted from search indexes. Setting `SEMANTIC_SEARCH` to `off` disables embedding and Vectorize use while preserving full-text search.

The deployment uses Durable Objects with SQLite, R2, KV, Workers AI, and Vectorize. Cloudflare requires a Workers-enabled account; R2 requires a payment method, and usage beyond free tiers is billed by Cloudflare.

## Tools and capabilities

The MCP endpoint provides these read tools:

- `listDirectory` and `listNotes` for vault navigation
- `listRecentNotes` for recent-note discovery
- `readNote` and `readDailyNote` for retrieving note contents
- `searchNotes` for semantic or search-oriented retrieval
- `grepNotes` for indexed full-text matching
- `vaultStatus` for synchronization and indexing status

Writing is separated into `appendToDailyNote`, `appendToNote`, and `writeNote`. The write operation includes conflict detection. `appendToDailyNote` uses a client-supplied date when available and otherwise uses the current UTC date.

## Limitations and notes

The implementation targets the CouchDB behavior required by Self-hosted LiveSync, not CouchDB as a general-purpose database. Vaults around 100 MB of Markdown, or roughly 12,000 notes, are supported and tested. Full-text indexing stops after 50 million characters and reports the condition through `vaultStatus`; attachments are excluded from that total.

Only the first million characters of each note enter the full-text index, so later content cannot be found with `grepNotes`. Semantic indexing processes the complete note in sections. Full-text matching uses character bigrams for Japanese, Chinese, and Korean, and whole-word matching for ASCII text with case- and width-insensitive behavior. A `grepNotes` query can contain up to 32 indexed terms.

The project is independent of the Self-hosted LiveSync plugin and its author. MCP access and the LiveSync endpoint use separate authentication controls, and repeated failed logins are throttled.

_Full upstream README: https://allmcps.com/mcp/livesync-workers/readme_

