Ebook-MCP logo

Ebook-MCP

by onebirdrocks

Ebook-MCP is a powerful Model Context Protocol (MCP) server for processing electronic books. It provides a set of standardized APIs for seamless integration between LLM applications and e-book processing capabilities, currently supporting EPUB and PDF formats.

View on GitHub

Last updated: N/A

What is Ebook-MCP?

Ebook-MCP is a Model Context Protocol (MCP) server that enables natural language conversations with your digital books. It provides standardized APIs to integrate LLM applications with e-book processing capabilities.

How to use Ebook-MCP?

  1. Clone the repository.
  2. Install dependencies using uv pip install -r requirements.txt.
  3. Start the MCP server using uv run main.py (or uv run mcp dev main.py for development mode).
  4. Configure the MCP in applications like Cursor with the provided command and arguments.
  5. Use the provided Python examples to process EPUB and PDF files using the available APIs.

Key features of Ebook-MCP

  • EPUB metadata extraction (title, author, publication date, etc.)

  • EPUB table of contents extraction

  • EPUB chapter content extraction (with Markdown output)

  • PDF metadata extraction (title, author, creation date, etc.)

  • PDF table of contents extraction

  • PDF content extraction by page number or chapter title

  • Markdown output support for PDF content

  • Batch processing for both EPUB and PDF files

Use cases of Ebook-MCP

  • Smart Library Management: Find books based on natural language queries.

  • Interactive Reading Experience: Have natural conversations about your books, asking questions about content and summaries.

  • Active Learning Support: Enhance learning through AI-powered interactions, like creating quizzes or explaining concepts.

  • Content Navigation: Easily navigate through books with natural language queries to find specific sections or chapters.

FAQ from Ebook-MCP

What file formats are supported?

Currently, Ebook-MCP supports EPUB and PDF formats.

What is the Model Context Protocol (MCP)?

The Model Context Protocol is a set of standardized APIs for seamless integration between LLM applications and various data processing capabilities.

How do I install the dependencies?

Use the command uv pip install -r requirements.txt after cloning the repository.

How do I start the MCP server?

Run uv run main.py to start the server in production mode. For development mode, use uv run mcp dev main.py.

What if a PDF file doesn't have a table of contents?

PDF processing relies on the document's table of contents. Some features may not work correctly if the TOC is not available.