ebook-mcp
Ebook-MCP is an MCP server focused on transforming the interaction with digital books by integrating AI capabilities into EPUB and PDF processing. It provides APIs for smart library management, interactive reading, and active learning, supporting modern AI-powered tools like Cursor and Claude.
Ebook-MCP
Ebook-MCP is a Model Context Protocol (MCP) server designed for processing electronic books, specifically supporting EPUB and PDF formats. It provides standardized APIs for integrating with LLM applications enabling features like smart library management, interactive reading experiences, active learning support, and content navigation through natural language. Key capabilities include extracting metadata, table of contents, and chapter content in Markdown format, as well as batch processing features for EPUB and PDF files.
Features
EPUB Support
- Extract metadata (title, author, publication date, etc.)
- Extract table of contents
- Extract chapter content (with Markdown output)
- Batch process EPUB files
PDF Support
- Extract metadata (title, author, creation date, etc.)
- Extract table of contents
- Extract content by page number
- Extract content by chapter title
- Markdown output support
- Batch process PDF files
Installation
- Clone the repository and navigate into the directory.
- Install dependencies using
uv
.
Usage
Starting the MCP Server in Development Mode
Run the server in development mode and visit the localhost for testing and debugging.
Starting the MCP Server in Production Mode
Run the server to start processing.
API Reference
- EPUB APIs: Methods to retrieve files and metadata, and extract chapter content.
- PDF APIs: Methods to retrieve files and metadata, extract text and Markdown content, and get chapter content.
Important Notes
- PDF processing is contingent on the availability of a table of contents.
- It is recommended to process large PDF files by page ranges.
- EPUB chapter IDs must be derived from the table of contents.
Dependencies
- ebooklib, PyPDF2, PyMuPDF, beautifulsoup4, html2text, pydantic, fastmcp.
Contributing
Issues and Pull Requests are welcome.
Changelog
v1.0.5
- Initial release
- EPUB and PDF format support
- Basic file processing APIs
- MCP Client examples - Claude, DeepSeek, OpenAI
- Support to run the server from PyPI