Ebook-MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
English | 中文 | 日本語 | 한국어 | Français | Deutsch
Ebook-MCP is a powerful Model Context Protocol (MCP) server for processing electronic books. Built on the Model Context Protocol, it provides a set of standardized APIs for seamless integration between LLM applications and e-book processing capabilities. Currently supports EPUB and PDF formats.
Use Cases & Value
Ebook-MCP transforms how you interact with your digital books by enabling natural language conversations with your reading materials. It seamlessly integrates with modern AI-powered IDEs like Cursor and Claude, allowing you to:
- **Smart Library Management**: Simply ask "Show me all EPUB files in my downloads folder" or "Find books about GenAI in my library"
- **Interactive Reading Experience**: Have natural conversations about your books:
- "Give me a brief introduction to 'LLM Engineer Handbook'"
- "What's covered in Chapter 3?"
- "Summarize the key points about RAG from this book"
- **Active Learning Support**: Enhance your learning through AI-powered interactions:
- "Create a quiz based on the RAG concepts from Chapter 5"
- "Explain the differences between the architectures discussed in this chapter"
- "Give me practical exercises based on the concepts in this section"
- **Content Navigation**: Easily navigate through your books with natural language queries:
- "Find all sections discussing prompt engineering"
- "Show me the chapters about fine-tuning"
- "Take me to the part about vector databases"
By bridging the gap between traditional e-books and AI capabilities, Ebook-MCP helps readers extract more value from their digital library through intuitive, conversation-based interactions.
Quick demo - Run with DeepSeek (Please check all the examples with Claude/OpenAI under mcp-client-example folder)
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
1. Clone the repository:
2. Install dependencies using uv:
Usage
Starting the MCP Server in development mode
Run the server in development mode:
You can visit http://localhost:5173/ for testing & debugging purpose
You can also install the inspector for the test.
Starting the MCP Server in Prod mode
Run the server:
Configure the MCP in Cursor
Add the following configuration in Cursor
EPUB Processing Examples
PDF Processing Examples
API Reference
EPUB APIs
get_all_epub_files(path: str) -> List[str]
Get all EPUB files in the specified directory.
get_metadata(epub_path: str) -> Dict[str, Union[str, List[str]]]
Get metadata from an EPUB file.
get_toc(epub_path: str) -> List[Tuple[str, str]]
Get table of contents from an EPUB file.