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.
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
| 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 and which one is the default. Call this first to discover valid library names. |
| calibre_searchA | Find books by exact title, author, ISBN, tag, or Calibre query syntax (mode=meta), or by full text (mode=fts). mode=fts words match independently and stemmed (events matches event); wrap a phrase in double quotes for an exact match ("event sourcing"); supports AND/OR/NOT between terms (uppercase, e.g. a NOT b). scope=book returns short keyword snippets from inside one book; first hits often land in TOC/front matter — for definitional or topic questions within a book prefer calibre_semantic_search scope=book (ranked passages with char offsets). Use calibre_semantic_search for meaning/topic queries. For "how many" questions use countOnly=true (returns only the count). filter accepts a bundle name to scope the search (list bundles via calibre_manage_bundles). |
| 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 page + 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 over the local index. scope=library ranks books; scope=book (needs bookId) ranks passages within one book. target=figures searches figure captions instead of text — use when the user asks for a diagram/chart/schema; hits point at calibre_get_figures for the pixels. mode=hybrid (default) fuses semantic + keyword matches; mode=vector is semantic-only; mode=keyword is exact keyword/FTS (no model at query time). All modes need an index built by calibre_build_index. filter accepts a bundle name to scope library searches (list bundles via calibre_manage_bundles). Model inference is serialized: prefer one call at a time — parallel calls queue, and past a few the extras skip the rerank. |
| calibre_build_indexA | Build the semantic index for specific books (required: bookId, ids, or query — full-library indexing is deferred). 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 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_reportA | 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; never writes. |
| 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 MCP server can reach the running Calibre Content Server via calibredb, and reports semantic-search status (embedding model, dependency, per-library index coverage). Returns the server version, calibredb path and write-gate state, plus libraries currently marked busy after a Calibre timeout, the server's recent errors and its log file path for self-diagnosis. |
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 14 tools
Most tools map to clearly distinct actions (list, get, build_index, find_duplicates, quality_report), and the two search tools are separated by lengthy guidance on keyword vs. meaning vs. hybrid. The main friction is that calibre_search and calibre_semantic_search overlap in mode/scope combinations, and two tools (calibre_board_data, calibre_open_book) are explicitly marked 'do not call as the model', which is a selection hazard for an agent scanning the surface.
Every tool uses the same calibre_ prefix plus a snake_case verb_noun pattern (list_libraries, search, semantic_search, build_index, get_book, get_content, get_figures, list_categories, find_duplicates, quality_report, recover_metadata). The only outlier, calibre_ping, is a conventional health-check name and does not break predictability.
At 14 tools the set is well within a reasonable range for a library/search domain, and each tool covers a real capability (index build, search, extraction, figures, dedupe, quality). Two of the fourteen are internal widget endpoints that a model should never call, so the effective model-facing surface is slightly smaller than the count suggests.
The read/lookup surface is thorough, but the write half of the lifecycle is missing: there is no calibre_update_book or delete/add tool, and descriptions explicitly reference calibre_update_book and calibre_manage_bundles, neither of which exists in the set. calibre_recover_metadata therefore dead-ends — it returns a changes object meant for a tool the agent cannot call.