QMD is a local, on-device search engine written in TypeScript designed to index and query markdown notes, meeting transcripts, documentation, and knowledge bases. The tool combines three search approaches—BM25 full-text search via SQLite FTS5, vector semantic search using embeddings, and LLM-based re-ranking—all running locally through node-llama-cpp with GGUF models. This architecture allows users to search their personal knowledge repositories using either keywords or natural language queries without sending data to external services.
The repository is actively maintained by tobi, who accounts for 465 of the tracked events across issues and pull requests. The project shows a median issue and pull request response latency of 85.6 hours, with a mean of 478.7 hours across 313 items. Bug reports represent the most common issue type with 18 tracked instances, followed by enhancement requests with 7 items. The codebase is classified across multiple domains including Markdown processing, SQL querying, SQLite database operations, front matter extraction, and text processing for content analysis.
QMD exposes its functionality through multiple interfaces. The command-line tool supports JSON and file-based output formats optimized for agentic workflows. The repository also implements an MCP (Model Context Protocol) server that can run via stdio or HTTP transport, exposing four primary tools: query for searching with typed sub-queries, get for retrieving documents by path or ID, multi_get for batch retrieval using glob patterns or comma-separated lists, and status for checking index health. The HTTP transport option allows a shared, long-lived server that keeps LLM models loaded in VRAM across requests, with embedding and reranking contexts automatically disposed after five minutes of idle time.
The search fusion strategy employs Reciprocal Rank Fusion with position-aware blending. The system performs query expansion using an LLM variation, conducts parallel retrieval across both FTS and vector indexes, applies RRF fusion with a top-rank bonus for documents scoring first in any list, and then re-ranks the top candidates using an LLM. The position-aware blending adjusts the weight between retrieval and reranker scores based on rank position, preserving exact matches while allowing the reranker more influence on lower-ranked results.
QMD can be used as a library in Node.js or Bun applications through an SDK interface. The tool supports three store creation modes and provides a unified search method handling both simple queries and pre-expanded structured queries. Collections can be configured through a YAML file located at ~/.config/qmd/index.yml by default, with support for XDG_CONFIG_HOME and project-local configurations. The system uses three GGUF models downloaded automatically on first use: embeddinggemma-300M-Q8_0 for embeddings, qwen3-reranker-0.6b-q8_0 for re-ranking, and qmd-query-expansion-1.7B-q4_k_m for query expansion.
The repository includes AST-aware chunking capabilities using tree-sitter for code files, allowing the system to chunk at function, class, and import boundaries rather than arbitrary text positions. This feature is optional and falls back to regex-based chunking if tree-sitter grammars are unavailable. The tool requires Node.js 22 or later, or Bun 1.0.0 or later, with macOS users needing Homebrew SQLite for extension support. QMD is linked via overlapping contributors to repositories including openclaw/openclaw, anomalyco/opencode, and anthropics/claude-code, indicating integration with broader AI and code analysis ecosystems.