/ Directory / Playground / ebook-mcp
● Community onebirdrocks ⚡ Instant

ebook-mcp

by onebirdrocks · onebirdrocks/ebook-mcp

Point Claude at your EPUB and PDF library — get metadata, TOC, and chapter content in structured form so the model can quote and summarize precisely.

ebook-mcp wraps Python's common EPUB/PDF libs into MCP tools. Unlike generic 'read a file', it exposes table of contents and chapter boundaries, so Claude can fetch just the chapter you're asking about instead of dumping 500 pages into context.

Why use it

Key features

Live Demo

What it looks like in practice

ebook.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "ebook": {
      "command": "uvx",
      "args": [
        "ebook-mcp"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "ebook": {
      "command": "uvx",
      "args": [
        "ebook-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "ebook": {
      "command": "uvx",
      "args": [
        "ebook-mcp"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ebook": {
      "command": "uvx",
      "args": [
        "ebook-mcp"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "ebook",
      "command": "uvx",
      "args": [
        "ebook-mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "ebook": {
      "command": {
        "path": "uvx",
        "args": [
          "ebook-mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add ebook -- uvx ebook-mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use ebook-mcp

Find and quote a passage you vaguely remember

👤 Readers / researchers ⏱ ~5 min beginner

When to use: 'There was something in that book about X...' — you need the exact quote and can't be bothered to flip pages.

Prerequisites
  • The book file on disk — EPUB or PDF
Flow
  1. Load TOC
    Show me the TOC of ~/Books/deep-work.epub. Which chapter likely discusses shallow work vs deep work?✓ Copied
    → TOC + best-guess chapter
  2. Pull the chapter
    Get the text of chapter 3. Find the passage about shallow-work-as-default.✓ Copied
    → Quoted passage

Outcome: Quote in hand, citable, in 2 minutes.

Pitfalls
  • Scanned PDFs have no text layer — Run OCR first

Generate a chapter-by-chapter summary of a technical book

👤 Engineers learning from a book on their TBR ⏱ ~30 min intermediate

When to use: You want to decide whether to actually read a book, or need a refresher after finishing.

Flow
  1. TOC first
    Load TOC of book.pdf. Show me chapter titles and approximate page ranges.✓ Copied
    → Outline
  2. Per-chapter summary
    For each chapter, load its content and produce a 3-bullet summary. Output as a single Markdown doc.✓ Copied
    → Complete book digest

Outcome: A 1-2 page book digest you can share or revisit.

Pitfalls
  • Huge books blow the token budget if you load all chapters at once — Process one chapter at a time; write intermediate summaries to disk
Combine with: filesystem

Audit your ebook library's metadata

👤 Calibre users, ebook hoarders ⏱ ~15 min beginner

When to use: Your library has 500 ebooks and you want to find ones with missing title/author metadata.

Flow
  1. Scan
    For each .epub under ~/Books, get metadata. List any where title or author is missing or contains 'Unknown'.✓ Copied
    → Incomplete-metadata list

Outcome: Quick metadata hygiene pass.

Combine with: filesystem

Combinations

Pair with other MCPs for X10 leverage

ebook + local-rag

Build a searchable library index

For each book, get_chapter by chapter, ingest into local-rag with book title as source.✓ Copied
ebook + notion

Auto-populate your reading journal

Take this just-finished book; summarize each chapter; create a Notion page in 'Books Read'.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
get_metadata path: str First pass on any book free
get_toc path: str Before pulling chapter content free
get_chapter path, chapter_id or id_range Load a specific chapter free
get_pages path, from_page, to_page (PDF only) Page-range extraction for PDFs free

Cost & Limits

What this costs to run

API quota
None
Tokens per call
Chapters 2k-30k tokens depending on length
Monetary
Free (Apache 2.0)
Tip
Always load TOC first. Then load chapters one at a time rather than the whole book.

Security

Permissions, secrets, blast radius

Credential storage: None — local files only
Data egress: Book content goes to your LLM provider

Troubleshooting

Common errors and fixes

Unable to parse PDF

Scanned/image-only PDF has no text layer. Run ocrmypdf first.

Verify: pdftotext input.pdf - | head
EPUB chapter ID not found

IDs come from the TOC exactly. Call get_toc first.

Large PDF makes get_chapter timeout

Use get_pages with a smaller page range; batch.

Alternatives

ebook-mcp vs others

AlternativeWhen to use it insteadTradeoff
Calibre + custom scriptYou want full Calibre integrationMore setup; no MCP wrapper
pdfplumber / pymupdf directlyYou build your own toolingBuild your own MCP wrapper

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills