# haiku.rag

> haiku.rag is an open-source MCP server for knowledge and memory. Local-first RAG that answers from your documents with page and section citations. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Website:** https://ggozad.github.io/haiku.rag/
- **Repository:** https://github.com/ggozad/haiku.rag
- **MCP Registry name:** io.github.ggozad/haiku-rag
- **Categories:** knowledge and memory, files and documents
- **Listing updated:** 2026-11-14

## About

Answers can be checked: each carries the page number and section heading it came from, and visual grounding highlights the cited chunk on the original page image. An optional capability makes every answer declare what grounds it, including saying that nothing does.

It indexes PDFs, office documents, HTML, Markdown and images through Docling, retrieves with hybrid vector and full-text search plus optional reranking, and can search several databases at once. For questions that need counting or aggregation, the agent runs sandboxed Python across the documents. Storage is an embedded LanceDB, and by default models come from Ollama so no server or API key is required; S3, GCS, Azure and LanceDB Cloud also work.

Besides the MCP server for Claude Code, Codex and Claude Desktop it offers a Python API, Pydantic AI capabilities, a terminal chat, a web app and a haiku-ingester service for continuous ingestion. Requires Python 3.12 or newer and is MIT licensed.

## Features

- **Cited answers:** Page numbers and section headings accompany answers.
- **Visual grounding:** Highlights the cited chunk on the page image.
- **Hybrid retrieval:** Vector and full-text search with optional reranking.
- **Sandboxed analysis:** Runs Python across documents for computation.
- **Continuous ingestion:** Filesystem, HTTP, S3 and WebDAV sources with a job queue.

## Good for

- Ask questions of a folder of PDFs with sources
- Give Claude Desktop a private document search
- Check an answer by viewing the cited page
- Build a Pydantic AI agent on your own corpus

## Install

### Claude Code (Terminal)

```sh
claude mcp add haiku-rag -- uvx haiku-rag
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "haiku-rag": {
      "command": "uvx",
      "args": [
        "haiku-rag"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "haiku-rag": {
      "command": "uvx",
      "args": [
        "haiku-rag"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "haiku-rag": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "haiku-rag"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "haiku-rag": {
      "command": "uvx",
      "args": [
        "haiku-rag"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "haiku-rag": {
      "command": "uvx",
      "args": [
        "haiku-rag"
      ]
    }
  }
}
```

## FAQ

### Does it need an API key?

No by default; it uses Ollama and an embedded LanceDB database.

### What file types?

PDFs, office documents, HTML, Markdown and images.

### Which Python version?

Python 3.12 or newer.

### Is haiku.rag free?

Yes. haiku.rag is open source, so you can use and self-host it for free.

### How do I add haiku.rag to Claude Code?

Run this command in your terminal: claude mcp add haiku-rag -- uvx haiku-rag

### What are the best alternatives to haiku.rag?

The closest alternatives to haiku.rag are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [ASTra](https://ai-powered.com/mcp/astra): ASTra is a freemium MCP server for files and documents.
- [CARTESIAN ECU](https://ai-powered.com/mcp/cartesian-ecu): CARTESIAN ECU is a paid MCP server for files and documents.
- [MedXpert 图书馆连接器（通用版）](https://ai-powered.com/mcp/medxpert): MedXpert 图书馆连接器（通用版） is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/haiku-rag
