MCP Directory

Ebook-MCP

Chat with your EPUB and PDF books — extract metadata, table of contents, chapters, and pages as Markdown.

Unverified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
uv pip install -e .

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ebook-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/onebird/github/ebook-mcp/src/ebook_mcp/",
        "run",
        "main.py"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Python with the uv package manager installed
  • The repository cloned locally (the Cursor config points at the local src/ebook_mcp path)
  • Dependencies installed via 'uv pip install -e .'

About Ebook-MCP

An MCP server for reading and processing electronic books in EPUB and PDF formats. It exposes tools to list ebook files in a directory, read metadata and tables of contents, and extract chapter or page content (including as Markdown), so an LLM client like Cursor or Claude can summarize, quiz on, and navigate your books through natural-language conversation. The server runs locally via uv over stdio. Built with the fastmcp framework on top of ebooklib, PyPDF2, PyMuPDF, beautifulsoup4, and html2text.

Tools & capabilities (10)

get_all_epub_files

Get all EPUB files in the specified directory. Signature: get_all_epub_files(path: str) -> List[str].

get_metadata

Get metadata (title, author, publication date, etc.) from an EPUB file. Signature: get_metadata(epub_path: str) -> Dict[str, Union[str, List[str]]].

get_toc

Get the table of contents from an EPUB file. Signature: get_toc(epub_path: str) -> List[Tuple[str, str]].

get_chapter_markdown

Get chapter content from an EPUB file in Markdown format. Chapter IDs come from the table of contents structure. Signature: get_chapter_markdown(epub_path: str, chapter_id: str) -> str.

get_all_pdf_files

Get all PDF files in the specified directory. Signature: get_all_pdf_files(path: str) -> List[str].

get_pdf_metadata

Get metadata (title, author, creation date, etc.) from a PDF file. Signature: get_pdf_metadata(pdf_path: str) -> Dict[str, Union[str, List[str]]].

get_pdf_toc

Get the table of contents from a PDF file. Signature: get_pdf_toc(pdf_path: str) -> List[Tuple[str, int]].

get_pdf_page_text

Get plain text content from a specific page of a PDF. Signature: get_pdf_page_text(pdf_path: str, page_number: int) -> str.

get_pdf_page_markdown

Get Markdown-formatted content from a specific page of a PDF. Signature: get_pdf_page_markdown(pdf_path: str, page_number: int) -> str.

get_pdf_chapter_content

Get chapter content and the corresponding page numbers by chapter title. Relies on the PDF's table of contents. Signature: get_pdf_chapter_content(pdf_path: str, chapter_title: str) -> Tuple[str, List[int]].

What this server can do

Ebook-MCP provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Smart library management: ask to list all EPUB files in a folder or find books about a topic in your library
  • Interactive reading: get a brief introduction to a book, ask what a chapter covers, or summarize key points
  • Active learning: generate quizzes, explanations, and practical exercises based on a book's chapters
  • Content navigation: locate sections discussing a specific topic and jump to the relevant chapters or pages

Security notes

Runs locally over stdio and reads files from paths you provide; no authentication or remote service is involved. The server reads ebook files from the local filesystem, so only point it at directories you trust. PDF features rely on the document's embedded table of contents and may not work when a TOC is absent.

Ebook-MCP FAQ

Which ebook formats are supported?

EPUB and PDF. The README states more formats may be added over time, but the documented tools currently cover EPUB and PDF.

How do I configure it in Cursor?

Add an 'ebook-mcp' entry whose command is 'uv' with args '--directory <path-to>/src/ebook_mcp/ run main.py'. Update the directory to the location where you cloned the repository.

Why do some PDF features not work?

PDF processing relies on the document's embedded table of contents. If a PDF has no TOC, chapter-based extraction may not work. For large PDFs, process by page ranges to avoid loading the entire file at once.

How can I test or debug the server?

Run it in development mode with 'uv run mcp dev src/ebook_mcp/main.py' and open http://localhost:5173/, or use the MCP inspector via 'npx @modelcontextprotocol/inspector uv --directory . run src/ebook_mcp/main.py'.

Alternatives to Ebook-MCP

Compare all alternatives →

Official MCP reference server for secure local filesystem read/write within allowed directories.

Verified
stdio (local)
No auth
TypeScript
13 tools
Updated 5 months agoRepo

Official MCP server for reading, searching, and manipulating a local Git repository's files and history.

Verified
stdio (local)
No auth
Python
12 tools
Updated 5 months agoRepo

Official AWS Labs MCP server to manage and query S3 Tables (table buckets, namespaces, tables).

Verified
stdio (local)
API key
Python
12 tools
Updated 1 month agoRepo