wiki-vault/Wiki/Reference/vault-mcp.md
Travis Herbranson 75ba9f005a compile: promote 5 entities (trellis, vault-mcp, petalbrain, knot-dns, herbyeos)
User-approved promotions from the prior compile's proposal list.
pbs-hub-mcp deferred per user. Wiki domain indexes updated to list the new
entities; Sources left untouched (MCP-written/immutable).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 21:27:52 -04:00

3.4 KiB

type path tags created updated
entity Wiki/Reference
mcp
pgvector
embeddings
wiki
git
2026-05-24 2026-05-24

vault-mcp

What it is

vault-mcp is the MCP server that writes Travis's project plans and session notes into the wiki vault. It is the canonical write path for the Sources/ layer: a create_artifact call dual-writes a Postgres row in petalbrain.wiki and a markdown file in the vault repo, then commits and pushes to Gitea, then chunks and embeds the content into the shared public.embeddings table. It is the machine half of the Wiki/Dev/ai-memory-architecture — agents and the email pipeline write through it; the compile skill reads what it produced. Formerly named homelab-mcp-server / herbydev-mcp.

Current state

Operational end-to-end after a long May-2026 debugging chain (package rename → import paths → tool exposure → wrapper dispatch → env config → schema search_path → git credential helper → token). Key facts:

  • Toolscreate_artifact + update_artifact are canonical; update_artifact mutates metadata only (artifacts are immutable once created); save_note is a hidden deprecation shim
  • Schema — owns petalbrain.wiki as the vault_mcp role (search_path = wiki, public)
  • Embeddings — chunks at 512 tokens / 64 overlap, writes to public.embeddings (source_schema=wiki)
  • NOTIFY → Trello — project-status changes fire a Postgres NOTIFY that n8n turns into Trello card moves; hand-editing frontmatter does not fire it (use the tool)
  • Git push — HTTPS with a lovebug PAT via an env-driven credential helper (the secret never lands in .git/config)
  • The vault:search semantic tool (Sources/Homelab/vault-semantic-search) is designed but not yet built

Where it lives

  • vault-mcp container on the homelab; hostname under *.herbylab.dev behind Authentik + Cloudflare Tunnel
  • Data: petalbrain.wiki schema on homelab-postgres (pgvector:pg17)
  • Local repo: /opt/projects/homelab/vault-mcp/ (renamed from herby-dev)
  • Writes markdown into this vault (/opt/projects/wiki-vault/Sources/)

History

  • 2026-05-06 — Stood up as homelab-mcp-server at mcp.herbylab.dev
  • 2026-05 — Renamed to vault-mcp; artifact tooling (create_artifact/update_artifact) added
  • 2026-05-15 — Owns petalbrain.wiki; chunked embeddings into public.embeddings
  • 2026-05-16/17 — Write surface declared operational end-to-end (dual-write + git push + embeddings) after the full-stack debugging chain