scholar-mcp
little-librarian
A local MCP server that indexes .epub files and exposes semantic search tools
backed by pplx-embed-context-v1 (late chunking) and Qdrant.
MCP client (Claude Desktop, Claude Code, …)
│
▼ tool calls via MCP
server.py
pplx-embed-context-v1-0.6b + Qdrant (local)Files
File | Role |
| MCP server — epub ingestion, embedding, search, Qdrant storage |
| Separate MCP server for code (AST-based chunking) |
Why pplx-embed-context-v1
Uses late chunking: all chunks from a chapter go through a single forward pass, so each chunk embedding captures full document context without needing a doc-prefix at inference time. Scores 81.96 nDCG@10 on ConTEB.
Quick start
# 1. install
pip install -e .
# 2. ingest your library (runs embedding, then exits)
HF_HUB_OFFLINE=0 python server.py --index ./library
# 3. start the MCP server
python server.py
# optional: preload the model at startup
python server.py --preloadMCP tools
Tool | Description |
| Semantic search, returns top-k passages with scores |
| Search grouped by |
| Retrieve full text for a book/chapter |
| List all indexed books with chapter counts |
| Qdrant collection info (point count, vector size) |
| Full content breakdown: books, chapters, chunks per book, avg chunk length |
| Show which device (CPU/GPU) is used for embeddings |
Claude Desktop config
{
"mcpServers": {
"little-librarian": {
"command": "python",
"args": ["/path/to/server.py"]
}
}
}Hardware guidance
Setup | Min VRAM |
CPU only | 0 GB |
GPU (pplx-embed-0.6b) | ~2 GB |