# Hive Vault

Gives your coding assistant on-demand access to an Obsidian vault instead of loading everything up front. Useful when project context lives in markdown files.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: mlorentedev
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mlorentedev/hive
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/hive-vault

## What it does

The server exposes 17 tools, 5 resources and 4 prompts for working with an Obsidian vault. It queries what a task needs rather than dumping the whole vault into context. Knowledge stays in the vault, so a new session does not start from nothing.

You need Python 3.12+ and a directory of markdown files. Hive starts fine without `VAULT_PATH`; vault tools just return an error until you set it, so installing first and configuring later works. With `git` initialised inside the vault, `vault_write` and `vault_patch` commit each change. Without it, files still land on disk and only the commit is skipped. `delegate_task` and `capture_lesson` call an OpenAI-compatible `/v1` endpoint configured through `HIVE_WORKER_BASE_URL`, `HIVE_WORKER_API_KEY` and `HIVE_WORKER_MODEL`.

An optional daemon mode runs one long-lived `hive serve` process that owns the vault, with stdio sessions relaying through `hive client`. The default endpoint is a per-user port picked from `49152..65535`; override it with `HIVE_DAEMON_PORT` in the daemon and in every client environment. Until issue #456 is resolved, daemon mode does not belong on untrusted multi-user hosts.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `VAULT_PATH`, `HIVE_OLLAMA_ENDPOINT`, `OPENROUTER_API_KEY`, `HIVE_VAULT_SCOPES` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env VAULT_PATH=<VAULT_PATH> --env HIVE_OLLAMA_ENDPOINT=<HIVE_OLLAMA_ENDPOINT> --env OPENROUTER_API_KEY=<OPENROUTER_API_KEY> --env HIVE_VAULT_SCOPES=<HIVE_VAULT_SCOPES> --transport stdio hive-vault -- uvx hive-vault
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from hive-vault <command>

### Codex

**Platform CLI**
```bash
codex mcp add hive-vault --env VAULT_PATH=<VAULT_PATH> --env HIVE_OLLAMA_ENDPOINT=<HIVE_OLLAMA_ENDPOINT> --env OPENROUTER_API_KEY=<OPENROUTER_API_KEY> --env HIVE_VAULT_SCOPES=<HIVE_VAULT_SCOPES> -- uvx hive-vault
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from hive-vault <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "hive-vault": {
            "command": "uvx",
            "args": [
                "hive-vault"
            ],
            "env": {
                "VAULT_PATH": "<VAULT_PATH>",
                "HIVE_OLLAMA_ENDPOINT": "<HIVE_OLLAMA_ENDPOINT>",
                "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>",
                "HIVE_VAULT_SCOPES": "<HIVE_VAULT_SCOPES>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from hive-vault <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "hive-vault": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "hive-vault"
            ],
            "env": {
                "VAULT_PATH": "<VAULT_PATH>",
                "HIVE_OLLAMA_ENDPOINT": "<HIVE_OLLAMA_ENDPOINT>",
                "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>",
                "HIVE_VAULT_SCOPES": "<HIVE_VAULT_SCOPES>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from hive-vault <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e VAULT_PATH=<VAULT_PATH> -e HIVE_OLLAMA_ENDPOINT=<HIVE_OLLAMA_ENDPOINT> -e OPENROUTER_API_KEY=<OPENROUTER_API_KEY> -e HIVE_VAULT_SCOPES=<HIVE_VAULT_SCOPES> hive-vault uvx hive-vault
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from hive-vault <command>

## When to use it
- pull a specific note out of an Obsidian vault on request
- save a note into the vault from inside a session
- patch an existing markdown file without opening an editor
- commit vault changes at the end of a session
- hand a task to a worker through an OpenAI-compatible endpoint

## Example prompts
- Use `vault_list` to show me my vault
- Find notes about the project architecture in my vault
- Write the session summary to the vault and commit it

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
