haiku.rag — Claude Code MCP server: document search
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.
claude mcp add haiku-rag -- uvx haiku-ragWhat haiku.rag 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.
What it helps with
- 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 for the agent
- 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.
How to install haiku.rag
Platform CLI
claude mcp add haiku-rag -- uvx haiku-raguvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>
Platform CLI
codex mcp add haikurag -- uvx haiku-raguvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
gemini mcp add haikurag uvx haiku-raguvx runs the command named after the package; if the README names another one, use uvx --from haiku-rag <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about haiku.rag
How do I install haiku.rag in Claude Code?
Run claude mcp add haiku-rag -- uvx haiku-rag. The command registers the server through uvx.
What does haiku.rag do?
It gives an assistant document search, document reading, and a sandboxed Python environment. Answers can cite page numbers and section headings.
Does haiku.rag need an API key?
Its default setup uses Ollama for embeddings and answers, so that configuration needs no API key. Other providers supported by Pydantic AI can be used instead.