calibre-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CALIBRE_MCP_RERANK | No | Cross-encoder rerank stage on semantic search (~576 MB model, seconds of CPU per query); set off/false/0 to disable | on |
| CALIBRE_MCP_LIBRARY | No | Library name; empty = the server’s default library | |
| CALIBRE_MCP_ADD_ROOTS | No | Folders calibre_add_book may import from (path-delimiter separated) | ~/Documents, ~/Downloads |
| CALIBRE_MCP_INDEX_DIR | No | Semantic index + embedding-model cache | platform data dir |
| CALIBRE_MCP_SERVER_URL | No | Calibre Content Server base URL | http://localhost:8080 |
| CALIBRE_MCP_BOARD_STYLE | No | Search-results widget style in MCP Apps hosts: shelf (scrolling cover shelf) or coverflow (3D cover flow) | shelf |
| CALIBRE_MCP_ENABLE_WRITE | No | Master write gate (1/true/yes) | off |
| CALIBRE_MCP_CALIBREDB_PATH | No | calibredb binary; found via standard install paths, then PATH | |
| CALIBRE_MCP_MAX_BOOK_BYTES | No | Largest book download calibre_build_index / calibre_get_content will extract; bigger books are skipped | 268435456 |
| CALIBRE_MCP_SEMANTIC_FLOOR | No | Cosine score below which semantic results are flagged low-confidence | 0.78 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Calibre library server.
library is optional (the default library is used); a library ID or display name both work, and calibre_list_libraries lists them.
Search: calibre_search for metadata (mode=meta) or book text (mode=fts); calibre_semantic_search for meaning; scope=book searches inside one book.
Writes are preview-first: calibre_bulk_update previews by default (preview=false applies); calibre_remove_book is a dry-run until confirm=true. Show the preview to the user first.
Writes are off unless CALIBRE_MCP_ENABLE_WRITE is set: previews still work, Write calls return write_disabled; if refused, tell the user rather than retrying.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| calibre_list_librariesA | List the Calibre libraries available on the Content Server (ID and display name) and which one is the default. Other tools take either as |
| calibre_searchA | Find books by |
| calibre_get_bookA | Get full metadata (authors, ISBN, formats, comments, cover) for one book by its id or uuid (id and bookId are interchangeable — pass the bookId from a search result). Set include_cover=true only when the cover image itself must be inspected. |
| calibre_get_contentA | Extract a book's text as a capped, fenced excerpt; pass the returned nextCursor token verbatim to walk the whole book, or jump to a char position with offset (e.g. a search passage's charStart). Set structure=true for a chapter map with per-chapter cursors. To find text inside a book, use calibre_search scope=book. |
| calibre_get_figuresA | List a book's figures — images the text references, identified by caption (Figure 1-2 / Рис. 3.1) — with location (PDF page p.N / EPUB spine section §N) + caption per figure, then fetch chosen ones as images via indexes (≤3 per call). Captions let you pick figures before spending image tokens. In MCP Apps hosts the fetched figures also render for the user in an in-chat viewer, so you can point at them by figure number — but describe only what the pixels you received actually show. |
| calibre_list_categoriesA | Browse library categories (Authors, Tags, Series, Languages, Publisher). No field → list the categories; with a field → its values + counts, filterable via a valueFilter regex (case-insensitive by default; a leading inline flag like |
| calibre_semantic_searchA | Meaning-based search for |
| calibre_build_indexA | Build the semantic index for specific books (select them with bookId, ids, or query; at least one is required; to index everything, pass a query that matches every book). A query selects ALL matching books (no 100-book cap); a call still working after ~45 s returns a "still running" status (not an error) while the build keeps committing in the background — re-run the same call to get its result; only one build runs per library at a time, and up-to-date books are skipped. Extracts, chunks, and embeds each book. Set keywordOnly=true (or when the embedding model is absent, it happens automatically) to build a keyword-only index that powers mode:"keyword" search with zero ML dependencies. Re-run after adding books; use force to re-index unchanged ones. Set enableFts=true to also turn on the Calibre full-text index for the library (needs writes enabled on this server; with writes off the semantic build still runs and the fts.status result field is write_disabled; already-enabled is a no-op; Calibre indexes in the background and the call does not wait). Set prune=true to also drop index entries for books that no longer exist in the library (removals/merges leave searchable orphans behind). |
| calibre_find_duplicatesA | Find probable duplicate books. mode=identical (exact title+authors) or similar (fuzzy) group the library (or ids/query/filter subset — filter takes a bundle name) with a merge-safety score; mode=compare diffs 2+ ids field-by-field. Read-only — never merges. |
| calibre_quality_reportB | Scan books for metadata problems: missing fields, raw-filename titles, invalid ISBNs, author-sort mismatches, series gaps. Defaults to the whole library; narrow with ids/query/filter (a bundle name) or specific checks. Read-only. |
| calibre_recover_metadataA | Propose real metadata for a book with a missing/raw-filename title via online provider lookup (ISBN from its identifiers or text, else title/author) on Open Library and Google Books. Preview only — returns a changes object for calibre_update_book (needs writes enabled); never writes. |
| calibre_extract_isbnA | Offline scan of a book's own text for a checksum-valid ISBN → sets identifiers:isbn (no network; for online lookup use calibre_recover_metadata). Preview-first: apply=false reports only, merges into existing identifiers. Previews work without writes; applying needs CALIBRE_MCP_ENABLE_WRITE. |
| calibre_bulk_updateA | Apply the same metadata changes (tags, series, publisher, etc.) to a set of books selected by ids, a search query, or filter (a bundle name). Preview-first: returns the per-book diff without writing unless preview is set false. A book set is required (never all books). A list in changes replaces the whole list; to add or remove tags while keeping the rest, use tags_add / tags_remove (merged per book, case-insensitive, not together with changes.tags). changes.identifiers merges per book by scheme (listed schemes set, others kept, null removes one). Previews work without writes; applying needs CALIBRE_MCP_ENABLE_WRITE. |
| calibre_remove_bookA | Remove books (ids) from the library. Removed books go to Calibre's Trash and can be restored from the Calibre GUI, so this is recoverable. Two-step: the first call is a dry-run listing what would be removed; re-run with confirm=true to proceed. Previews work without writes; applying needs CALIBRE_MCP_ENABLE_WRITE. |
| calibre_merge_booksA | Merge duplicate book records: moves formats from the |
| calibre_manage_bundlesB | Manage Bundles via |
| calibre_board_dataA | Internal endpoint for the in-chat cover-board widget. Returns the cached payload of a recent search. Do not call as the model — search results already contain everything this returns. |
| calibre_open_bookA | Internal endpoint for the in-chat widgets' Open button. Launches a book in the local Calibre viewer via the calibre:// scheme. Do not call as the model — use calibre_get_book to show a book instead. |
| calibre_pingA | Health check: confirms the server reaches Calibre via calibredb and whether Calibre accepts writes; reports semantic-search status, per-library index coverage, version, write gate, busy libraries, recent errors and the log file path. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Cover board (search) | In-chat cover board for calibre_search results. |
| Cover board (semantic search) | In-chat cover board for calibre_semantic_search results. |
| Book card | In-chat book details card for calibre_get_book. |
| Book figures | Reading pane for the figures calibre_get_figures fetched. |
TDQS
Scored across 19 tools
The domain tools are clearly separated by resource and action, and the descriptions actively route the agent (calibre_search vs calibre_semantic_search, calibre_get_content vs search scope=book). The main blemish is two widget-only internal endpoints (calibre_open_book, calibre_board_data) that are exposed alongside model-facing tools and only marked 'do not call' in prose, plus the multi-mode calibre_search doing metadata, FTS, annotations and notes in one entry.
Nearly every tool follows a calibre_verb_noun or calibre_verb pattern (get_book, list_libraries, build_index, manage_bundles), all snake_case with a uniform prefix. The only deviation is calibre_board_data, which is noun-only and breaks the action-first convention.
19 tools sits at the upper edge of comfortable, but the scope genuinely spans search, semantic indexing, metadata repair, dedupe, bulk edits and cleanup, so most tools earn their place. Two of them (open_book, board_data) are pure UI plumbing that inflate the count without giving the model any capability.
Coverage is strong: read/browse, full-text and semantic search, metadata repair, duplicate detection, bulk update, merge, remove and index maintenance all exist, with preview-first write safety. Obvious gaps remain around adding books to the library, format conversion/export, and cover retrieval other than as a get_book flag — so the lifecycle is not fully closed.