haiku.rag
Lets your AI agent search and read your own documents locally and answer questions with page and heading citations.
650 stars on GitHubby ggozadLicense MITUpdated 18 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add haiku-rag -- uvx mcp --stdio haiku-rag
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Index my papers folder and ask what datasets were used for evaluation.
Search my documents for the attention mechanism and cite the pages.
What it is
haiku.rag indexes your PDFs, Office files, HTML, Markdown and images into a local database. It combines keyword and vector search with reranking and answers questions with citations. It uses open models through Ollama by default, so no server or API key is needed.
What it can do
- Search documents with hybrid retrieval
- Read documents the agent finds
- Run sandboxed Python over the documents for counting and aggregation
haiku-rag add-src: index a file, URL or folderhaiku-rag ask: answer a question with citationshaiku-rag mcp --stdio: start the MCP server
When to use
- βΊWhen you want answers from your own PDFs with page numbers
- βΊWhen you need to count or total things across many documents
- βΊWhen you want a private document search that runs on your machine
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
google-cloud-solution-rag-enterprise-search-gke-sqldbDesigns a private enterprise search system that answers questions from your documents, using AlloyDB vectors, an open model and GKE.xerj-knowledgeHelps your agent search your own local documents, notes, PDFs, spreadsheets and mail, and cite the file and page each answer came from.rag-implementationEnables your agent to use external information sources to answer questions. It's useful for building document Q&A systems or connecting AI to knowledge bases.Frequently asked questions
Is it free and open source?
Yes, it uses the MIT license.
Does it need an API key?
Not by default. It uses Ollama locally. Other providers such as OpenAI can be used instead.
Which files can it read?
PDFs, office documents, HTML, Markdown and images, parsed with Docling.
Where is the data stored?
In an embedded LanceDB database, which can also live on S3, GCS, Azure or LanceDB Cloud.
Which clients work with the MCP server?
Claude Code, Codex and Claude Desktop.
Can it show where an answer came from?
Yes. It cites page numbers and headings and can draw the cited chunk on the page image.
If it does not work
- βΊCheck that Python is 3.12 or newer and that Ollama is running with the needed models pulled.
- βΊRun haiku-rag doctor for health checks.
- βΊRun haiku-rag init to create the database before adding documents.
5 new skills a week. 1 minute to read.