Hybrid search over your local documents, with file and page citations. One binary, fully local.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Private document search, for you and your agents. One binary that watches your folders, indexes every document, and hands your agent the right passages over MCP, each with a file and page citation. Nothing ever leaves your machine.
Everyone says finding information in your files is like finding a needle in a haystack. Haypile is the haystack that finds its own needles.

That is the whole setup. Claude Code (or Cursor, or anything that speaks MCP) can now search everything you indexed: search_documents returns ranked passages with citations, and the agent answers from them instead of guessing.
It is a full standalone CLI too:
Search understands meaning, not just words: "agreement cancellation" finds termination clauses. Exact identifiers still match exactly. Every result cites its source file and page.
Or grab a binary from releases, or run the install script:
On Windows, run this in PowerShell:
One binary, around 56MB, with the embedding model inside. No Python, no Docker, no vector database, no model downloads, no network. Text documents index fully offline; scanned PDFs need a local vision model for OCR (hay llm setup).
An agent can open any file you point it at. Finding the right one is the problem: grep matches words, not meaning, and a question about termination clauses does not contain the words the contract used. Reading whole documents to find one passage spends the context window the task needed. Cloud document tools fix this by uploading everything to someone else's computer, and self-hosted RAG stacks fix it with Python environments, Docker, and a vector database to babysit.
Haypile is the missing option: one binary, point it at folders, done.
localhost:11500. search_documents gives Claude Code, Cursor, or your own scripts cited passages from your documents.These are versioned with the code and will not be quietly redrawn:
hay status reports outbound connections; the target is 0. No telemetry. If that ever changes it will be opt-in, documented loudly, and off by default.Everything lives in a single SQLite database on your disk, and search is fully self-contained: the embedding model ships inside the binary. Answers (hay ask) are generated by whatever OpenAI-compatible local server you already run (Ollama, LM Studio, llama.cpp, Jan). Haypile itself ships no LLM and makes no network calls.
hay initFor a folder you work in (a case folder, a project, a paper archive), hay init writes a per-folder config and wires everything up in one go:
It creates .haypile.yml (tag and exclude patterns), indexes the folder, optionally writes .mcp.json so Claude Code and Cursor can search these docs, and offers hay llm setup if you do not have a local LLM yet. hay init --yes runs unattended.
Edit .haypile.yml by hand anytime. The daemon notices and re-syncs the index within seconds:
hay ask retrieves the most relevant passages and has a local LLM answer from them, with citations:
Generation uses any OpenAI-compatible server you already run (Ollama, LM Studio, llama.cpp, Jan), auto-detected on their usual ports, or set explicitly with --endpoint and --model. Without one, hay ask explains and shows the top passages instead. Search never needs an LLM.
Prefer a cloud model for answers? Bring your own key:
The boundary stays sharp: your documents are indexed locally, always. Opting in sends only the retrieved passages for that one question, to an endpoint you chose, with your key (HAYPILE_LLM_API_KEY works too). Keys are refused over plain http to anything that is not localhost.
No local LLM yet? One guided command gets you there:
The daemon exposes MCP (Streamable HTTP) and REST on localhost:11500:
Tools exposed: search_documents (hybrid search with citations) and list_sources. The daemon starts automatically on hay add and only ever listens on localhost.
| Version | Scope |
|---|---|
| v0.x (now) | CLI, REST API, MCP server, hay web local UI. Markdown, text, PDF, docx, pptx, HTML, mbox email. Scanned-PDF OCR via your local vision LLM. |
| v1.x | Bundled OCR (no LLM required), Windows installer polish |
| v2 | Optional larger embedding models, ANN index for very large corpora |
| Pro | Team layer for offices: auth, roles, audit logs, shared indexes (paid) |
Roadmap, decisions, and trust commitments in detail: docs/ROADMAP.md.
Semantic search uses an embedding model that release builds carry inside the binary. Dev builds load it from disk instead, so the weights stay out of git:
Without the model, everything still works in keyword-only mode.
The web UI (hay web) lives in webui/ as a small Vite + Preact app; its built output is committed under internal/webui/dist and embedded in the binary, so go build alone always ships the current UI. Touch the UI with:
Retrieval quality is measured, not vibes: eval/ holds a query set with expected results that runs on every retrieval-affecting change.
Contributions are welcome. Please read CONTRIBUTING.md first. It covers the dev workflow, the rule that the privacy contract (zero outbound, bundled model, localhost only) must stay intact, how contributions are licensed, and the DCO sign-off (git commit -s) that CI enforces.
Found a vulnerability? Please report it privately, not as a public issue. See SECURITY.md for the disclosure process and what is in scope.
AGPL-3.0. Free forever for individuals. The AGPL keeps it free for every actual user while requiring anyone offering Haypile as a service to open-source their changes.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/haypile)<a href="https://allmcps.com/mcp/haypile"><img src="https://allmcps.com/api/badge/haypile?style=directory" alt="Haypile on AllMCPs" /></a>