/calibre-mcp:calibre-mcp-setupfrom calibre-mcp
Guides end-to-end setup of calibre-mcp: preflight checks, client-specific install (Claude Code, Desktop, Cowork, generic MCP), config, and verification with semantic-status triage. Use when connecting an agent to a Calibre library or fixing a broken install.
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.
Take this machine from "has Calibre" to "calibre-mcp verified working in the user's client(s)". Work phase by phase; a phase is complete only when its VERIFY produced the stated evidence as a tool result in this session — never claim progress without one. If a VERIFY fails twice, stop and report; don't improvise workarounds.
Scope: install + configure + verify, including guiding the user through the Calibre-side configuration (Content Server, write permission). Out of scope: building a whole-library semantic index (offer the command, don't run it), modifying the Calibre library, installing Calibre or Node themselves.
Decisions reserved for the user (never default them yourself): enabling the write gate, starting the Content Server (GUI vs headless daemon), running the index build, and which client(s) to install into.
Check in order. Apply reversible remediations; stop for the rest.
.mcpb path — Desktop ships its
own runtime): node --version. Missing/old → if the user only wants Desktop,
continue; otherwise stop (user installs Node).calibredb --version, then the platform default:
/Applications/calibre.app/Contents/MacOS/calibredb --version& "C:\Program Files\Calibre2\calibredb.exe" --version/usr/bin/calibredb --version
Missing → stop; user installs from https://calibre-ebook.com/download.
(The server auto-discovers calibredb per platform — a non-default location only
needs CALIBRE_MCP_CALIBREDB_PATH later.)curl -s http://localhost:8080/interface-data/init
(PowerShell: curl.exe, or Invoke-WebRequest). Non-default port → adjust the URL
here and set CALIBRE_MCP_SERVER_URL in Phase 2. Not reachable → tell the user:
Calibre → Connect/share → Start Content server, or headless
calibre-server --port 8080; wait, re-verify. Don't start it yourself — GUI vs
daemon is their call. Warn: the two are mutually exclusive — Calibre's server
lock is global, so calibre-server refuses to start while the GUI is open
("Another calibre program … is running"). GUI open = use the GUI's own Content
Server, nothing else.pdftotext -v (poppler: brew install poppler /
winget install poppler / distro package). Absent = degraded PDF extraction, not a
blocker. Footnote it; install nothing.VERIFY: 2 and 3 green (1 too, unless Desktop-only).
How Calibre itself should be configured for calibre-mcp. All server access goes through the Content Server; the library database is never touched directly.
CALIBRE_MCP_SERVER_URL.calibre-server --port 8080 [--enable-local-write] /path/to/library. Remember the global lock from Phase 0:
this cannot run while the GUI is open — pick one.--enable-local-write).
With it off, every routed write returns an actionable "write refused" — this
toggle is the first thing to check when that appears.CALIBRE_MCP_ENABLE_WRITE=1 (Phase 2). Without it, write tools
aren't even advertised.library param (display name is fine), and
CALIBRE_MCP_LIBRARY sets the default.Detect the harness you're running in, then ask the user ONE question — where they want calibre-mcp (multiple allowed):
| Client | Path |
|---|---|
| Claude Code | (a) plugin — server + skills + config dialog, auto-updates — or (b) server only |
| Claude Desktop | (c) .mcpb one-click, or (d) JSON config |
| Cowork | (e) = configure Claude Desktop; Desktop bridges local servers into Cowork automatically |
| Anything else (Copilot, Amp, Cursor, Codex, …) | (f) generic MCP config + skills via skills.sh |
Don't proceed on a guess.
(a) Claude Code plugin
claude plugin marketplace add caelum29/calibre-mcp
claude plugin install calibre-mcp@caelum29
Then surface the userConfig options (server URL, library, write gate, add roots) via
/plugin configure calibre-mcp@caelum29 or --config KEY=VALUE. Write gate stays OFF
unless the user explicitly says otherwise.
(b) Claude Code, server only
claude mcp add calibre -- npx -y calibre-mcp
(c) Claude Desktop .mcpb — user downloads the .mcpb asset from
https://github.com/caelum29/calibre-mcp/releases/latest and opens it; Desktop prompts
for settings. Manual by design — give the link and stop this branch. Note: the bundle
ships without the embeddings dependency (semantic search reports unavailable; keyword
FTS works fully).
Enabling semantic search in the .mcpb install (optional, on request): run
npm install @huggingface/transformers inside the extension directory
(Settings → Extensions → Advanced shows the path; macOS:
~/Library/Application Support/Claude/Claude Extensions/local.mcpb.<id>.calibre-mcp/),
then restart the server — toggle the extension off/on in Settings → Extensions, or
restart Desktop. The restart is mandatory, not a nicety: Node 24 negatively caches a
failed package lookup for the process lifetime, so installing while the server runs
NEVER takes effect. This restart-after-install rule applies to every install type
(npx, dev checkout too).
(d) Claude Desktop JSON — add to claude_desktop_config.json
(macOS ~/Library/Application Support/Claude/, Windows %APPDATA%\Claude\):
{ "mcpServers": { "calibre": { "command": "npx", "args": ["-y", "calibre-mcp"] } } }
Windows: if the server never connects, wrap the command —
"command": "cmd", "args": ["/c", "npx", "-y", "calibre-mcp"] (Desktop-on-Windows
spawning quirk).
(f) Other MCP clients — emit the same mcpServers block and point the user to
their client's MCP-config location (don't guess paths you can't verify). Skills for
Agent-Skills-compatible harnesses: npx skills@latest add caelum29/calibre-mcp.
Env vars for any JSON path, all optional: CALIBRE_MCP_SERVER_URL
(default http://localhost:8080), CALIBRE_MCP_LIBRARY (display name is fine —
libId resolution is internal; empty = server default), CALIBRE_MCP_ENABLE_WRITE
(unset = read-only), CALIBRE_MCP_ADD_ROOTS, CALIBRE_MCP_CALIBREDB_PATH,
CALIBRE_MCP_RERANK=off (skip the ~576 MB reranker model — see Phase 4).
Reproducibility: npx -y calibre-mcp may serve a stale cached version — pin
(npx -y [email protected]) or force latest (calibre-mcp@latest) when it matters.
VERIFY (a/b): claude mcp list shows the calibre server "✔ Connected".
VERIFY (c/d/e/f): config file contains the entry (read it back); live check is Phase 3.
In a session where the server is loaded, call the calibre_ping tool — its
semantic-status block reports connectivity, library, write-gate state, whether
Calibre itself accepts writes (calibre writes: / calibreWriteAccess), and
semantic-index state in one call. Evidence = the ping result.
Triage the semantic block (don't just echo it):
| Ping says | Meaning → action |
|---|---|
available: true + counts | Semantic ready; nothing to do |
dependencyInstalled: false | Expected for .mcpb / --omit=optional installs; keyword search fully works. Offer the Phase 2(c) enable recipe |
dependencyInstalled: true, loaded: "failed" / restartRequired: true | Dep is on disk but this process can't use it — restart the server; nothing else fixes it |
modelCached: false | First embedding build will download the ~118 MB model — set expectations |
Index: entry busy — index locked by another process, retry | Another process (often a calibre_build_index in a second client) holds that library's index; nothing is damaged. Re-run ping later. index unreadable instead means the file itself is damaged: rebuild |
Index: entry not indexable — id "X" differs only in case from "Y", which was indexed first | Two library ids differ only in letter case; Y owns the index. Tell the user to rename library X's folder and restart the Content Server; Y keeps working |
Index: entry stale index — delete <file>… | Built by an older index version (e.g. 4, before text normalisation) or another model — search and builds refuse it, never mix it. 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 entry names the exact path); offer that rebuild for that library (a full re-index; hours for ~1,000 books); calibre_search works meanwhile |
vectorCount 0 / missing with dep OK | No semantic index yet — offer calibre_build_index (Phase 4) |
calibre writes: refused | Calibre blocks anonymous writes: enable "Allow un-authenticated local connections to make changes" (Preferences → Sharing over the net), then restart the Content Server; a command-line calibre-server needs --enable-local-write instead. With CALIBRE_MCP_ENABLE_WRITE on, ping adds a warning: line: every write tool fails until then |
calibre writes: unknown (<reason>) | The probe got no clear answer; reads are fine. Writes may still work: try one and read its error |
recent errors: N with N > 0 (or recent errors: N (M occurrences) when some repeat) | Server-side failures this process logged: N distinct errors, M times in all. Read each line (tool, call id, cause, and (×K since …) for a repeat) before guessing; the cause is usually named there |
Logs — when ping's errors don't explain the failure and you can read files: ping's
log file: line names today's JSONL (one JSON object per line, under <data dir>/logs/,
Phase 4 locations). Read the README.md in that folder first — it is the schema and jq
recipes for the installed version; follow one failing call end to end by its call id.
For more detail the user sets CALIBRE_MCP_LOG_LEVEL=debug and restarts the server.
A client can't see a server registered mid-session: if calibre_ping isn't available
here, say so, and give the user the exact post-restart check ("restart, then ask: ping
my calibre library"). Never simulate or predict the result.
calibre_build_index downloads multilingual-e5-small
(~118 MB, one-time) and pre-warms the cross-encoder reranker
(bge-reranker-v2-m3, ~576 MB one-time) — warn about the size before the first
build; CALIBRE_MCP_RERANK=off skips the reranker (search still works, fused order
only). Suggest starting with a subset (one tag / a few ids). keywordOnly: true =
the zero-ML fallback. Models + index live in the shared data dir (macOS:
~/Library/Application Support/calibre-mcp/index; Linux: $XDG_DATA_HOME or
~/.local/share/…; Windows: %APPDATA%-based) — plan for ~700 MB+ with both models.calibre-mcp usage
guide, calibre-distill, calibre-distill-topic.Upgrade (per install type):
claude plugin update calibre-mcp@caelum29.npx -y calibre-mcp@latest, or pin explicitly..mcpb: download the new release asset and open it — installing over
the old version is the upgrade path. A manually-installed @huggingface/transformers
inside the old extension dir does NOT carry over — re-run the Phase 2(c) enable
recipe (incl. restart) after upgrading.calibre_ping.Uninstall: claude plugin uninstall calibre-mcp@caelum29 / claude mcp remove calibre / delete the mcpServers entry / remove the extension in Desktop Settings.
The shared data dir (index + models, Phase 4 locations) is NOT removed by any of
these — deleting it is the user's call; a rebuilt index restores everything except
the one-time model downloads.
Clean slate (index corrupt / wrong model state): stop the client, delete the shared data dir, restart, rebuild the index. Never delete the Calibre library itself.
phase 0: node <ver> | calibredb <ver> @ <path> | content-server OK/FAIL | pdftotext yes/no
phase 2: <client(s)> → <command results>
phase 3: <calibre_ping block, or the post-restart instruction>
recent errors: <N, or N (M occurrences) | top msg + tool, or none>
write gates: MCP ON/OFF | calibre-side local-write ON/OFF/unknown (user's decision)
offered, not run: <list>
stops hit: <list or none>
Done = phases 0–3 verified. Anything reported without a tool result in this session is a failure of this setup, not a success.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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./calibre-mcpSearch, read, and curate your Calibre ebook library. The operating manual for the calibre-mcp server (20 tools) with the calibre CLI as escape hatch. Covers picking the right search (metadata query vs full-text vs semantic), reading book content, chapter maps and book figures, gated preview-first writes (metadata, tags, bulk edits), deduplication, quality audits, ISBN extraction + metadata recovery, add/remove/merge books, semantic-index builds, and safe CLI routing through the Content Server while the Calibre GUI is running (convert, export, catalog). Use for any ebook/library task: finding books, searching inside them, curating metadata, or maintenance. Triggers on 'book', 'ebook', 'calibre', 'library', 'книга', 'бібліотека', 'знайди в книзі'./calibre-study-notesGenerate active-learning study notes (конспекти) from books in the Calibre library, for a HUMAN learner — not an agent skill. Produces a markdown note built for retention: questions-first sections, own-words concepts, reader-domain examples, self-test with source pointers, Anki export, spaced-review metadata. Also runs interactive review (quiz) sessions over existing notes. Use for: studying a topic, a theme, or a chapter of a book from the library. Single-book agent-skill distillation belongs to `calibre-distill`; multi-book topic skills belong to `calibre-distill-topic`. This skill is for notes a person will study from. Triggers: "конспект", "законспектуй", "зроби конспект", "хочу вивчити", "розібрати розділ", "розбери главу", "study notes", "make notes on", "learn this chapter", "підготуй матеріал для вивчення", "повтори зі мною", "review my notes", "поганяй по конспекту", "quiz me on".
Other plugins' skills for the same job