/calibre-mcp:calibre-mcpfrom calibre-mcp
Searches, reads, and curates Calibre ebook libraries via MCP tools and CLI escape hatch. Covers metadata queries, full-text and semantic search, content extraction, metadata writes, deduplication, quality audits, ISBN extraction, and safe CLI routing through the Content Server.
Ships in calibre-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two interfaces, in priority order:
calibre-mcp MCP tools (calibre_*) — primary. Search, semantic search, content
extraction, metadata writes, dedupe, quality, enrichment. All inputs are Zod-coerced
server-side, so stringified numbers/arrays/objects from the client are handled.Libraries: discover them with calibre_list_libraries (names and IDs differ per user; the
default library is used when none is given). Examples below use a library named My Books with
ID My_Books. Calibre GUI + Content Server on :8080 are normally running.
calibre_update_book, calibre_bulk_update) —
the old -32602 serialization bug is fixed by server-side coercion. No CLI workaround needed.calibredb --with-library 'http://localhost:8080/#My_Books' (library ID after #,
not the display name — the display form 404s). Never use --library-path on a live GUI
library — the concurrency lock makes direct DB access refused or dangerous.CALIBRE_MCP_ENABLE_WRITE. With it off, previews and dry-runs still work
and carry writeEnabled: false plus a "needs writes enabled" line: tell the user before
proposing to apply. The applying call returns write_disabled (tell the user, don't retry), and
calibre_update_book / calibre_add_book are not listed at all.calibre_bulk_update defaults preview:true,
calibre_remove_book and calibre_merge_books default confirm:false (dry-run),
calibre_extract_isbn defaults apply:false, calibre_manage_bundles defaults confirm:false. Show the preview, get user confirmation,
then re-call with the apply flag.library param (display name is fine); omitted = default library.| Tool | Purpose | Key params |
|---|---|---|
calibre_search | Find books by metadata or full text; also keyword search inside one book | query, mode: meta|fts, scope: library|book, bookId, sort, limit, cursor, filter (bundle), include_excluded |
calibre_search_annotations | Your highlights, bookmarks and notes on authors/series/tags/publisher (Calibre 9.18+) | query, kind: annotations|notes, scope: library|book, bookId, limit, countOnly, filter (bundle, annotations only), include_excluded |
calibre_get_book | Full metadata + formats + cover for one book | id (number or uuid) |
calibre_get_content | Read book text chunk-by-chunk without flooding context | id, maxChars (default 8k, max 40k), cursor, structure (outline), sentenceAware |
calibre_get_figures | List a book's captioned figures (location: PDF page p.N, EPUB spine section §N), then fetch ≤3 as images (also rendered for the user in an in-chat figure viewer on MCP Apps hosts) | id, indexes (omit to list), detail: standard|high, include_uncaptioned, format |
calibre_list_categories | Tags/authors/series/etc. values + counts; schema discovery | field, valueFilter (regex), limit, cursor |
calibre_list_libraries | Library map + default | — |
calibre_semantic_search | Meaning-based search across the library or within one book | query, scope: library|book, bookId, mode: hybrid|vector|keyword, topK, filter (bundle), include_excluded |
calibre_build_index | Build/refresh the semantic index (needed before semantic search) | ids/query/bookId to scope, force, keywordOnly, prune |
calibre_find_duplicates | Dup detection | mode: identical|similar|compare, ids, query, filter (bundle) |
calibre_quality_report | Library audit: missing metadata, rule violations | checks, ids/query/filter |
calibre_recover_metadata | Propose metadata for raw-filename books (ISBN → OpenLibrary → Google Books) | id, sources — returns a proposal; apply via calibre_update_book (needs writes enabled) |
calibre_update_book | Write metadata for one book | id, changes (object incl. #custom fields) |
calibre_bulk_update | Same change across many books | changes and/or tags_add/tags_remove, ids OR query OR filter (one required), preview |
calibre_add_book | Import a file (path must be under the whitelisted roots) | path |
calibre_remove_book | Delete books | ids, confirm |
calibre_merge_books | Merge duplicate records: formats + metadata into a target, sources → trash | targetId, sourceIds, mode: merge|safe|formatsOnly, confirm |
calibre_extract_isbn | Scan book text for ISBN, optionally write it | id, apply |
calibre_manage_bundles | Bundles = named topical filters (Calibre saved searches); -name = exclusion marker. Lists virtual libraries read-only — never creates one | action: list|create|update|delete, name, expression, confirm |
Bundles are named filters backed by Calibre saved searches (calibre_manage_bundles; list works with writes off).
Use them to scope work to a topic instead of the whole 800-book library:
calibre_semantic_search { query: "X", filter: "databases" }. An unknown filter name errors
with the list of available bundles — that error IS the discovery mechanism, don't pre-list.-something are auto-subtracted from discovery searches
(calibre_search, calibre_semantic_search library scope). The result always says what was
subtracted (exclusions applied: […]); pass include_excluded: true to see everything.
Markers are global: they also cut an explicit filter, and the note says how many of that
bundle's books they removed (… removed N books from the filter, exclusionsRemoved) — a (0 books) filter with
that note is not an empty bundle, retry with include_excluded: true.
Targeting the marker itself (filter: "-outdated") shows exactly its books.quality_report/find_duplicates/bulk_update accept
filter but never auto-subtract markers — noise books need curation most.Short, lowercase, consistent tags:
Language/Runtime: javascript, typescript, rust, python, sql, html-css
Framework/Tool: nodejs, nestjs, react, kafka, kubernetes, docker, git, graphql, excel
Domain: databases, ai, llm, machine-learning, data-science, devops, cloud, networking
Practice/Pattern: architecture, design-patterns, ddd, testing, refactoring, oop, algorithms
Topic: performance, security, concurrency, distributed-systems, web-development
Meta: reference (pocket guides, cookbooks), beginner, advanced
Rules:
machine-learning not Machine Learningsql not Sql, Databases, Computers, General+needs-description is a system tag for books missing commentsFor calibre_search with mode: meta (and calibredb list --search):
author:Asimov # field-specific
title:"The Ring" # phrase
format:epub publisher:oreilly # multiple fields
author:Asimov and not series:Robot # boolean
tags:"=javascript" # exact match (= prefix)
title:"~^Java.*Script$" # regex (~ prefix)
rating:">3" # comparison
pubdate:">2024" # date filter
date:lastmonth date:thisyear date:lastyear # Calibre 9.18+
date:>2monthsago date:>1yearsago # Calibre 9.18+ (number in front)
Maintenance queries:
date:>7daysago # recently added
rating:false # no rating
tags:false # no tags
cover:false # no cover
formats:false # no files
identifiers:false # no ISBN etc.
changes: {rating: 10} = 5 stars.# prefix in changes (e.g. #read_status).<library_path>/<book_path>/<filename>.<format> — get path and
formats from calibre_get_book to build the full filesystem path.calibre_build_index first
(scoped to ids/query for speed, or full library). A keyword-only index with the model
installed (build_index semanticAvailable: true) only needs a rebuild without keywordOnly;
install steps only when the model is missing. index_incompatible (or ping's stale index — delete …) after an upgrade means the index format changed (index version 5 normalised the
text): the old file is refused on every open, so the steer reads
delete <index dir>/<library id>.sqlite (and <index dir>/<library id>.sqlite-wal, <index dir>/<library id>.sqlite-shm if present), then run calibre_build_index force=true to rebuild (the message names the exact path);
calibre_search works meanwhile.calibre_ping counts "books with stale keyword stems"
(indexes[].staleStems), search still works. Tell the user that a full rebuild
(re-stem them with calibre_build_index force=true and a query that matches every book) re-stems them, and
that it takes as long as the first build. Don't start it unasked.charStart/charEnd, calibre_get_content offset and cursors are positions in
the normalised text (ligatures folded, hyphenation joined, EPUB Markdown escapes and emphasis
markers removed; \f page breaks and headings kept),
the same text search indexed — feed a hit's charStart as offset. Offsets or cursors saved
before an index-version change are stale: search again instead of reusing them.section: A › B › C (last 3 levels;
sectionPath) and, for PDFs, page: N (page, the 1-based PDF page index — not the printed
page number, so say "PDF page N" when citing). Library scope labels the snippet's start, book
scope the passage's start. No line means no data, not page 1 or no section. Library snippets
run up to 800 characters: quote from them before opening the book.[front matter] or [back matter: …] (matterKind in structured output) come from a table of contents, index, bibliography or
copyright page. Library scope places every such book after the books with a body match; book
scope pushes only contents, index and copyright pages behind body passages. A book that only
matches there is a weak lead; quote body passages. A [front matter] preface or a
bibliography at rank 1 in book scope is reranked like body text, so it can be real content.Find info about a topic across books:
calibre_semantic_search (meaning) or calibre_search mode:fts (exact terms) →
then drill into a hit: calibre_search scope:book bookId:N or
calibre_semantic_search scope:book → calibre_get_content for full passages.
What did I highlight or note?
calibre_search_annotations (not calibre_search): kind: annotations for highlights, their notes and bookmarks; kind: notes for notes on authors/series/tags/publisher. Old calibre_search mode:annotations|notes calls get an invalid_input steer to it.
Read a whole book / big sections:
calibre_get_content with structure:true first for the outline, then walk with cursor.
Update metadata:
calibre_update_book with changes: {tags: [...], title: "...", rating: 8}. Each field
replaces its value, except identifiers, which merges by scheme: {identifiers: {isbn: "978…"}}
keeps the book's url/doi/etc., and {identifiers: {url: null}} removes one scheme (scheme names are case-insensitive). Same in
calibre_bulk_update.
Batch tag by search:
calibre_bulk_update with query: "title:SQL" and tags_add: ["SQL"] (keeps each book's other
tags; changes: {tags: [...]} would replace them) — review the preview, then re-call with
preview:false. Show the user any preview ⚠ lines (books[].warnings): a list that
replaces the whole list, or a case-only rename that renames a tag on every book.
Read a write result before reporting it:
applied = written. unchanged (tags_add / tags_remove calls only) = nothing would change on
that book (the tag merge and any changes fields), so it was skipped, not written. Report these
as "already current", not as failures.confirmedByReRead ({id, cause: "dropped" | "timeout"} in bulk, "dropped" | "timeout" on
calibre_update_book) = the call timed out or lost its connection, but a re-read showed every
requested value. It is a success; the text says "Confirmed by a re-read".failed entries, or a write_unverified error, that say "verify with calibre_get_book" may
have committed. Check the book with calibre_get_book before any retry. Never re-run blindly.retryIds: re-run with exactly those ids.Fix a raw-filename book (e.g. 795731065.pdf):
calibre_extract_isbn (preview) → calibre_recover_metadata → confirm with user →
calibre_update_book with the proposed fields. With writes off, show the user the proposal and
tell them applying it needs CALIBRE_MCP_ENABLE_WRITE.
A slug title (modular-monoliths) is searched as modular monoliths at capped confidence
(0.40, with a WARNING): show the user the matched title and get a yes before applying.
Dedupe:
calibre_find_duplicates mode:similar → inspect groups with mode:compare ids:[...] →
calibre_merge_books with targetId = the compare report's "recommend keeping book N" and
the rest as sourceIds (dry-run plan → confirm with user → confirm:true). A
⚠ REVIEW line (mixed languages, possibly different editions, not the same work) means ask the
user before merging, whatever the score. Formats move to
the target (its copy wins), metadata merges per Calibre's rules, sources land in Calibre's
trash (recoverable ~14 days). Duplicate groups and compare reports carry a same-work verdict
workMatch (same | edition? | different) — merge_books warns on the same verdict; edition?
(one title names a later edition) and different cap merge safety at 0.3, so never merge them
unconfirmed. mode:safe keeps sources; plain calibre_remove_book is for
discarding a record without keeping anything from it. Both drop the removed books from the
semantic index on their own; a Semantic index not updated line (indexNote) means run
calibre_build_index prune:true later (it lists selected ids no longer in the library as
removedIds, "not a failure"). Semantic search drops hits on books removed in the
Calibre GUI (unless Calibre is too slow to confirm within 1.5 s); prune:true clears their
leftover rows.
Library cleanup sweep:
calibre_quality_report → fix per issue class (tags via bulk_update, ISBNs via extract_isbn,
metadata via recover_metadata).
Add a book:
calibre_add_book path:"/Users/me/Downloads/file.epub" (path must be under the allowed
roots; if refused, the error names them). A file whose title + author already exist is not
imported: skipped: "duplicate" + duplicateOf (when one book matches) — tell the user it is
already there instead of retrying. Any other failure to add is an error with a
next step (unsupported format, permissions, a bad file).
Extract book text to a file / send to NotebookLM:
calibre_get_book → check formats and disk pathebook-convert "<book file>" "/tmp/book.txt" (standalone, no library lock)source_add (or user uploads manually
for very large books)For operations the MCP server defers. Always through the server URL when the GUI is running:
LIB='http://localhost:8080/#My_Books'
| Operation | Command |
|---|---|
| Convert format | ebook-convert in.pdf out.epub (file-level, safe anytime) |
| Export books | calibredb export --with-library "$LIB" <id> --to-dir ~/Downloads/ |
| Generate catalog | calibredb catalog ~/Downloads/catalog.csv --with-library "$LIB" |
| Remove one format | calibredb remove_format --with-library "$LIB" <id> TXT |
| Health check | calibredb check_library --library-path "..." (GUI must be closed — direct DB) |
| Embed metadata into files | calibredb embed_metadata --with-library "$LIB" all |
| Fetch metadata online | fetch-ebook-metadata --title "..." --authors "..." |
| Inspect file metadata | ebook-meta file.epub |
CLI writes require the Content Server to allow local writes (--enable-local-write /
GUI preference); if a write is refused, that's the first thing to check. calibre_ping's
calibre writes: line (calibreWriteAccess) says whether Calibre currently accepts writes. A
ping index count marked (count not checked against the library) (indexedUnchecked) is a raw
row count and may include removed books.
| Request | Action |
|---|---|
| "Які книги по JS є?" | calibre_search query: "javascript" |
| "В якій книзі є event sourcing?" | calibre_semantic_search query: "event sourcing" |
| "Where exactly does this book cover CQRS?" | calibre_search mode:fts scope:book bookId:N |
| "What did I highlight about commits?" | calibre_search_annotations query:"commit" (Calibre 9.18+; calibre_too_old on older) |
| "What do my author notes say about the outbox?" | calibre_search_annotations kind:notes query:"outbox" (notes attach to items: no filter) |
| "Show my note on Adam Bellemare" | calibre_search_annotations kind:notes query:'authors:"Adam Bellemare"' (also series: / tags: / publisher: / #custom:) |
| "All my highlights in book N" | calibre_search_annotations scope:book bookId:N query:"*" |
| "Rate Vibe Coding 5 stars" | calibre_update_book changes: {rating: 10} |
| "Зміни теги книги" | calibre_update_book changes: {tags: [...]} |
| "Tag all SQL books" | calibre_bulk_update query:"title:SQL" → preview → apply |
| "Books without tags?" | calibre_search query: "tags:false" |
| "Знайди дублікати" | calibre_find_duplicates |
| "Об'єднай ці дублікати" / "Merge these two records" | calibre_merge_books (dry-run plan → confirm with user → confirm:true) |
| "Що не так з бібліотекою?" | calibre_quality_report |
| "What's this 795731065.pdf book?" | calibre_extract_isbn → calibre_recover_metadata |
| "Add book from Downloads" | calibre_add_book |
| "Delete a book" | calibre_remove_book (dry-run → confirm with user → confirm:true; unknown ids are reported as not found, never counted) |
| "Show all tags" | calibre_list_categories field:"tags" |
| "Convert to EPUB" | shell: ebook-convert |
| "Export a book" | shell: calibredb export --with-library "$LIB" |
| "Send book to NotebookLM" | ensure TXT (ebook-convert), read file, source_add |
An isError result already says what to do next — follow it. A limit (limit, topK,
maxChars) out of range is not an error: the result says which value was used instead
(structuredContent.paramNotes, one line in the text). When the cause stays unclear
or the same failure repeats, call calibre_ping: its recent errors list the server's own
failures with tool and call id, plus today's log file path. Its Index: line lists every
library as Name (id: Lib_Id) [default]: …: pass that id, not the display name, as library. With file access, read the
README.md beside that log file and trace the failing call id; report the logged cause
rather than a guess.
A library_id_collision error means two libraries' ids differ only in letter case and the named
one was refused because the other was indexed first. Tell the user which library is refused and
that renaming its folder (then restarting Calibre's Content Server) fixes it; the other library
keeps working. Don't retry the build.
calibredb --help / calibredb <subcommand> --help — the authoritative CLI reference for the installed versiondocs/TOOLS.md (repo) — full tool reference: parameters, defaults, preview/confirm flowsdocs/SEMANTIC-SEARCH.md (repo) — how the semantic index and hybrid retrieval workdocs/TROUBLESHOOTING.md (repo) — symptom-first fixes: connection, model install, write gates, cursors, logsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub caelum29/calibre-mcp --plugin calibre-mcp5 skills in this plugin
/calibre-distillTurn ONE Calibre book into a reusable agent skill — frameworks, mental models, principles, techniques, anti-patterns, glossary, cheatsheet — by driving the calibre-mcp server (chapter map, keyword + semantic in-book search; no temp files, no Python). Use when the user wants to study a Calibre book through Claude Code / Copilot / Amp, apply an author's frameworks while working, fold a new source or a targeted topic slice into an existing skill, or stamp what they learned back into the library (tags + distill note via the gated write tools). Works on EN + RU/UK books. Single-book distiller — for one topic synthesized across several books, use the sibling calibre-distill-topic./calibre-distill-topicSynthesize ONE topic across MULTIPLE Calibre books into a single, concept-keyed agent skill — original multi-source authorship (decision frameworks, cross-source config tables, an explicit where-authors-agree/disagree section), with a full ISBN bibliography that doubles as a live-source binding for later deep dives. Drives the calibre-mcp server (chapter maps, in-book keyword + semantic search) to pull a thin topic slice from each source; no temp files, no Python. Use when the user wants a topic study aid built from several books ("kafka reliability from my Kafka shelf", "database indexing across these 3 books"). Requires ≥3 sources; works on EN + RU/UK books. Sibling of calibre-distill — single-book requests belong there.Other plugins' skills for the same job