A personal, self-hosted knowledge base that your AI agent uses as native, persistent memory. Markdown notes, wikilink graph, hybrid semantic search — and a first-party MCP server.
Giving an agent persistent memory usually means assembling a notes app, an MCP bridge, an embedding pipeline, and sync between them yourself. Kybase is that whole stack as one docker compose up — no SaaS, no accounts, 100% private.
13 tools (search, graph, backlinks, CRUD for notes and folders) over Streamable HTTP — works with Claude Code, Claude Desktop and claude.ai connectors.
pgvector + Ollama embeddings, hybrid RRF fusion with bilingual full-text search. Pluggable providers: Ollama, Google, or OpenAI.
[[Title]] links, backlinks panel, interactive graph view with semantic edges computed from embedding similarity.
App, PostgreSQL 16 + pgvector, and Ollama in one compose file. Single-secret auth, plain-markdown export/import.
git clone https://github.com/Kyrzin/kybase.git
cd kybase
cp .env.example .env
# set KYBASE_SECRET (openssl rand -hex 32)
docker compose up -d --build
Open http://localhost:3000 and log in with your KYBASE_SECRET. Migrations apply automatically; Ollama pulls the embedding model (~270 MB) once in the background.
{
"mcpServers": {
"kybase": {
"type": "http",
"url": "https://your-domain/api/mcp",
"headers": { "Authorization": "Bearer <KYBASE_SECRET>" }
}
}
}
The server ships with MCP instructions that teach the agent to search before writing and to interlink notes — so the knowledge graph grows as the agent works, instead of accumulating orphan notes.
| Layer | Tech |
|---|---|
| Frontend | Next.js App Router, React 19 |
| Database | PostgreSQL 16 + pgvector |
| Embeddings | Ollama nomic-embed-text / Google / OpenAI (768-dim) |
| Search | RRF hybrid: pgvector HNSW cosine + bilingual FTS |
| MCP | @modelcontextprotocol/sdk Streamable HTTP |