Local RAG + MCP Context Layer
One source of truth for every model I use, local or commercial.
Claude Code, Codex and my local models all start from the same reviewed knowledge base. Brain handles retrieval and memory, the wiki agent turns that memory into reviewed documentation, and MCP servers give each model a scoped, read-only window into live infrastructure. A decision recorded in one tool is available in the others.
How it fits together
- RAG: Brain indexes my Obsidian notes and project docs with hybrid search (SQLite FTS5/BM25 plus local Ollama embeddings in sqlite-vec, merged with reciprocal rank fusion) and serves results over MCP
- One context, many models: the same Brain tools are wired into Claude Code, OpenAI Codex and a private Open WebUI preset for local models (Ollama, MLX), so a decision recorded in one tool is available in the others
- Live infrastructure context: a separate read-only Proxmox MCP (8 GET-only tools, audit-only API token kept in its own container) answers questions about guests, storage, backups and firewall rules
- Open WebUI bridge: an allowlist of 13 read-only tools from Brain and Proxmox, exposed through a loopback-only, key-authenticated bridge that fails closed if any allowed tool isn’t marked read-only
- Model routing by task: local gpt-oss:20b drafts wiki articles from supplied evidence only, Codex runs scheduled daily and weekly fact checks, and I approve every page
Guardrails
- Agents can only write to an inbox; nothing is filed or published until I approve it
- The wiki publishes only reviewed pages whose SHA-256 matches the approval manifest, and scans for secrets before every build
- Secrets, tokens and public IPs are redacted before indexing and on output
- Separate test suites: 288 tests for Brain, 230+ for the wiki agent
Each model starts from the same reviewed sources, so I spend less time re-explaining context between sessions and tools.