mcpField
B
book-reader

book-reader

github.com/trevorsDocuments44 installs
Repository

About book-reader

book-reader is a command-line tool for reading and searching digital books, suited to readers and researchers looking up book content. It supports several common formats and ranks BM25 search results with chapter or page references.

Key features

  1. 01Supports PDF, EPUB, MOBI, and text
  2. 02View book metadata and contents
  3. 03Read content by chapter
  4. 04Search books with BM25
  5. 05Results include chapter or page location
  6. 06Cache extracted content and detect file changes

Use cases

  1. 01Answer questions about a book’s contents
  2. 02Find specific quotes or passages
  3. 03Navigate to a page or chapter
  4. 04Research topics across digital books

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/trevors/dot-claude --skill book-reader

After installing, type/book-readerin Claude Code to confirm it loaded.

Bundled filesREFERENCE.mdbook.py

Details

From the project README

Book Reader

Read and query digital book formats from the command line using BM25 search.

Quick Start

# Get book metadata
uv run ~/.claude/skills/book-reader/book.py info ~/Books/mybook.pdf

# Show table of contents
uv run ~/.claude/skills/book-reader/book.py toc ~/Books/mybook.epub

# Read a specific chapter
uv run ~/.claude/skills/book-reader/book.py read ~/Books/mybook.pdf --chapter 3

# Read a specific page
uv run ~/.claude/skills/book-reader/book.py read ~/Books/mybook.pdf --page 42

# Search for content (BM25 ranked)
uv run ~/.claude/skills/book-reader/book.py search ~/Books/mybook.pdf "query"

# Extract full text
uv run ~/.claude/skills/book-reader/book.py extract ~/Books/mybook.txt

Supported Formats

FormatExtensionsFeatures
PDF.pdfPage numbers, TOC detection, metadata
EPUB.epubChapters from spine, full metadata
MOBI.mobi, .azw, .azw3Basic extraction
Text.txt, .text, .mdChapter pattern detection

When to Use

  • User provides a book file and asks questions about its content
  • Need to find specific quotes, passages, or information
  • Navigating to specific pages or chapters in a document
  • Researching topics across digital books
  • Extracting text for further processing

How It Works

  1. First access: Extracts and caches the book content
  2. Subsequent access: Uses cached version (invalidates on file change)
  3. Search: BM25 algorithm ranks results by relevance
  4. Results: Include chapter/page location for reference

See Also

See REFERENCE.md for complete command documentation.

Comments

Markdown supported