mcp-ebook-server
Provides AI assistants with direct access to your ebook library, enabling listing books, reading chapters, and searching across books via the Model Context Protocol.
README
MCP Ebook Server
An MCP (Model Context Protocol) server that provides AI assistants with direct access to your ebook library. Works with Claude, Cursor, and other MCP-compatible clients.
Features
- List books in your library with metadata (title, author, language)
- Read chapters individually or in ranges
- Search within books or across your entire library
- EPUB support with automatic text extraction
Why Use This Instead of LLM Training Data?
LLMs like Claude have read millions of books during training, but they don't actually have those books—they have a compressed neural representation of patterns and themes. This creates real limitations:
| Question Type | LLM Training Data | MCP Ebook Server |
|---|---|---|
| "What's the 10th word of chapter 2?" | ❌ Cannot answer | ✅ Exact answer |
| "Quote the opening paragraph" | ⚠️ Often paraphrased or hallucinated | ✅ Verbatim text |
| "How many times is 'magic' mentioned?" | ❌ Guesses | ✅ Precise count |
| "What happens in chapter 5?" | ⚠️ May confuse with similar books | ✅ Actual content |
| "Does this book mention X?" | ⚠️ Uncertain, may hallucinate | ✅ Searchable proof |
The core problem: LLMs retain the gist of books—major plot points, famous quotes, general themes—but lose precise details. When asked about specifics they don't know, they often hallucinate plausible-sounding answers rather than admitting uncertainty.
The solution: This MCP server gives AI direct access to the actual source text. Instead of guessing, the AI can read the exact chapter, search for specific terms, and cite real passages. No hallucinations, just the book.
Installation
Docker (Recommended)
docker run -p 8080:8080 -v /path/to/your/ebooks:/ebooks ghcr.io/bryanlabs/mcp-ebook-server:latest
Docker Compose
services:
mcp-ebook-server:
image: ghcr.io/bryanlabs/mcp-ebook-server:latest
ports:
- "8080:8080"
volumes:
- /path/to/your/ebooks:/ebooks:ro
pip
pip install git+https://github.com/bryanlabs/mcp-ebook-server.git
mcp-ebook-server --library-path /path/to/your/ebooks
From Source
git clone https://github.com/bryanlabs/mcp-ebook-server.git
cd mcp-ebook-server
pip install -e .
mcp-ebook-server
Configuration
| Variable | Default | Description |
|---|---|---|
EBOOK_LIBRARY_PATH |
/ebooks |
Path to your ebook directory |
MCP_HOST |
0.0.0.0 |
Host to bind the server |
MCP_PORT |
8080 |
Port for the SSE endpoint |
Usage
Once the server is running, connect your MCP client to http://localhost:8080/sse.
Available Tools
| Tool | Description | Example |
|---|---|---|
list_books() |
List all ebooks with metadata | "What books do I have?" |
get_book_info(book_path) |
Get book details and chapter list | "How many chapters in The Magicians?" |
get_chapter(book_path, chapter_number) |
Read a specific chapter | "Read chapter 1" |
get_chapters_range(book_path, start, end) |
Read multiple chapters | "Get chapters 1-3" |
search_book(book_path, query) |
Search within a book | "Find mentions of 'magic'" |
search_library(query) |
Search all books | "Search for 'dragon'" |
Supported Formats
| Format | Status |
|---|---|
| EPUB | Fully supported |
| MOBI | Requires conversion to EPUB |
| AZW3 | Requires conversion to EPUB |
| Not supported |
License
MIT License - see LICENSE for details.
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.