Skip to main content
Glama
ZehuiTIAN

calibre-mcp

by ZehuiTIAN

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CALIBREDB_PATHNoPath to the calibredb executable. Defaults to calibredb on PATH, then platform install locations.calibredb on PATH, then platform install locations
CALIBREDB_TIMEOUTNoSeconds before a calibredb call is aborted.300
CALIBRE_INBOX_DIRNoDrop folder for import_inbox. Disabled by default (tool errors if used).Disabled
CALIBRE_OCR_MODELNoModel for the OCR backend. Defaults to provider default.provider default
CALIBRE_OCR_API_KEYNoAPI key for the OCR backend. Required for OCR tools.
CALIBRE_LIBRARY_PATHNoLibrary directory to use. Defaults to the library your Calibre GUI uses (most-used library from gui.json, else the default library).The library your Calibre GUI uses (most-used library from gui.json, else the default library)
CALIBRE_OCR_BASE_URLNoOptional API base URL override for proxies/gateways.
CALIBRE_OCR_PROVIDERNoOCR backend (e.g., anthropic).anthropic
CALIBRE_OCR_MAX_PAGESNoPage cap per ocr_book run.500
CALIBRE_TEXT_CACHE_DIRNoWhere converted text and search index live. Defaults to OS temp dir.OS temp dir

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
library_infoA

Show the active library: its path on disk, number of books, calibre version.

search_booksA

Search the library with calibre's query language.

Args: query: A calibre search expression, e.g. author:asimov, title:"i robot", tags:python. An empty string matches everything. limit: Maximum number of results (1-200, default 20).

list_booksA

Browse books in the library; defaults to most recently added first.

Args: limit: Maximum number of results (1-200, default 20). sort_by: calibre field to sort by, e.g. id, title, authors, timestamp. order: "desc" (default) or "asc". search: Optional calibre search expression to filter the listing.

add_booksA

Import ebook files (or directories of ebooks) into the library.

Books whose title + author are already in the library are skipped by calibre and reported as "duplicate". The Calibre GUI must not hold the library open while adding.

Args: paths: Absolute paths to ebook files or folders containing ebooks.

import_inboxA

Import every ebook file in the configured inbox folder into the library.

Requires the CALIBRE_INBOX_DIR environment variable. Successfully added files and duplicates are moved to <inbox>/imported/YYYY-MM/; files that fail to import are moved to <inbox>/failed/ for inspection.

search_in_bookA

Full-text search inside book contents, with match snippets for quoting.

Searches the local text index; books must be indexed first with build_index (a one-time, cached step). Matching is substring-based, so Chinese and English queries both work without word segmentation.

Args: query: Text to find inside book contents. book_id: Optional book id to restrict the search to a single book. limit: Maximum number of matches to return (1-100, default 20).

build_indexA

Index book contents for full-text search (one-time, cached).

Converts each book's text with calibre's converter and stores it in a local SQLite FTS5 index kept outside the library. Only books that are not indexed yet are processed; an initial run over a whole library can take several minutes.

Args: book_ids: Optional list of book ids to index; default: all books that are not indexed yet. limit: Optional cap on how many books to index in this call.

detect_scanned_booksA

Find library books whose PDF has no usable text layer (scanned pages).

Such books stay unsearchable until OCR'd with ocr_book. Requires the ocr extra (pip install 'calibre-mcp[ocr]'); no API key needed.

Args: limit: Maximum number of scanned books to report (1-200).

ocr_scanned_booksA

OCR all scanned-PDF books in the library, in resumable batches.

Detects scanned books, skips any that already have OCR output cached, and runs the full ocr_book pipeline (OCR → index → optional re-typeset EPUB) on up to limit remaining books. Repeat the call to work through the whole library; per-batch caching makes interruptions safe.

Args: limit: Maximum books to OCR in this call (1-100, default 10). typeset: Also build re-typeset EPUBs with pandoc (default True). import_format: Attach the EPUBs to book records (default True).

ocr_bookA

OCR a scanned PDF via the configured cloud provider and index the text.

Detection → page rendering → provider transcription → cache → full-text index → (by default) pandoc re-typeset EPUB attached to the book's existing record. Books with a usable text layer are left untouched.

Configuration: CALIBRE_OCR_PROVIDER (default "anthropic"), CALIBRE_OCR_API_KEY, CALIBRE_OCR_MODEL, CALIBRE_OCR_BASE_URL, CALIBRE_OCR_MAX_PAGES.

Args: book_id: Book whose PDF format should be OCR'd. typeset: Also build a re-typeset EPUB with pandoc (default True). import_format: Attach the EPUB to the book record (default True).

read_bookA

Read a page of a book's plain text, converted on demand by calibre.

The first call converts the book (a copy in a cache directory — the library is never modified); later calls reuse the cache. Returns the chunk plus next_offset for paging and total_chars for context.

Args: book_id: The book's id (find it with search_books). offset: Character offset to start reading from (0 = beginning). limit: Maximum characters to return (1-40000, default 12000).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 11 tools

Disambiguation4/5

Most tools target distinct actions: metadata search, browsing, full-text search, reading, and OCR are clearly separated. Minor overlap exists between list_books (which accepts a search filter) and search_books, and between ocr_scanned_books and ocr_book, but descriptions clarify the batch-vs-single distinction.

Naming Consistency4/5

The majority of tools follow a clear verb_noun pattern like search_books, add_books, build_index, and read_book. A few deviations stand out: library_info uses noun_info, search_in_book uses a preposition, and ocr_book/ocr_scanned_books use an acronym as the verb, but the overall style remains predictable.

Tool Count5/5

Eleven tools is a well-scoped size for a Calibre-focused server covering library browsing, metadata search, book import, reading, full-text search, and OCR. Each tool addresses a distinct workflow without feeling bloated or redundant.

Completeness4/5

The toolset covers the core workflows thoroughly: discovering, searching, adding, reading, indexing, and OCR-ing books. Obvious gaps like metadata editing, book deletion, or retrieving original format files are absent, but they appear to be outside the server's intended reading/OCR-oriented scope.

Maintenance

ActivityMaintained
ResponsivenessNo issues