The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Hive listing page.
Your AI coding assistant forgets everything between sessions. Hive fixes that.
Hive is an MCP server that connects your AI assistant to an Obsidian vault. Instead of loading everything upfront, it queries only what's needed — on demand.
| Metric | Without Hive | With Hive |
|---|---|---|
| Context loaded per session | ~800 lines (static) | ~50 lines (on demand) |
| Token cost for context | 100% every session | 6% average per query |
| Knowledge retained between sessions | 0% | 100% (in vault) |
Measured on a real vault with 19 projects, 200+ files. See benchmarks.
Hive runs without a vault — vault tools return a friendly error until VAULT_PATH is set, so you can install first and configure later.
Default vault path:
~/Projects/knowledge. Override withVAULT_PATH(orHIVE_VAULT_PATH) as shown above.
For Codex CLI, GitHub Copilot, Cursor, Windsurf, and other clients, see Getting Started.
Then ask your assistant: "Use vault_list to see my vault"
Hive degrades gracefully — every recommended or optional dependency reveals more capability without breaking the baseline.
Required
00_meta / 10_projects / 50_work / 80_agents is optional — without it, vault tools still operate but the scope routing is flat.Recommended
git initialised inside the vault. Without it, vault_write / vault_patch still write to disk; they just skip the per-write commit (and vault_commit reports the working tree as untracked).vault_write(commit=False) / vault_patch(commit=False) to push the git workload off the synchronous tool path; see Recommended configuration below.Optional
qwen2.5-coder:7b (or compatible) for local, free delegate_task / capture_lesson worker calls.OPENROUTER_API_KEY) as a free-tier and paid fallback worker.Per ADR-006 (commit policy), the recommended pairing for write-heavy flows is:
vault_write(..., commit=False) and vault_patch(..., commit=False) for all bulk operations.vault_commit(message="...") at the end of a session to force a checkpoint sooner than the obsidian-git tick.vault_health reports a ## external_committer block when it detects obsidian-git in the vault. The commit=False durability contract is explicit: files are persisted to disk regardless; only the commit is deferred. A crash before the next flush loses the commit, not the content.
When a tool call is cancelled mid-flight (slow worker, client timeout), the server may have already mutated the disk before the cancel ack reaches the wire. vault_health surfaces a ## ghost_responses counter and emits a mcp.ghost_response.suppressed_after_cancel_ack WARNING for each event — verify state via vault_query rather than retrying, since the ErrorData ack does not imply rollback (ADR-007).
The default uvx hive-vault runs a fresh server per session. Daemon mode instead runs one long-lived hive serve that owns the vault, with each session connecting through a thin hive client shim — useful for concurrent sessions, single-owner guarantees (ADR-011), and automatic version adoption. It always degrades to an in-process server if the daemon is down, so it never breaks a session.
To install a newer release, use the platform-specific command:
On Windows, self-upgrade builds the release beside the running files and atomically switches
the managed runtime, avoiding in-use-file conflicts. Open a new terminal after the first managed
upgrade so its PATH change is available. Once supervised, the daemon detects the new installed
version, exits 75, and the supervisor restarts it into the new code. See the
daemon mode guide and the
activation runbook.
| Tool | What it does |
|---|---|
vault_query | Load project context, tasks, roadmap, lessons — or any file by path |
vault_search | Full-text search with metadata filters, regex, ranked results, recent changes, lesson-usage ranking (rank_by) |
vault_list | Browse projects and files with glob filtering |
vault_health | Server identity (version, vault path, backends), health metrics, drift detection, usage stats, opt-in runtime block |
vault_write | Create, append, or replace vault files. commit=False defers the git commit for batching |
vault_patch | Surgical find-and-replace. commit=False defers the git commit for batching |
vault_commit | Flush pending commit=False writes into one git commit |
capture_lesson | Capture lessons inline / batch-extract from text / look up existing lessons by keyword (find=) |
session_briefing | Tasks + lessons + git log + health in one call |
delegate_task | Route tasks to cheaper models or summarize vault files |
worker_status | Budget, connectivity, available models |
Plus 5 resources and 4 prompts for guided workflows.
Every read of a lesson via vault_query, vault_search, or capture_lesson(find=…) increments a counter and grows that lesson's confidence asymptotically toward 1.0. Validated lessons rank higher than one-shot captures over time.
Storage: SQLite side-table at HIVE_LESSON_DB_PATH (default ~/.local/share/hive/lesson_reinforcement.db). WAL mode + busy_timeout make it cross-process safe.
Full documentation at mlorentedev.github.io/hive:
Project-bound knowledge (docs-as-code) lives in docs/:
docs/adr/ — Architecture Decision Recordsdocs/runbooks/ — operational proceduresdocs/troubleshooting/ — known issues and root-cause write-upsdocs/lessons.md — accumulated gotchas and post-mortemsSee CONTRIBUTING.md for setup and PR workflow.