Answers you can verify
Citations identify the actual source span—not just a filename. Open the cited lines, PDF page, image region, or exact seconds of a recording.
Local-first MCP knowledge server
Search code, documents, PDFs, audio, and video from any MCP client. Every answer points back to the exact file, line, page, or moment.
Built for trust
dir2mcp is deployment infrastructure for agents: small, inspectable, and grounded in the source material you control.
Citations identify the actual source span—not just a filename. Open the cited lines, PDF page, image region, or exact seconds of a recording.
Status and doctor commands name skipped files, unsupported formats, extraction failures, and partial transcripts—plus what to do next.
Run embeddings and answers with Ollama, extraction with docling, and speech with self-hosted Whisper. A doctor check reports any third-party egress.
Code and Markdown sit beside office files, PDFs, images, transcripts, and time-coded recognition events. Agents use the same small tool surface across all of them.
From folder to MCP
The server becomes available while indexing continues. Connect Claude, Cursor, or any Streamable HTTP MCP client.
Run dir2mcp up inside the directory you want to serve.
Content is extracted, chunked, embedded, and linked to source spans.
Install the endpoint into your MCP client and start asking questions.
brew install dirstral/tap/dir2mcp && dir2mcp upA real local run
This recording uses Ollama with local embeddings and a local Qwen model over three plain Markdown notes.

make demo.Measured, not hand-waved
The published benchmark starts from empty state, indexes a public corpus, asks 120 questions through MCP, and scores answers and citations without a model judge.
of answerable responses contain a gold answer.
file-level precision for inline citations.
of answerable questions include the gold passage in structured citations.
Published local-model run, 24 September 2026: SQuAD 2.0 subset, nomic-embed-text and Qwen 2.5 7B. Results vary by corpus and model.Read the method and raw results.
Choose your path
Start locally, understand the security boundary, then deploy only as far as your use case requires.
Install, choose local or cloud models, index a folder, and connect a client.
02 · Trust boundaryUnderstand auth, exclusions, secret storage, and verified no-egress operation.
03 · Go furtherRun with Docker, behind a tunnel, or beside self-hosted models on a GPU host.
Give your agent a safe, cited way to find it.