The Hive
Indexes and searches a Google Drive mirror, including page text and images, and renders Drive pages or pictures as images for agents.
Publishes MQTT wake requests to a home automation system to wake the model host via wake-on-LAN when asleep.
Semantic search over an Obsidian vault, note read/write/edit/append/move/delete tools, wikilink-aware moves, and daily notes.
Serves local embedding and classification models (e.g., embeddinggemma-2, tev1) for semantic search and Scout classification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@The Hivesearch my notes for the k3s Tailscale Funnel setup and summarize it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
colony
The LLM layer of a one-person homelab: an MCP server that gives AI agents search and write access to a personal knowledge base, and small local models that answer narrow questions only after they pass an eval. Everything runs on hardware at home: a Raspberry Pi 4 running k3s hosts the server, and a desktop with an RTX 3070 serves the models through Ollama.
Part | What it is |
The Hive, an MCP server (streamable HTTP, its own OAuth 2.1 authorization server). Semantic search over an Obsidian vault and a Google Drive mirror, note read and write tools with an audit log, and Scout. | |
The nightly indexer: embeds notes by heading, PDF pages as both text and image, pictures, and text files into SQLite, incrementally and resumably. | |
Scout's bench. | |
Guard's test set and runner. A local model triages Home Assistant's warnings into "push a notification" or "just log it", gated on a pass bar. |
The Hive
Tools, all prefixed by the part that serves them:
forager_semantic_search: search by meaning over note chunks, page text and page images, merged with reciprocal rank fusion (image scores run lower than text, so each kind ranks its own hits).forager_related_notes,forager_get_page: neighbours of a note; a Drive page or picture rendered as an image for the agent to read.forager_read,forager_search,forager_search_frontmatter,forager_list, and the write tools (forager_write,forager_edit,forager_append,forager_move, which repoints wikilinks as Obsidian does,forager_deleteto.trash/, and daily notes). Writes are atomic and each is one JSON line in the audit log.scout_classify: one label for a text, from a small local model, logged for 90 days.
Auth is built in: clients register themselves (dynamic client registration), the owner signs in once per client with a username and password, and each client gets its own token, stored hashed and revocable from the command line. Sign-in failures and registrations are rate-limited globally.
When the model host is asleep, search and Scout fail fast with a useful message, and can
publish an MQTT wake request (WAKE_MQTT_HOST) for a home automation to answer with
wake-on-LAN.
Related MCP server: obsidian-gate
Evals
Both model-backed tools are gated, not trusted:
Scout: 144 labelled cases in four kinds. A kind passes at 30+ cases, 95% right, and zero flips across 3 repeats at temperature 0. Currently only extraction passes, so the server's instructions tell agents to use Scout for that and decide the rest themselves.
Guard: 53 seeded and real events. Zero missed must-push events, at most 1 false push in 10; a fixed pre-filter handles known noise, and is scored so that it cannot buy a pass.
Each README records what moved the scores and what didn't, with the saved runs in results/.
Run it
The scripts carry their dependencies inline, so uv is all that is needed:
ollama pull embeddinggemma-2:740m && ollama pull tev1:4b
VAULT_DIR=~/notes INDEX_DB=./index.db uv run --script hive/indexer.py
cp .env.example .env # set the password and PUBLIC_URL
VAULT_DIR=~/notes INDEX_DB=./index.db AUTH_DB=./auth.db SCOUT_DB=./scout.db \
AUDIT_LOG=./audit.jsonl uv run --script hive/server.pyEvery setting is an environment variable, documented at the top of
hive/server.py and hive/indexer.py.
compose.yaml is an example deployment; the real one runs on k3s behind a
Tailscale Funnel. The Drive mirror is optional: point MIRROR_DIR at an
rclone sync of Drive, or leave it out for notes only.
Tests need no model host:
uv run pytestLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared long-term memory vault for AI agents with 20 MCP tools.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables reading, writing, searching, and managing Obsidian vault notes through MCP tools and prompts, allowing AI agents to interact with local knowledge bases.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, search, write, and link notes in an Obsidian vault via MCP tools and resources.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM assistants and agents to query and manage a personal markdown vault as a graph-based knowledge base using hybrid retrieval, with tools for searching, editing, tagging, and recalling memories across MCP-compatible clients.4MIT
- AlicenseAqualityCmaintenanceEnables AI agents to access a local-first personal context and memory layer through MCP tools for bootstrapping user context, semantically searching Markdown vault knowledge, reading files, listing topics, and adding controlled memories. It provides deterministic context retrieval, provenance-cited vector search, and secure vault operations while keeping data local and model-independent.6MIT