scholar-mcp
MCP server for local semantic retrieval over a library of ebooks, using pplx-embed-context-v1 embeddings stored in Qdrant, enabling an LLM agent like Gemma 4 to search and retrieve relevant passages for answering questions.
README
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 |
|---|---|
server.py |
MCP server — epub ingestion, embedding, search, Qdrant storage |
code_librarian.py |
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 --preload
MCP tools
| Tool | Description |
|---|---|
search(query, top_k) |
Semantic search, returns top-k passages with scores |
search_groups(query, group_by, limit, group_size) |
Search grouped by "book" or "chapter" — best for cross-volume research |
get_passage(book, chapter, max_chars) |
Retrieve full text for a book/chapter |
list_books() |
List all indexed books with chapter counts |
collection_stats() |
Qdrant collection info (point count, vector size) |
library_stats() |
Full content breakdown: books, chapters, chunks per book, avg chunk length |
get_device() |
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 |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.