
Haypile
io.github.BenyD由 GitHub 账号 BenyD 发布v0.3.1更新于 Oct 25, 2026
Hybrid search over your local documents, with file and page citations. One binary, fully local.
概览
Haypile 是一个本地文档搜索服务器,为文件夹建立索引,并通过 MCP 让助手从你自己的文件中获得带引用的段落。
- 可以做什么
- 对已索引文档进行语义与关键词混合检索,返回带文件和页码引用的排序段落(search_documents)。列出当前已索引的文件夹和文档(list_sources)。索引文件夹与文件,并通过文件监视保持更新。借助本地或自选的 OpenAI 兼容模型,基于检索到的段落回答问题。
- 适用场景
- 当助手需要根据个人或工作文档(如合同、案卷、论文、项目笔记)回答问题,并应引用来源而不是猜测时使用。适合希望检索留在本机、不把文档上传到云端服务的用户。
- 运行要求
- 以发布二进制或包管理器安装的本地进程,运行在桌面环境。守护进程只监听 localhost,通过 MCP Streamable HTTP 或 stdio 访问。文本索引完全离线可用;扫描版 PDF 需要本地视觉模型做 OCR。生成答案需要本地 OpenAI 兼容服务器,或你提供的端点和密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 Haypile,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Haypile
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.
[hay demo: add a folder, search by meaning, verify zero outbound connections]
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.
Install
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).
Why
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.
- Agent-ready. MCP and REST on
localhost:11500.search_documentsgives Claude Code, Cursor, or your own scripts cited passages from your documents. - Hybrid search. Semantic and keyword, merged. Paraphrases match by meaning; case numbers match exactly.
- Citations always. Every result and every answer points to the source file and page.
- Always fresh. Folders are watched. Save a file and it is searchable in seconds.
- Verifiably private. See below.
Trust commitments
These are versioned with the code and will not be quietly redrawn:
- The open/paid boundary is declared upfront. Open forever (AGPL-3.0): indexing, search, ask, REST API, MCP, CLI, and the upcoming single-user web UI. The full single-user product, no feature hostages. Paid (later): team features such as auth, roles, audit logs, shared indexes, and a hosted version.
- "Zero external connections" is a verifiable feature, not a claim.
hay statusreports outbound connections; the target is 0. No telemetry. If that ever changes it will be opt-in, documented loudly, and off by default. - No silent network behavior. A local-first tool must never phone home to keep working.
- All development happens in this public repo. No private-repo surprises.
How it works
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.
Set up a folder properly: hay init
For 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:
Ask questions (bring your own LLM)
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:
Use from Claude Code, Cursor, or your own tools
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.
Commands
Roadmap
Roadmap, decisions, and trust commitments in detail: docs/ROADMAP.md.
Development
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.
Contributing
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.
Security
Found a vulnerability? Please report it privately, not as a public issue. See SECURITY.md for the disclosure process and what is in scope.
License
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.
来源:README.md,提交 45faf84
工具
0版本历史
1- v0.3.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分