Context infrastructure for AI-assisted development — on-demand Obsidian vault access via MCP
Project description
hive-vault
Context infrastructure for AI-assisted development — on-demand Obsidian vault access via MCP.
The Problem
AI coding assistants load context statically. A typical CLAUDE.md grows to 800+ lines of standards, patterns, and project knowledge. Most of it is irrelevant to the current task. Every session pays the full token cost.
The Solution
Hive replaces static context with on-demand vault queries via the Model Context Protocol. Your knowledge stays in an Obsidian vault. Claude Code loads only what it needs, when it needs it.
Measured result: 67-82% token reduction on targeted queries vs static context loading.
Install
claude mcp add --transport stdio hive-vault --scope user -- uvx hive-vault
That's it. No cloning, no venv, no setup. uvx handles everything.
Usage
Once registered, Claude Code can use these tools:
# Load project context on demand
vault_query(project="my-project", section="context") # project overview
vault_query(project="my-project", section="tasks") # active backlog
vault_query(project="my-project", section="roadmap") # strategy
# Search across all knowledge
vault_search(query="authentication pattern")
# Access cross-project patterns
vault_query(project="_meta", path="patterns/pattern-language-standards.md")
# Write back lessons and decisions
vault_update(project="my-project", section="lessons", operation="append", content="...")
vault_create(project="my-project", path="30-architecture/adr-003.md", content="...", doc_type="adr")
# Health check
vault_health()
vault_list_projects()
Vault Structure
Hive expects an Obsidian vault with this layout:
~/Projects/knowledge/ # vault root (configurable via VAULT_PATH)
├── 00_meta/
│ └── patterns/ # cross-project patterns
├── 10_projects/
│ ├── my-project/
│ │ ├── 00-context.md # section shortcut: "context"
│ │ ├── 10-roadmap.md # section shortcut: "roadmap"
│ │ ├── 11-tasks.md # section shortcut: "tasks"
│ │ ├── 90-lessons.md # section shortcut: "lessons"
│ │ └── 30-architecture/ # arbitrary paths
│ └── another-project/
└── ...
Configuration
| Environment Variable | Default | Description |
|---|---|---|
VAULT_PATH |
~/Projects/knowledge |
Path to your Obsidian vault |
Architecture
Claude Code (orchestrator)
└── hive-vault (MCP server, stdio)
├── vault_query — read sections or files on demand
├── vault_search — full-text search across vault
├── vault_update — write with YAML frontmatter validation + auto git commit
├── vault_create — new files with auto-generated frontmatter
├── vault_health — project health metrics
└── vault_list_projects — discover available projects
Development
git clone https://github.com/mlorentedev/hive.git
cd hive
uv venv && uv pip install -e ".[dev]"
# Quality checks
uv run ruff check src/ tests/
uv run mypy src/
uv run pytest tests/ -v --cov=hive
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hive_vault-0.2.0.tar.gz.
File metadata
- Download URL: hive_vault-0.2.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5334ce91cad0e86a84040486d57b01dc86cd14398fc8cc4708e04c328d41a35
|
|
| MD5 |
03895afc95f9060b0fd55c6d64f32867
|
|
| BLAKE2b-256 |
6aa26e1dd68657c4314a24d2592135fc9615091285841c8f22277d46aa37ea00
|
Provenance
The following attestation bundles were made for hive_vault-0.2.0.tar.gz:
Publisher:
release.yml on mlorentedev/hive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hive_vault-0.2.0.tar.gz -
Subject digest:
e5334ce91cad0e86a84040486d57b01dc86cd14398fc8cc4708e04c328d41a35 - Sigstore transparency entry: 1008257101
- Sigstore integration time:
-
Permalink:
mlorentedev/hive@a583e6e6798f81db327dd73773eacd0dbcfdc974 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/mlorentedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a583e6e6798f81db327dd73773eacd0dbcfdc974 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hive_vault-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hive_vault-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88f5f0288590ef5c0d2c8ec3f914d11bc765e5c6a36c4904a7d513b7a6a76ad2
|
|
| MD5 |
afa45d4088639fc5ca95312c60035ade
|
|
| BLAKE2b-256 |
5c343bbd580bb49dfdf2a92b15a45c1d498666e6eb709013cd60c96fe5ec6dfe
|
Provenance
The following attestation bundles were made for hive_vault-0.2.0-py3-none-any.whl:
Publisher:
release.yml on mlorentedev/hive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hive_vault-0.2.0-py3-none-any.whl -
Subject digest:
88f5f0288590ef5c0d2c8ec3f914d11bc765e5c6a36c4904a7d513b7a6a76ad2 - Sigstore transparency entry: 1008257107
- Sigstore integration time:
-
Permalink:
mlorentedev/hive@a583e6e6798f81db327dd73773eacd0dbcfdc974 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/mlorentedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a583e6e6798f81db327dd73773eacd0dbcfdc974 -
Trigger Event:
push
-
Statement type: