Skip to main content
Glama

quillrag

Один файл. Ноль зависимостей. Готов раньше, чем ваш редактор закончит загрузку.

Локальный RAG-движок в одном статическом бинарнике — эмбеддинги MiniLM встроены внутрь, гибридный поиск dense + BM25, нативный MCP. Ни Node, ни Python, ни загрузки модели при первом запросе.

release platforms license


Почему quillrag

~20 мс до готовности

рукопожатие MCP завершается до того, как модель вообще загрузится

Ноль зависимостей во время выполнения

ни Node, ни Python, ни pip/npm, ни загрузок моделей — никогда

Гибридный поиск

dense cosine ⊕ BM25, объединённые с помощью Reciprocal Rank Fusion

Приватность по построению

после установки нет ни одного сетевого пути в коде

Один файл, три ОС

~105 МБ (модель живёт внутри), CI-сборка для linux/macOS/Windows

Related MCP server: mcp-fts5-starter

Быстрый старт

# 1. grab a prebuilt binary (or cargo install --path .)
gh release download --repo Ayush-yadav11/quillrag -p '*linux*'
tar xzf quillrag-x86_64-linux.tar.gz && chmod +x quillrag

# 2. point it at any folder of notes/docs/code
./quillrag index ~/notes          # incremental walk

# 3. ask it something
./quillrag search "how does backpropagation work"

Или подключите его напрямую к Claude Desktop / Cursor и позвольте ИИ искать ваши заметки прямо в ходе разговора — конфиг ниже.

$ ./quillrag serve --data-dir ~/.local/share/quillrag
2026-08-26 INFO quillrag 0.1.2 ready in 41ms      <- handshake-ready before the model loads

Почему это быстро

Этап

Стоимость

Запуск бинарника + инициализация MCP

~20 мс (измерено: только открытие хранилища + регистрация инструментов)

Первый вызов rag_search / rag_index

+~300 мс однократно (mmap safetensors, построение графа BERT)

Последующие поиски

~25 мс на запрос (2-ядерный CPU, небольшой корпус)

Переиндексация неизменного корпуса

почти ноль (пропуск по FNV-хэшу содержимого)

Модель эмбеддингов ленивая: рукопожатие MCP и rag_status её не касаются, поэтому редакторы видят мгновенно готовый сервер.

Установка

Скачайте готовый архив из последнего релиза — Windows x86_64, macOS Apple Silicon и Linux x86_64 собираются CI на каждом теге версии:

# linux/macOS example: fetch + extract the latest release
gh release download --repo Ayush-yadav11/quillrag -p '*linux*' | tar xz
chmod +x quillrag && ./quillrag --version

Или соберите из исходников:

cargo install --path .

Целевые платформы кросс-компиляции, используемые CI: x86_64-unknown-linux-gnu, aarch64-apple-darwin, x86_64-pc-windows-msvc.

Подключение к редактору

Claude Desktop / Cursor / любой MCP-клиент:

{
  "mcpServers": {
    "quillrag": {
      "command": "/usr/local/bin/quillrag",
      "args": ["serve"],
      "env": { "QUILLRAG_DATA": "~/.local/share/quillrag" }
    }
  }
}

Или просто запустите ./quillrag serve и укажите любой stdio-клиент на него.

Инструменты

Инструмент

Что делает

rag_index

Инкрементальная индексация директории/файла. Пропускает неизменённые файлы, удаляет исчезнувшие, пересобирает эмбеддинги только для изменений.

rag_search

Гибридный поиск: dense MiniLM cosine + BM25 keyword, объединённые с помощью Reciprocal Rank Fusion. Возвращает ранжированные чанки с путями к источникам.

rag_status

Количество документов/чанков, проиндексированные байты, разбивка по типам файлов.

rag_clear

Полная очистка.

CLI-эквиваленты (тот же движок):

quillrag index ~/notes              # incremental walk
quillrag search "auth flow" -k 5    # one-shot search
quillrag status                     # stats
quillrag clear                      # wipe

Дизайн

  • Эмбеддинги: candle (чистый Rust) с моделью sentence-transformers/all-MiniLM-L6-v2 — masked mean pooling + L2-нормализация, численно совпадает с sentence-transformers на CPU. Веса встраиваются в бинарник через include_bytes! и отображаются через mmap из материализованного кэша при первой загрузке.

  • Хранилище: один файл redb — текст чанков, сырые f32-векторы, метаданные документов. Атомарные коммиты; устойчивость к сбоям.

  • Ключевые слова: tantivy BM25 sidecar-индекс, пересобираемый за каждый проход индексации (дёшево при карманных масштабах).

  • Слияние: Reciprocal Rank Fusion (Σ 1/(60+rank)) — без настройки шкалы оценок, устойчиво к разнородным ранжированиям.

  • Разбиение на чанки: сначала по абзацам, с ограничением 1000 символов и перекрытием 120 символов; слишком длинные абзацы жёстко разбиваются по границам предложений.

Типы файлов, индексируемые по умолчанию

md markdown txt rst json yaml yml toml csv tsv html htm xml log rs py js jsx ts tsx go c h cpp hpp java rb sh bash zsh sql proto graphql dockerfile makefile ini cfg conf env — расширяется с помощью -e ext1,ext2 / "extensions": [...].

Игнорируемые директории: все dot-директории (.git .obsidian .vscode …) плюс node_modules target dist build venv __pycache__ vendor.

Приватность и занимаемые ресурсы

Всё работает локально: эмбеддинги, хранилище, поиск. Ничто не покидает машину — после установки в коде вообще нет сетевых путей.

Бинарник ≈ 105 МБ (модель внутри). RAM ≈ 120 МБ резидентной памяти в простое, пик до ~250 МБ при пакетной эмбеддинг-обработке.

Масштабирование и ограничения

quillrag хранит всё в одном файле redb и выполняет dense-поиск как точное, однопоточное линейное сканирование всех векторов — ANN-индекса пока нет. Поэтому релевантное ограничение — задержка запроса, а не объём хранилища. Хранилище масштабируется до миллионов чанков; скорость поиска — O(N) на запрос.

Корпус

Векторы

Примерно RAM (f32)

Устойчивый запрос

1K чанков

1K

~1.5 МБ

~25 мс (измерено)

10K чанков

10K

~15 МБ

~250 мс (экстраполяция)

100K чанков

100K

~154 МБ

~2–5 с (экстраполяция)

1M чанков

1M

~1.5 ГБ

20–60 с (экстраполяция — нежизнеспособно без ANN)

Проверено на корпусе из 1K чанков (5/5 тестов, включая реальный e2e через JSON-RPC-over-stdio); цифры выше 1K экстраполированы из стоимости O(N) dense-сканирования, а не измерены. Синтетический пробник масштабирования (src/bin/quillbench.rs) существует для измерения кривой на вашем оборудовании — запустите cargo build --release && ./target/release/quillbench.

Что это значит на практике:

  • Отличное соответствие: личные/локальные базы знаний, документация проектов, заметки, код — до десятков тысяч чанков, где сохраняется задержка от субсекунды до интерактивной.

  • Вне зоны комфорта: корпуса в сотни тысяч и более, где нужен интерактивный (<200 мс) поиск — вам понадобится ANN-индекс (см. Roadmap).

Как это соотносится с распространёнными альтернативами по оси релевантности:

  • Только эмбеддинги (например, сырой FAISS flat / простой векторный стор): тот же потолок all-MiniLM-L6-v2, что и у dense-пути quillrag, но quillrag добавляет слияние BM25 + RRF, которое выигрывает на запросах с большим числом ключевых слов (коды ошибок, ID, точные токены). У quillrag нет реранкера или фильтрации по метаданным, которые llama-index предлагает сверху.

  • Локальные бэкенды llama-index: функционально похожий гибридный поиск (BM25 + вектор + RRF). quillrag обменивает богатые возможности llama-index (реранкинг, parent-child чанкинг, расширение запросов) на один бинарник без зависимостей и мгновенный запуск. Релевантность на стандартных датасетах (BEIR/MS MARCO) ещё не бенчмаркирована — см. открытый issue, отслеживающий ANN и базовый уровень релевантности.

Roadmap

Сегодня quillrag намеренно минималистичен. Главный прорыв — индекс приблизительных ближайших соседей:

  • ANN (HNSW / IVF) по dense-векторам — превращает O(N) сканирование в субмиллисекундный ANN-поиск, поднимая интерактивный потолок с ~10K до миллионов чанков на одной машине.

  • Квантование (PQ / SQ) — снижает RAM для векторов с 4 байт/размерность до ~1 байта/размерность, так что 1M чанков ≈ 380 МБ вместо 1.5 ГБ.

  • Многопоточное сканирование — распараллелить текущий точный путь как временное решение.

  • Хук реранкера — опциональный cross-encoder реранкинг объединённого top-k.

  • Бенчмарк релевантности — BEIR / MS MARCO nDCG@10 против базовых линий llama-index.

Следите за работой над ANN здесь: issue #1 — "ANN index for <1M chunks."

FAQ

Это действительно один файл? Да. Веса MiniLM + токенизатор встроены через include_bytes!. Ни npm install, ни Python, ни загрузки модели при первом запросе. Бинарник ~105 МБ, потому что модель живёт внутри.

Почему запуск такой быстрый? Модель эмбеддингов ленивая. Рукопожатие MCP и rag_status её не касаются — редакторы видят готовый сервер за ~20 мс. Модель загружается только при первом rag_search / rag_index (~300 мс однократно).

Какой максимальный корпус он обрабатывает? Проверено на 1K чанков (~25 мс/запрос). Архитектура масштабируется до миллионов хранимых чанков; интерактивный поиск держится до десятков тысяч сегодня, а ANN-индекс (Roadmap) расширяет это до 1M+.

Чем это отличается от llama-index? Похожее качество гибридного поиска, но quillrag — это один статический бинарник без рантайм-зависимостей и с мгновенным запуском. llama-index добавляет реранкеры, сложный чанкинг и расширение запросов, которых у quillrag пока нет.

Какие типы файлов индексируются? md markdown txt rst json yaml yml toml csv tsv html htm xml log rs py js jsx ts tsx go c h cpp hpp java rb sh bash zsh sql proto graphql dockerfile makefile ini cfg conf env — расширяется с помощью -e.

Он отправляет данные наружу? Нет. После установки в коде нет сетевых путей.

Журнал изменений

  • v0.1.3 — описания MCP-инструментов переписаны для ясности, семантики параметров и прозрачности поведения (флаги read-only/destructive, рекомендации по использованию); server.json включён в репозиторий для публикации в MCP Registry.

  • v0.1.2 — пропуск всех dot-директорий при индексации (конфиги плагинов .obsidian больше не засоряют результаты); первый полностью автоматизированный CI-релиз для 3 платформ. Примечание по обновлению: один раз запустите quillrag clear и переиндексируйте.

  • v0.1.1 — CI-собранные артефакты релиза для linux/macos/windows с контрольными суммами.

  • v0.1.0 — первый публичный релиз; переименован из pocketrag.

Разработка

cargo test                    # unit + end-to-end (spawns real stdio servers)
cargo run -- serve            # dev server
RUST_LOG=debug cargo run ...  # verbose logs (stderr only)

Лицензия: MIT

Available Tools

4 tools
rag_clearA

Destructive: permanently deletes ALL indexed documents, chunks, and embeddings from the knowledge base. Cannot be undone — source files on disk are not touched, but re-indexing from scratch is required afterwards. Confirm with the user before calling.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since there are no annotations, the description carries the full burden of behavioral disclosure. It explicitly states the operation is destructive and permanent, describes what is deleted (documents, chunks, embeddings), what is not deleted (source files on disk), and the necessity of re-indexing. It also includes a confirmation requirement. This is exemplary transparency for a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the critical warning 'Destructive'. Each sentence adds essential information: scope, permanence, what is preserved, and the confirmation requirement. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, no-output-schema destructive tool, the description covers all necessary aspects: what it does, consequences, side effects, and a required user interaction. An agent has everything needed to call it correctly and safely. The absence of an output schema does not matter since no output is described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing to explain beyond the schema. The baseline for 0-parameter tools is 4, and the description does add relevant context about the scale of the deletion, which is useful. No additional parameter details are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific verb 'delete' and the resource (all indexed documents, chunks, and embeddings from the knowledge base). It distinguishes this tool from siblings like rag_search, rag_status, and rag_index by emphasizing it is a destructive clear-all operation. The scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context (destructive, permanent) and an explicit instruction to confirm with the user. It also notes that re-indexing is required afterwards, which implies it should only be used when a full reset is intended. However, it does not explicitly name alternatives or say when not to use it, but the destructive nature makes the usage context obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rag_indexA

Index local documents into the knowledge base before searching. Pass an absolute directory path for a recursive incremental walk (skips unchanged files by content hash, prunes entries for deleted files) or a single file path. Idempotent and safe to re-run; only changed content is re-embedded. Supported types: md/txt/code files (see README for the full list); dot-directories like .git and .obsidian are skipped automatically. After indexing completes, use rag_search to query. To remove everything instead, use rag_clear.

NameRequiredDescriptionDefault
pathYesAbsolute path to a directory of documents (or a single file) to index.
extensionsNoExtra file extensions to include beyond the defaults

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly covers the tool's behavior: recursive incremental walk, content-hash change detection, deletion pruning, idempotency, re-embedding only changed content, and automatic skipping of dot-directories. No contradictions with any structured metadata exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (four sentences), front-loaded with the primary purpose, and each sentence contributes meaningful information. No redundancy or filler; it efficiently packs behavioral details and sibling references without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description adequately explains the tool's actions and effects for an indexing operation, given that no output schema exists. It mentions the workflow step ('After indexing completes, use rag_search') but does not specify the response format or return value. This is a minor gap; for a tool like this, the key context is what gets destroyed/created and when to use it, which is well covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds value by clarifying that 'path' accepts an absolute directory or a single file, and mentions supported types (md/txt/code) which relates to the 'extensions' parameter's defaults. This goes beyond the schema's basic explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Index') and resource ('local documents into the knowledge base'), and explicitly distinguishes itself from siblings by noting that rag_search is for querying and rag_clear is for removal. This makes the tool's role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage context: 'before searching', and directs users to use rag_search after indexing and rag_clear for removal. This effectively routes the agent to the correct workflow and alternatives, leaving no ambiguity about when to invoke this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rag_statusA

Report knowledge base statistics: document count, chunk count, total indexed bytes, and per-file-type breakdown. Read-only and instant (does not load the embedding model). Use it to check whether anything is indexed before running a search.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses that the tool is read-only, instant, and does not load the embedding model. This is good behavior disclosure for a report tool, though it doesn't mention potential limitations like staleness or exact response format, which is minor given the simplicity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste. The first sentence lists the precise report contents, and the second gives usage and behavioral context. Information is front-loaded, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters and no output schema, the description fully covers what it does, what it returns (stats and breakdown), and when to use it. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. The description doesn't need to explain parameters; it appropriately stays silent on them. No additional meaning is required beyond what the schema (empty) provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reports knowledge base statistics (document count, chunk count, total indexed bytes, per-file-type breakdown). It uses a specific verb and resource, and the content distinguishes it from sibling tools like rag_search, rag_clear, and rag_index.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says to use it 'to check whether anything is indexed before running a search,' providing a clear context of use. It doesn't explicitly list when not to use it or alternatives, but the intended use case is clear and the siblings are evident from the tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.3
    • First observedrag_clear
    • First observedrag_index
    • First observedrag_search
    • First observedrag_status

TDQS

A4.6/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a single, clear responsibility: search, status, index, and clear. There is no overlap—even search and status are distinguished by read-only purpose versus metadata reporting. The descriptions explicitly note when to prefer one over the other.

Naming Consistency5/5

All tools follow the same 'rag_' prefix followed by a lowercase verb or noun, all in snake_case. The pattern is uniform and predictable: rag_search, rag_status, rag_clear, rag_index. No mixed conventions or stylistic deviations.

Tool Count5/5

With 4 tools, the server is well-scoped for a RAG knowledge base service. It covers the core operations without unnecessary bloat or missing essentials. This is within the ideal 3-15 range and each tool earns its place.

Completeness4/5

The tools cover the full lifecycle: index (create/update), search (read), status (read metadata), and clear (delete). The only minor gap is the lack of a selective document deletion, but incremental indexing and pruning handle updates well, so agents can work around this limitation.

Maintenance

ActivityMaintained
ResponsivenessWithin a week

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Local-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.
    3
    9 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Drop-in MCP server template with SQLite FTS5 search backend. ~300 lines, no vector DB, no embedding API, runs on a Pi.
    19 PyPI
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server for local RAG over personal notes, PDFs, and documents, enabling plain-English querying and hybrid search with multi-hop context expansion.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for a self-hosted RAG system that enables AI tools to search and retrieve grounded answers from locally ingested documents via MCP tools, with local embeddings and no API key required.
    MIT