Skip to main content
Glama
octagonn

Homelab RAG MCP

by octagonn

Homelab RAG MCP

An MCP server for retrieving Markdown infrastructure documentation using local embeddings, SQLite FTS5, reciprocal rank fusion, and an Obsidian wikilink graph. This is the existing Server-Brain implementation with private paths removed; only the included fictional vault is indexed by default.

Run

Use Python 3.11 or newer in a virtual environment.

python -m pip install -r requirements.txt
python brain_index.py --rebuild
python server.py

The last command starts an MCP stdio server, not an interactive terminal UI. First use downloads the public all-MiniLM-L6-v2 sentence-transformer model. Document embeddings and the generated manifest stay in ignored .data/. There are no paid API calls. The model is used for retrieval, not generation.

Configure an MCP client to run your virtual environment's Python executable with the absolute path to server.py as its argument.

Related MCP server: Mortis-RAG-MCP

Tools

vault_search, get_note, get_service, get_node, whereis, backlinks, list_services, list_nodes, get_manifest, and reindex.

Markdown -> YAML/frontmatter and heading parsing -> content hashing and incremental indexing -> normalized embeddings + FTS5 -> reciprocal rank fusion -> source paths, headings, snippets, and full-note retrieval through MCP.

The retrieval, chunking, indexing, and MCP tools come from the original project. The fictional vault, portable path defaults, containment checks, and automated public tests were added for this edition. This repository demonstrates one of the three MCP servers described in the resume, not all 32 tools.

Your own documents

Set SERVER_BRAIN_VAULT explicitly to an approved document directory. Remove the generated .data/ directory before switching vaults. Never point it at credentials, customer data, or a mixed private document store. Any connected MCP client can read the configured vault; this local server is not a multiuser authorization boundary. Retrieved text is untrusted input to an agent.

Tests

python -m pip install -r requirements-dev.txt
python -m pytest tests -q

Tests include real embedding retrieval over fictional documents and a real stdio MCP handshake. First run requires a model download.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Universal documentation knowledge-graph MCP server with hybrid full-text + vector search. Indexes local files and remote sources from Notion, Jira, Obsidian, Linear, GitHub, and Confluence into a single SQLite knowledge graph, exposing it to AI agents via the Model Context Protocol.
    10
    13 npm
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables semantic and keyword search over Obsidian-style Markdown knowledge bases by registering any folder as a vault, with support for incremental indexing, raw source reads, and cache-backed embeddings over MCP stdio.
    12
    5
    Apache 2.0
  • A
    license
    B
    quality
    A
    maintenance
    Enables local hybrid search over Obsidian and Markdown vaults via MCP, combining vector retrieval, full-text search, reranking, graph navigation, and safe CRUD while keeping data local.
    43
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Turns a plain-Markdown Obsidian vault into a second brain that any MCP-speaking coding agent can search, read, extend, and maintain, using swappable SQLite, Qdrant, or markdown memory backends with automatic re-indexing and wiki-link graph navigation. Exposes read, write, and index tools plus an operator CLI for health, linting, and graph export.
    12
    MIT