Haiku Rag logo

Haiku Rag

Search, read, and analyze your indexed documents through MCP using LanceDB-backed RAG with citations.

Install Haiku Rag

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "haiku-rag": {
      "command": "uvx",
      "args": [
        "haiku.rag"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The haiku-rag MCP server exposes search, document reading, and sandboxed Python analysis over documents indexed into LanceDB. It uses hybrid vector and full-text retrieval, with section-aware context and citations that can include page numbers and headings. Ollama provides the default local embedding and answer models, while Pydantic AI-compatible providers can be substituted. Reach for it when an agent needs grounded answers, document lookup, or counting and aggregation across a private document collection.

Use cases

  • Search a private research library from an AI assistant
  • Answer questions with page and section citations
  • Count documents or occurrences with sandboxed Python
  • Read relevant passages from an indexed document collection

Key features

  • Hybrid vector and full-text document retrieval
  • Document reading through MCP
  • Sandboxed Python for counting and aggregation
  • Page and section citation support
  • LanceDB-backed embedded storage
  • Ollama-based local model defaults

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/25 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · haiku.rag (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars669Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Haiku Rag works

What haiku-rag does

haiku-rag turns a LanceDB document collection into MCP-accessible knowledge for AI assistants. The server lets an assistant search indexed content, read relevant document material, and execute sandboxed Python against the documents for tasks such as counting and aggregation. Answers can cite source page numbers and section headings, making it possible to trace a response back to the indexed material.

The underlying project is an agentic retrieval-augmented generation system rather than a general-purpose file browser. Documents must first be indexed with haiku-rag, after which the MCP interface can retrieve and analyze their stored representations. The project stores Docling-processed document data, including structure such as headings, tables, pictures, and page provenance.

How it works

Run the server over standard input and output with:

bash
haiku-rag mcp --stdio

An MCP-compatible client starts the process and communicates with it through the stdio transport. The assistant can then use the exposed document search and reading functions, along with the Python sandbox, to gather evidence and perform calculations.

Retrieval combines vector and full-text search. Optional reranking and section-aware context expansion can improve the material supplied to an answer, while image-capable retrieval and vision models support collections containing figures. Searches can span multiple named databases. The RAG workflow can also use the retrieved documents for numerical questions instead of relying only on generated text.

The database is embedded LanceDB storage by default. LanceDB data can also be hosted on S3, GCS, Azure, or LanceDB Cloud. Ollama is the default route for embeddings and answers, so a local setup can run without an API key or separate model server managed by haiku-rag. Providers supported by Pydantic AI can replace it.

Setup and configuration

Install Python 3.12 or newer, then install the package:

Terminal
pip install haiku.rag

A slim package is also available when you want to select optional components yourself:

Terminal
pip install haiku.rag-slim

Create and populate a database before launching the MCP process. For example, the CLI can initialize storage and index a PDF, URL, or directory:

bash
haiku-rag init
haiku-rag add-src paper.pdf

The default configuration uses Ollama for embeddings and answer generation. Other model providers, S3 access, and the continuous-ingestion service are optional installation choices. Claude Code can register the server through the haiku-rag plugin; separate setup instructions are available for Codex and Claude Desktop.

Tools and capabilities

The MCP interface provides:

  • Search across indexed documents using hybrid retrieval.
  • Read document content selected from the indexed collection.
  • Run sandboxed Python for document-based counting and aggregation.
  • Produce grounded answers with page and section citations.
  • Work with several named databases in a search operation.
  • Use document figures with vision-capable models where the configured retrieval and model providers support them.

The wider haiku-rag package also includes a Python API, CLI search and chat, document ingestion for PDFs, office files, HTML, Markdown, and images, plus citation inspection. Those functions are part of the surrounding project; the MCP entry point is specifically intended to make document search, reading, and Python analysis available to assistants.

Limitations and notes

The server operates on indexed content rather than automatically discovering arbitrary files at query time. Document ingestion is a separate step, either through the CLI or the optional haiku-ingester service. Local operation depends on the models configured for Ollama, while alternative providers may require their own packages, services, or credentials. A client must support MCP over stdio, and the database must be accessible to the process that launches the server.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Haiku Rag

haiku-rag is an MCP server that connects AI assistants to documents indexed in LanceDB. Its main tools support hybrid search, reading document content, and running sandboxed Python for counting or aggregation. Retrieved answers can include page-number and section-heading citations, with Ollama used by default for local embeddings and answer generation.

Install it with Python 3.12 or newer using `pip install haiku.rag`, then initialize and populate a database before starting `haiku-rag mcp --stdio`. The `haiku.rag-slim` package is available when you want to choose optional components separately.

Yes, haiku-rag works with Claude Desktop through its MCP setup. Start the server with the stdio command and configure Claude Desktop to launch it; the project also provides MCP setup guidance for this client.

Yes, the project names both Claude Code and Codex as supported MCP clients. Claude Code can register the server through the haiku-rag plugin, while Codex uses the project's MCP configuration.

Yes, providers supported by Pydantic AI can replace the default Ollama setup. Ollama is used by default for embeddings and answers, and the project also documents use with OpenAI-compatible endpoints and other provider options.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHaiku Rag AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/haiku-rag?style=directory)](https://allmcps.com/mcp/haiku-rag)
HTML Embed
<a href="https://allmcps.com/mcp/haiku-rag"><img src="https://allmcps.com/api/badge/haiku-rag?style=directory" alt="Haiku Rag on AllMCPs" /></a>