The Context
Every AI conversation started from zero. The most concrete proof was my internship applications: for every opening, I adapted my CV, and the AI helping me didn't know me, or was out of date. I re-explained my context, my experience, my projects, whatever matched the role. When I forgot a detail, I went back to another AI to find it. My profile was scattered across several AIs, each with its own version of me. I wanted my knowledge base to be reachable by any AI (ChatGPT, Claude, Cursor, opencode), not locked in one tool.
What I Built
A self-hosted "second brain": an Obsidian vault as the source of truth, versioned on a private GitHub repo, indexed by an n8n pipeline into Qdrant (vector store), embedded locally with Ollama bge-m3, and generated with DeepSeek V4 Flash Vision (via the OpenCode Go gateway). Everything is exposed to any AI through a dedicated MCP server, authenticated with OAuth.
Three MCP tools:
second_brain_ask
RAG over my whole knowledge base: any AI asks a question, gets a sourced answer (projects, stack, CV, lessons learned).
second_brain_add
Any AI can write notes. Each note is auto-classified (type, tags, folder), checked against duplicates, and held in quarantine until I validate.
second_brain_project_details
The AI goes to find the real implementation of a feature in the actual code (GitHub), on demand. Wired to GitHub today, to other tools tomorrow (GitLab, issues, internal docs), without bloating the vault.
Differential ingestion (every 30 min)
Private repo, deterministic-ID chunking, only new or changed chunks are embedded (~2 s in steady state). Idempotent, loss-free.
Housekeeping (weekly)
A report flags redundant note pairs (semantic similarity), written in quarantine for me to review.

Impact
One base, any AI
A single MCP URL (/mcp/second-brain-kb, OAuth) lets ChatGPT, Claude, Cursor or opencode read AND write my knowledge with source citations.
Privacy by design
Embeddings run 100% locally (Ollama) on my VPS, no third party indexes my notes. Zero extra API cost.
Human gate
Nothing an AI writes enters the searchable base without my validation (status: pending), a guard against prompt injection.
Robust ingestion
Deterministic IDs, no duplicates even under concurrent runs; timestamped cleanup, no data loss. ~2 s in steady state.
Quality controls
Duplicate writes refused at ≥ 75% similarity, notes auto-classified, weekly redundancy report.
What it's useful for (beyond applications)
The CV was the trigger, but the same base serves many other things: preparing an interview ("summarize project X and my technical choices"), finding an architecture decision in my notes, having the AI dive into a project's source, or feeding my articles. Each time, it's time saved by not re-explaining or digging around.
And above all: the AI knows how I develop (structure, naming, patterns, best practices). On a new project, it applies what I've already done well elsewhere, instead of producing generic code.
What This Experience Taught Me
Shipping a production MCP server surfaced several hard-won lessons: OpenAI model nodes don't expose custom headers (the OpenCode Go gateway requires x-opencode-session), call the API directly over HTTP; splitInBatches aborts on empty items, prefer linear pipelines; uncontrolled AI writes are a real threat, the quarantine-by-status pattern is the simplest effective gate; and re-indexing is not idempotent by default, deterministic IDs (content hash) make ingestion duplicate-free, differential and near-instant.
