# ndjordjevic/pinrag [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/ndjordjevic/pinrag  
**GitHub Stars:** 2  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ndjordjevic-pinrag

## Description
RAG for PDFs, YouTube, GitHub repos, Discord exports; index documents and query with citations.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "pinrag": {
    "command": "uvx",
    "args": ["--refresh","pinrag"],
    "env": {
      "OPENROUTER_API_KEY": "",
      "PINRAG_PERSIST_DIR": ""
    }
  }
}
```

**Requires environment variables:** `OPENROUTER_API_KEY`, `PINRAG_PERSIST_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What ndjordjevic/pinrag MCP server does

ndjordjevic/pinrag MCP server builds a shared retrieval index from mixed research and development sources. Supported inputs include PDF files, ebooks, plain text files, local directories, DiscordChatExporter text files, YouTube videos or playlists, GitHub repository URLs, and web documentation sites. An assistant can then query the indexed material in natural language rather than searching each source separately.

The returned answers include source-oriented citations. Depending on the input, citations can identify a PDF page, a YouTube timestamp, a text or Discord document name, a GitHub chunk index, or a documentation URL. Documents can receive tags during indexing, allowing queries to narrow results to a subject or collection of materials.

## How it works

The server uses LangChain-based retrieval with Chroma storage and exposes the workflow through MCP. Documents are added with `add_document_tool`, searched with `query_tool`, inspected with `list_documents_tool`, and deleted with `remove_document_tool`. Additional tools manage document tags and collections. The `use_pinrag` MCP prompt can guide an assistant through querying, indexing, listing, or removing documents.

Retrieval supports structure-aware chunking by default. Optional features include FlashRank re-ranking, multi-query expansion, and parent-child chunks for PDFs. YouTube vision enrichment can combine transcript content with on-screen code, diagrams, labels, and interface text. OpenAI and Anthropic vision modes use scene keyframes and require the optional vision dependencies and ffmpeg; OpenRouter native video mode avoids local video download and ffmpeg.

Queries can filter by document ID, tag, document type, and PDF page range. The response style can be set to thorough or concise. Local Nomic embeddings are used by default, with model weights downloaded and cached on first use. The LLM provider and model are configurable through environment variables.

## Setup and configuration

Install `uv`, ensure `uvx` is available on the PATH, and configure the server in the MCP client’s environment block. The standard editor command uses `uvx` with the `pinrag` package. Set `OPENROUTER_API_KEY` when using the default OpenRouter provider and choose an absolute `PINRAG_PERSIST_DIR` for stored index data. The server does not load `.env` files when launched by an editor.

Cursor configuration uses an `mcpServers` object. VS Code GitHub Copilot configuration uses a top-level `servers` object. The ndjordjevic/pinrag MCP server also offers a streamable HTTP mode through `pinrag server`, with the MCP endpoint available at the configured host and port.

GitHub indexing accepts repository URLs and optional branch, inclusion, and exclusion patterns. `GITHUB_TOKEN` can provide access to private repositories or reduce rate-limit issues; PinRAG does not provide OAuth. Large GitHub files above the configured size limit are skipped.

## Tools and capabilities

- Index local files, directories, PDFs, URLs, videos, playlists, repositories, and documentation sites.
- Query indexed content with metadata and page-range filters.
- List indexed documents, chunk counts, metadata, and optional tag-filtered results.
- Remove documents using their exact indexed document IDs.
- Set document tags and list available collections.
- Read `pinrag://documents` and `pinrag://server-config` MCP resources.
- Optionally trace activity with LangSmith and receive MCP tool log notifications.

The ndjordjevic/pinrag MCP server is suited to the 🔎 end to end RAG platforms category because ingestion, persistent indexing, retrieval, filtering, and citation display are handled through one MCP-based workflow.

_Full upstream README: https://allmcps.com/mcp/ndjordjevic-pinrag/readme_

