docshelf
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
docshelf
Local search over large document collections for Claude Code. Point it at folders of PDFs, Word files, Markdown and text files. Claude then finds the passages that answer a question by meaning (ranked, each with its file and page) and can turn the whole collection into a skill.
Why: what it adds to plain folder search
Claude Code can already search a folder: it finds files by name and lines by exact words, then reads the files. For a few documents, or when you know the exact wording, that is all you need.
On a large collection that breaks in three places:
The words don't match. You ask how to keep an audience curious; the book calls it a "curiosity gap". Exact-word search finds nothing, or hundreds of unranked hits. On a test library of nine books (about 2,000 pages), one common English word matched 217 times across the books, while the same idea typed in another language matched nothing.
Reading everything does not scale. A handful of books is hundreds of thousands of words: more than fits in Claude's working context, slow and expensive to read again for every question, and lost anyway when a long session gets summarised.
Answers need a source. For a script, a design rule or a client brief you want "page 64 of X", not "somewhere in the folder".
docshelf builds an index of the collection once, on your computer, and connects it to Claude Code as a tool,
search_docs. After that a question returns the 5-8 passages closest in meaning, ranked, each with its file,
chapter and page, in about half a second on an NVIDIA GPU, even when the wording or the language differs.
Claude reads only those passages, cites the page, and opens the full document when it needs more.
Plain folder search | docshelf | |
Finds | exact words, file names | meaning: synonyms, paraphrases, other languages |
Returns | every match, unranked | the best 5-8 passages, ranked |
Source | file and line | file, chapter and page |
What Claude reads | whole files, again for every question | a few passages |
Best for | a few documents, code, exact names and IDs | hundreds to thousands of pages |
When you don't need it. Under about 500 pages, give Claude the documents directly (a Claude Project or a folder works). For code and exact identifiers, plain search is better.
From documents to a skill. Optionally, docshelf turns the collection into a Claude Code skill: agents
read each document and write digests with page references, a separate auditor checks every reference, and
the finished skill keeps the key rules always at hand while calling search_docs for details and citations.
Under the hood: structure-aware chunks (pages, chapters, headings), BM25 for exact terms plus multilingual
embeddings for meaning, merged and then reordered by a cross-encoder reranker. Details: docs/DESIGN.md.
Related MCP server: rag-mcp-server
Requirements
Windows 11 (tested); Windows 10 should work but is untested.
An NVIDIA GPU with about 4 GB of free video memory and a current driver (tested on an RTX 50-series card). Without one it runs on the CPU, slowly.
About 11 GB of free disk space: Python environment 3.3 GB, models 3.5 GB, a temporary download cache up to 3.3 GB, plus the index (small).
Claude Code, and internet access for the one-time downloads.
uv (Claude offers to install it if it is missing) and git to clone this repository.
Install: give it to Claude
Clone or copy this repository somewhere permanent, then tell Claude Code:
Read
<path to this repository>/CLAUDE.mdand set up docshelf for me.
Claude follows .claude/skills/docshelf-setup/SKILL.md. It will ask you:
which folders to index, and what each holds;
a name for the library and a line on what it is about;
where to put the Python environment and the models (outside the repository);
whether the search should be available in all your projects or in one;
before each download (with size and source), before registering the search server with Claude Code, and before any optional scheduled task.
It then checks your GPU driver, picks the matching PyTorch build, installs everything, downloads the models,
builds the index, runs a test search, registers the server, proves that the server answers over stdio
(doctor --mcp-check) and installs a small skill that tells Claude when to search.
The one step left to you: restart Claude Code, approve the new server if asked and allow the
search_docs tool the first time it is used. Then check it: /mcp lists the server, and "use search_docs
to find what the documents say about ..." returns passages with pages.
To install by hand instead, follow docs/INSTALL.md.
What runs where
Everything runs locally: indexing, embeddings, reranking, search. There is no cloud service and no LLM in the search itself.
Claude Code starts the search server itself, as a child process talking over stdio. It opens no network port.
docshelf is installed into its environment as a normal package: nothing is written into this repository, so it can be read-only. After updating the repository, re-run the install line (
docs/INSTALL.md, step 5).Network is used only to download PyTorch, the Python packages and the two models (Qwen3-Embedding-0.6B and bge-reranker-v2-m3) once.
Claude sees only the passages a search returns, as part of your conversation, not your folders as a whole.
A rebuilt index is picked up by the running server on its next search, without restarting Claude.
Quality and speed (measured, stated honestly)
The pipeline and its ranking constants were measured on one library of about 3,000 chunks, using 89 questions with known answer pages. Your documents are different; no accuracy figure is claimed for them.
Speed: about 0.4-0.7 s per query on an NVIDIA GPU once the models are loaded. The first search in a session loads the models (10-20 s). On a CPU a query takes about 15-30 s.
Memory: about 3.3 GB of video memory and 3 GB of RAM while the server is in use (about 6 GB of RAM on CPU).
Indexing: about 50 s for a first build of 2,600 chunks on a GPU; later builds only process new or changed files.
Queries in a different language from the documents work through the multilingual models. An extra cross-language step (the "bridge") runs by default only for queries that contain letters outside the Latin script, whatever that script is; see
docs/DESIGN.mdfor what it can and cannot do.
Limits
No OCR: scanned PDFs without a text layer give no text. Run OCR first and index the result. PDFs whose text layer is broken (one character per line, spaced-out letters) are indexed as extracted and searched poorly; the build and
doctorname the file and pages so you can re-export or OCR them.Formats in this version: PDF, DOCX, Markdown, plain text. No spreadsheets, slides, HTML, e-books or images.
Tested on Windows with an NVIDIA GPU (CUDA 13 build of PyTorch). Other PyTorch builds and the CPU-only install are documented but untested.
For live team tools (Slack, Jira, Confluence) use Claude's official connectors rather than indexing them: they stay current and respect each person's permissions.
Optional
A daily re-index as a Windows scheduled task (opt-in):
scripts/register-reindex-task.ps1.A skill for your field built from your documents:
.claude/skills/docshelf-build-skill/SKILL.md.
Uninstall
Remove the MCP server (claude mcp remove <name> --scope <scope>, with the scope it was registered in;
for local or project scope run it in that project's folder), the <name>-search skill folder, the
scheduled task if you made one (scripts/unregister-reindex-task.ps1), the Python environment and the
library folder with its index. Deleting the model cache (about 3.5 GB) is optional. Step by step: the "Uninstall" section of
docs/INSTALL.md.
License
MIT, see LICENSE. Third-party components and their licences: docs/LICENSES.md.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search, read and install Agent Skills (SKILL.md) for Claude Code, Cursor, Codex and Copilot.
Search verified Claude Code plugins and skills; fetch portable SKILL.md sources. Read-only.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search, browse & read 340+ Claude Code marketing & SEO skills from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to search and query personal document collections (PDF, Word, Markdown, text) using semantic search and conversational AI with full context preservation across exchanges.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to index and semantically search through PDFs, code, and documents with exact citations and zero hallucinations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to search and read the user's local document collection (PDF, Word, Excel, Markdown, plain text) during a conversation by subject, by file name/path, or by exact word, and to retrieve file contents page by page. It also supports finding folders relevant to a topic and checking indexing status, with everything running locally on the user's machine.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to perform local hybrid search over crawled web pages and personal PDF, Markdown, HTML, and text documents, returning cited passages with source, section, page, and score details. It also exposes tools to list documents, retrieve full document text, and check index status.3Apache 2.0