Hive is an MCP server used to connect AI coding assistants to an Obsidian vault, solving the problem of AI assistants forgetting context between sessions. It does not preload all content; instead, it queries the needed information on demand.
Purpose and positioning Hive is positioned as "context infrastructure for AI-assisted development." It enables AI assistants to access Markdown files in an Obsidian vault and retrieve project knowledge, documentation, and lessons learned on demand, rather than stuffing the entire vault into the context.
Main capabilities
- On-demand access to an Obsidian vault, with adaptive context loading.
- Full-text search and ranked search.
- Vault health checks (vault_health), which can report external committers, ghost response counts, and other status.
- Automatic git commits: vault_write / vault_patch can write to disk and commit, and also support deferred commits with commit=False.
- Task delegation: delegate_task / capture_lesson can call an OpenAI-compatible /v1 endpoint as a worker, handing tasks off to cheaper models.
- Lesson reinforcement: each time a lesson is read via vault_query, vault_search, or capture_lesson(find=...), its count increases and its confidence asymptotically approaches 1.0, and verified lessons rank higher.
- Provides 5 resources and 4 prompts for guiding workflows.
How to use Hive integrates with AI assistants via the MCP protocol. By default it uses uvx hive-vault to start a new server for each session; an optional daemon mode is also available, running a long-lived hive serve that owns the vault, with each stdio session connecting via hive client. The default vault path is ~/Projects/knowledge, which can be overridden via VAULT_PATH or HIVE_VAULT_PATH. When VAULT_PATH is not set, vault tools return a friendly error, so you can install first and configure later. After installation, you can give the assistant instructions such as "Use vault_list to see my vault".
Dependencies and configuration Required: Python 3.12+ (compatible with 3.13); a directory containing Markdown files. The vault structure (00_meta / 10_projects / 50_work / 80_agents) is optional; without that structure the vault tools still work, but scope routing is flat. Recommended: initialize git inside the vault; write the vault manually using the Obsidian desktop app; use the obsidian-git plugin with an auto-commit interval of 5–10 minutes, together with vault_write(commit=False) / vault_patch(commit=False) to move the git workload off the sync tool path. Optional: any OpenAI-compatible /v1 endpoint as a worker for delegate_task / capture_lesson, configured via HIVE_WORKER_BASE_URL, HIVE_WORKER_API_KEY, HIVE_WORKER_MODEL; back up a git remote repository (such as a private GitHub repository) so history is preserved if the disk is lost.
Use cases Suitable for developers who want AI coding assistants to remember project knowledge, documentation, architecture decision records (ADRs), runbooks, troubleshooting records, and lessons learned across sessions. Project-related knowledge is stored in docs-as-code form in the docs/ directory, including docs/adr/, docs/runbooks/, docs/troubleshooting/, docs/lessons.md.
Limitations and cautions
- Daemon mode has a security caveat: until #456 is resolved, do not deploy daemon mode on untrusted multi-user hosts.
- If a tool call is canceled midway, the server may have already modified the disk before the cancellation acknowledgment arrives; vault_health will show a ghost_responses count and issue a warning, and you should verify the state via vault_query rather than retrying, because an ErrorData acknowledgment does not mean a rollback.
- Daemon mode by default uses a deterministic per-user port in the 49152..65535 range, which can be overridden via HIVE_DAEMON_PORT; hive serve --port only changes the port the daemon binds to and does not reconfigure hive client or hive delegate.
- NotTo disable certificate verification, http:// is no longer available; do not print or copy tokens into logs or shell history.
- Lesson reinforcement data is stored in a SQLite side table, with the default path ~/.local/share/hive/lesson_reinforcement.db, using WAL mode and busy_timeout to ensure cross-process safety.
For more documentation, see mlorentedev.github.io/hive, including Getting Started, Configuration (all 19 environment variables), Vault Structure, Use Cases, Architecture, Troubleshooting.