library-mcp
Provides a 'library keeper' sub-agent that ingests PDF/EPUB books and answers questions grounded in them via local embedding search, with deterministic classification and knowledge gap logging.
README
<div align="center">
library-mcp
A specialized "library keeper" sub-agent for the Pythia stack: ingest PDF/EPUB books, then answer questions grounded in them via local embedding search.
</div>
Two MCP servers, one shared knowledge base:
library-parse:learn(file_name)extracts, chunks, and embeds a book from a shared inbox/attachment-cache directory intoknowledge.db, classifying it as a book/article/notes deterministically (structural markers, no LLM) and extracting a real title from file metadata when present.learn_text(title, text, source_url)ingests already-extracted text (e.g. a fetched web page), the same way, minus the file-parsing step.forget(title)removes a learned book by title or partial title, refusing on zero or multiple matches rather than guessing.list_learned()lists everything in the store, including in-progress embedding jobs, with each book's doc_type.
library-keeper:ask_library(question)embeds the question, searches the shared store, and hands matches to a small local reasoning model that decides whether to answer (with citations) or search again for connected knowledge, bounded at a few attempts. The frontier model calls this once and gets one synthesized answer back. Deterministically logs a "knowledge gap" (never from parsing the model's own wording) when a question can't be confidently answered.list_knowledge_gaps()lists open gaps — questions worth adding a source for — for human review.
Both servers always talk to the same fixed local address for embeddings and reasoning — that address is set once, in a config file, and can't be changed by a book's content or by anything a user types. So there's nothing in a PDF or a chat message that could redirect this to some other server.
More on how this was actually built and debugged — including the real bugs
found along the way (a small reasoning model not following instructions
reliably, an EPUB's table of contents accidentally confusing search results,
a tricky container-permissions issue) — is written up in the Pythia stack's
own docs: hermes-stack/docs/architecture/library-mcp.md.
Development
python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest
License
MIT.
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
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.