add_document_toolLABSCO SUMMARY
Citations that land on a page number or a timestamp.
The useful part is not that it retrieves — it is that a YouTube answer comes back with the time in the video and a PDF answer with the page, which turns a plausible-sounding claim into one you can go check in ten seconds. Vision enrichment for YouTube is off by default and worth turning on only when the on-screen code and diagrams matter more than the narration; it changes what gets chunked, so re-index after switching it.
What it is
A retrieval server for material that is scattered across formats. It indexes documents into a shared Chroma store with local embeddings, then answers natural-language questions against them with citations pointing back to the PDF page, YouTube timestamp, document name, chunk index or source URL the passage came from.
What you get
- Files, directories and URLs indexed from one call — PDFs, plain
.txt, DiscordChatExporter exports, YouTube videos and playlists, GitHub repositories (withbranch,include_patternsandexclude_patterns) and documentation sites —add_document_tool - Questions answered over the index with filters for
document_id,tag,document_type, PDFpage_min/page_maxand aresponse_styleof thorough or concise —query_tool - What is indexed, with chunk totals, document types, tags and page, message or segment counts —
list_documents_tool - Documents removed by id, and tags set on a document after the fact for filtered search later —
remove_document_tool,set_document_tag_tool,list_collections_tool - Two read-only resources for the client's MCP panel: the indexed-document list and the effective server configuration —
pinrag://documents,pinrag://server-config - A prompt that routes a plain request to the right tool for querying, indexing, listing or removing —
use_pinrag
Requirements
An OpenRouter key in OPENROUTER_API_KEY for the default chat model — PINRAG_LLM_PROVIDER also accepts openai, anthropic or cerebras with their own keys. Embeddings run locally with nomic-embed-text-v1.5, no key, though the first run downloads roughly 270 MB of weights. The package is pinrag on PyPI, launched with uvx --refresh pinrag; uv must be installed and uvx on your PATH. Set PINRAG_PERSIST_DIR to an absolute path so the vector store does not depend on the server's working directory. GITHUB_TOKEN is needed only for private repositories.
Setup effort
One command plus a key — uvx --refresh pinrag, then supply credentials
USE CASES
Learning a subject whose material is spread across formats
Index the book PDF, the conference talk and the reference repository under one tag, then ask questions that draw on all three with each answer citing its own source.
Asking questions about a codebase you have not cloned
Index a GitHub repository URL, optionally scoped by include and exclude patterns, and query it from the editor with chunk-level citations.
Turning a documentation site into an answerable index
Point it at the docs root; pages are discovered through llms.txt or the sitemap before it falls back to a scoped crawl, and answers cite the specific page URL.
Keeping separate research topics from bleeding into each other
Tag documents at index time and filter queries by tag, so a question about one project does not retrieve chunks from another.
6 tools
Listed in project docs. Your client may show a different list.
query_toollist_documents_toolremove_document_toolset_document_tag_toollist_collections_toolBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
- uvx on PATH
- OPENROUTER_API_KEY in your environment
INSTALLATION
Connect your client
Server setup
uvx --refresh pinragMCP Clients
pinrag server — HTTP
pinrag server [--host 127.0.0.1] [--port 8765] # then connect with --server http://127.0.0.1:8765/mcpThe configuration on this page does not set OPENROUTER_API_KEY; the project's instructions put it in a .env file. Check which folder the server reads that file from before you rely on it.