# haiku.rag

Index documents, search them through an AI agent, and get answers with page and section references. Useful when questions need evidence from your own files.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 635
- Author: ggozad
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ggozad/haiku.rag
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/haikurag

## What it does

haiku.rag indexes PDFs, office files, HTML, Markdown, and images. Its MCP server lets an assistant search the collection, read documents, and run sandboxed Python for counts or aggregations. Answers cite pages and section headings; citations can also be checked against the corresponding page image.

Search combines vector and full-text retrieval, while Docling handles document ingestion. Start the server with `uvx haiku-rag --stdio`; LanceDB can use an embedded local database. Ollama supplies embeddings and answers by default, so this setup needs no API key. Python 3.12 or newer is required, which rules out older Python environments.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add haiku-rag -- uvx haiku-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>

### Codex

**Platform CLI**
```bash
codex mcp add haikurag -- uvx haiku-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "haikurag": {
            "command": "uvx",
            "args": [
                "haiku-rag"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "haikurag": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "haiku-rag"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add haikurag uvx haiku-rag
```
uvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>

## When to use it
- find a passage across indexed documents
- answer questions with page and section citations
- count mentions across a document collection
- check a figure against a specification

## Example prompts
- Search the indexed documents for the self-attention section and cite its pages.
- Count how many documents mention transformers and show the supporting passages.
- Check whether this figure matches the specification.

## Similar
- [nemo-retriever](https://affpapa.org/en/nevibecode/skills/nemo-retriever.md) — skill · 2400 installs
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 777
- [veritasgraph](https://affpapa.org/en/nevibecode/mcp/veritasgraph.md) — MCP server · ★ 325
- [langchain-rag](https://affpapa.org/en/nevibecode/skills/langchain-rag.md) — skill · 17500 installs
- [rag-implementation](https://affpapa.org/en/nevibecode/skills/rag-implementation.md) — skill · 13906 installs
- [agent-platform-rag-engine-management](https://affpapa.org/en/nevibecode/skills/agent-platform-rag-engine-management.md) — skill · 8626 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
