Personal Obsidian knowledge-base assistant built with LlamaIndex, Qdrant, DeepSeek, local BGE embeddings, and an MCP server. It indexes markdown notes, supports semantic search, optional BM25 hybrid retrieval, cross-encoder reranking, LLM answer synthesis, and a compiled summary layer for broader topic questions.
- Index Obsidian vault notes into Qdrant for vector search.
- Query raw notes with optional folder and modified-date filters.
- Generate note summaries and folder topic maps into the vault.
- Ingest summaries as a second retrieval layer.
- Expose the knowledge base to LLM agents through MCP tools in
server.py.
Install Python 3.13 and uv, then install dependencies:
uv syncCopy the example environment file and fill in your local values:
cp .env.example .envRequired settings:
DEEPSEEK_API_KEY: DeepSeek API key.VAULT_PATH: Absolute path to your Obsidian vault.QDRANT_URL: Qdrant endpoint, defaulting tohttp://localhost:6333.
Start Qdrant locally before indexing. For example:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrantBuild or rebuild the raw-note index:
uv run python main.py ingest
uv run python main.py ingest --cleanAsk questions against indexed notes:
uv run python main.py query "传统 RAG 有什么局限性?"
uv run python main.py query "attention mechanism" --folder CS336
uv run python main.py query "recent ideas" --after 2025-01-01Generate and index the summary layer:
uv run python main.py summarize
uv run python main.py summarize --dry-run
uv run python main.py summarize --since 2025-01-01
uv run python main.py summarize --folder ai
uv run python main.py ingest-summariesRun the MCP server:
uv run python server.pyThe MCP server exposes tools for querying raw notes, searching summaries, automatic query routing, reading note content, and fetching folder topic maps.
uv run pytest -v