TL;DR: Giving LLMs access to a knowledge base is easy. Giving them scoped, permissioned, read/write access without handing over the keys to the kingdom is hard. Vault Bridge is a Rust middleware layer that sits between an Obsidian LiveSync database (CouchDB) and an MCP client, enforcing policy-as-code boundaries.
The code is available at https://github.com/nareto/vault-bridge.
The Architecture
Vault Bridge treats Obsidian as the front-end and CouchDB as the source of truth. It builds a derived index in PostgreSQL (with optional pgvector embeddings) and exposes REST and MCP interfaces to agents.
The MCP surface is deliberately constrained:
- read an exact vault file with
get_vault_file; - retrieve context with
query_notes,query_base,get_neighbors, andlist_tags; - write through
create_vault_fileandedit_vault_file.
Instead of a generic “ask my vault” black box, authorized clients
read exact Markdown files. They can also use query_base to
execute a subset of Obsidian Bases-style table projections, returning
structured JSON rows directly from the visible working set.
Policy-as-Code Access Boundaries
My vault contains technical specs, public drafts, and private notes. Vault Bridge handles read/write isolation on the server, not through prompt etiquette.
Each token maps to a named context with explicit read, create, and edit rules. A restricted cloud-facing context looks like this:
mcp_tokens:
cloud-agent:
context: non_personal
contexts:
non_personal:
read:
- deny:
path_prefix: "00Journal/"
- deny:
tags_any: ["personal"]
- allow:
default: true
create:
- allow:
default: true
add_tags: ["ai-created"]
edit:
- allow:
tags_any: ["ai-editable"]Code language: YAML (yaml)
This policy applies across all tools. A client cannot bypass its view by switching from a semantic search to an exact file read. The boundary is explicit, reviewable, and enforced before the content reaches the agent.
Proof of Concept: The Daily Scout Data Flow
For more than 100 consecutive days, I have run a daily workflow called Daily Scout through Vault Bridge.
Instead of generating a static newsletter from a user profile, Daily Scout queries Vault Bridge for recent note diffs to map my active working set. It researches relevant external resources (papers, tools, architectures), and writes a formatted Markdown file back to my inbox via create_vault_file.
The agent does not own the note system. It performs a bounded read/write operation over a secure interface, leaving a reviewable artifact in my existing workspace.
Why this matters outside Obsidian
This architecture pattern maps directly to enterprise engineering teams.
Most teams have runbooks, architectural decision records, and support histories spread across internal systems. The tempting pitch is to “connect everything to an AI agent.” In reality, doing that without a strict middleware layer is a compliance and security risk.
The harder, more valuable work is deciding which sources are admissible, exposing them through a predictable MCP interface, constraining what the agent can change, and returning the output to existing human review loops.
If your team is trying to give agents access to internal knowledge without giving them unrestricted authority, I would be happy to compare notes.

