Purpose
calibreweb-mcp is a read-only Model Context Protocol (MCP) server for connecting to Calibre-Web and Calibre-Web Automated—the self-hosted ebook library web interface. It lets MCP clients such as Claude Code, Claude Desktop, and Codex search the library, browse curated views and shelves, follow per-format download links, and pull cover images directly into the conversation.
Calibre-Web has no REST API, and its only stable machine-readable interface is the OPDS catalog feed it provides for ebook reader apps. This server uses exactly that feed: Atom XML plus HTTP Basic authentication in, structured book data out.
Main capabilities
- The API Calibre-Web never had: Parses OPDS Atom feeds into structured book data, including numeric ids, per-format download URLs, and bounded summaries.
- Read-only by construction: All six tools are GET requests and write nothing.
- Structured output: Every tool declares an outputSchema and returns structuredContent alongside the text block, so clients can use results without parsing prose.
- Book entry information: Includes authors, tags, series (with index), rating, a bounded summary, cover URL, and per-format download URLs—links a person can open directly.
- Configurable tool count: Six tools is a ceiling, not a floor; setting CALIBRE_WEB_ALLOW_TOOLS=essential registers a curated set of five tools (search_books, list_books, list_shelves, get_shelf_books, get_stats), and a model picking the right tool from five is far more reliable than from six.
- Pagination support: The feed paginates according to the instance's books-per-page setting (default 60), and page size cannot be controlled by the client; each list returns pagination.nextOffset, which can be passed as offset in the next call. The discover view is a random selection and is not paginated.
How to use
Requirements
- Node.js 22 or later
- A Calibre-Web instance (developed against the current linuxserver/calibre-web image; Calibre-Web Automated works the same way)
- A Calibre-Web user for this server. The OPDS feed authenticates with the normal web login—use a dedicated account with only the View and Download roles, not an admin account. If the instance allows anonymous browsing, the server can also run without credentials.
Tool loading choices
CALIBRE_WEB_ALLOW_TOOLS and CALIBRE_WEB_DENY_TOOLS accept comma-separated tool names; a trailing * matches the entire family. essential is a curated preset of five tools: search_books, list_books, list_shelves, get_shelf_books, get_stats.
An entry that matches no tools causes startup to abort and names the entry, so typos never silently hide tools. Filtered-out tools are never registered, so they do not exist in tools/list, and tools/call does not recognize them either.
Using via mcp-hub
Clients that cannot spawn local processes—ChatGPT connectors, Claude on the web, Cursor, LibreChat—can reach calibreweb-mcp through mcp-hub: a single container serving multiple stdio MCP servers over Streamable HTTP, behind a single-password OAuth 2.1 login, with long-lived tokens for clients that cannot do OAuth. Its /hub endpoint places all servers behind six meta-tools, so one connector can reach all servers without putting N×tool schemas in the model context.
Its /config/mcp.json uses Claude Code's format, so the entry is the one you already have. The allowTools and denyTools in it are the hub's own per-server filters, which are not the same thing as the *_ALLOW_TOOLS in env.
When to use it
- Searching a self-hostedManage a Calibre-Web library
- Browse the library's curated views and bookshelves
- Get book cover images
- Get download links for each format for people to open
- Access via mcp-hub for clients that cannot spawn local processes
Limitations
- No writes: OPDS feeds have no write capability, and this server will not add one.
- No file downloads: Tools return download URLs, not ebook payloads.
- No faceted browsing (author/series/tag/publisher/language/format as separate index feeds): search_books covers these queries; the relevant routes exist, and tools can be added if there is a real use case.
- Read-only construction: GET requests only, no state whatsoever.
- Security measures: Book metadata is untrusted third-party data, every result states this, control characters are stripped, and XML entity processing is disabled (documents declaring a DOCTYPE or entities are rejected outright). Responses are bounded before parsing (8 MB feed, 1 MB cover), and bounded again before reaching the model (per-book and per-response budgets). Feed hrefs are only passed through when they resolve to a configured source and are http(s). Redirects are rejected, so Basic credentials are never replayed to another host; covers are only passed through when they have a real image content type. Passwords are cleared from the process environment at startup, and URLs are credential-redacted before appearing in any log or result.
See calibreweb-mcp.ni-c.de for the full guide, tool reference, and security notes (source in docs/).