calibre-library-mcp
Allows searching book metadata, listing recent books, inspecting book details, and performing full-text search on a Calibre library managed by Calibre-Web.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@calibre-library-mcp find books by Jane Austen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Calibre Library MCP
calibre-library-mcp is a local stdio MCP server that lets AI tools search a self-hosted Calibre library over SSH.
It is designed for a common home-lab setup:
Calibre or Calibre-Web runs on a remote server.
The Calibre library directory is mounted into a container, commonly at
/books.SSH access to the host is available from the machine running the AI tool.
Calibre full-text search is enabled so book contents can be queried.
No HTTP service or public port is opened by this MCP server. The AI tool starts it locally and it reaches the Calibre host over SSH.
Features
Search book metadata by title or author.
List recently added books.
Inspect details for a Calibre book ID.
Search indexed full text and return snippets.
Check Calibre full-text index status.
Optionally trigger a remote index-maintenance script.
Related MCP server: calibre-manager
Requirements
Python 3.11 or newer on the local machine.
The
mcpPython package.SSH key access from the local machine to the Calibre host.
Docker on the Calibre host, if you use the default container-based access pattern.
A Calibre-Web container or equivalent container that can run Python and read the library files.
The default implementation queries SQLite from inside the configured Calibre-Web container with:
docker exec -i "$CALIBRE_WEB_CONTAINER" python3 ...Install
Clone the repository:
git clone https://github.com/<owner>/calibre-library-mcp.git
cd calibre-library-mcpCreate a virtual environment and install the package:
python3 -m venv .venv
. .venv/bin/activate
pip install -e .Configuration
Set these environment variables in your MCP client configuration:
Variable | Required | Description | Example |
| yes | Hostname or IP address of the Calibre server. |
|
| yes | SSH user on the Calibre server. |
|
| no | SSH private key path. |
|
| no | SSH port. Defaults to |
|
| no | Container used to query the mounted library. Defaults to |
|
| no | Library path inside the container. Defaults to |
|
| no | Library path on the remote host for Calibre CLI status checks. |
|
| no | Calibre image used for |
|
| no | Optional remote script for refreshing FTS. |
|
MCP Client Config
Most MCP clients accept a stdio server definition similar to this:
{
"mcpServers": {
"calibre-library": {
"command": "/absolute/path/to/calibre-library-mcp/.venv/bin/calibre-library-mcp",
"env": {
"CALIBRE_SSH_HOST": "calibre.example.lan",
"CALIBRE_SSH_USER": "calibre",
"CALIBRE_SSH_KEY": "/home/user/.ssh/id_ed25519",
"CALIBRE_WEB_CONTAINER": "calibre-web",
"CALIBRE_CONTAINER_BOOKS_PATH": "/books",
"CALIBRE_REMOTE_LIBRARY_PATH": "/srv/calibre/library"
}
}
}
}If you do not install the package, run it from a checkout:
{
"mcpServers": {
"calibre-library": {
"command": "/absolute/path/to/calibre-library-mcp/.venv/bin/python",
"args": ["-m", "calibre_library_mcp.server"],
"cwd": "/absolute/path/to/calibre-library-mcp",
"env": {
"PYTHONPATH": "/absolute/path/to/calibre-library-mcp/src",
"CALIBRE_SSH_HOST": "calibre.example.lan",
"CALIBRE_SSH_USER": "calibre"
}
}
}
}Tools
calibre_search_books
Searches metadata by title or author.
Arguments:
query: search text.limit: maximum results, default10.
calibre_recent_books
Lists recently added books.
Arguments:
limit: maximum results, default10.
calibre_book_details
Returns metadata, formats, tags, and file names for one Calibre book ID.
Arguments:
book_id: numeric Calibre book ID.
calibre_search_text
Searches extracted full text from Calibre's full-text index.
Arguments:
query: search text.limit: maximum results, default10.snippet_chars: snippet length, default500.
calibre_index_summary
Returns raw index counts by format.
calibre_index_status
Runs Calibre's own calibredb fts_index status command through Docker on the remote host.
calibre_run_index_maintenance
Starts the optional remote maintenance script configured by CALIBRE_MAINTENANCE_SCRIPT.
Security Notes
Use a dedicated SSH key with the least permissions practical.
Do not publish private hostnames, IP addresses, usernames, or keys in MCP config examples.
Keep the MCP server local to the AI tool. It does not need to listen on a network port.
The search tools are read-only. The optional maintenance tool can start a remote script, so configure it only if you want that capability.
Calibre Full-Text Search
The calibre_search_text tool depends on Calibre's full-text search index. See docs/calibre-full-text-search.md for setup and maintenance instructions.
Limitations
Calibre indexes text it can extract from each book file.
Scanned PDFs need OCR text layers before they become searchable.
Images, diagrams, and screenshots are not searchable unless OCR has been applied.
Very large libraries may take a while to search with simple substring matching.
Available Tools
7 toolscalibre_book_detailsB
Get metadata, formats, and library file names for a Calibre book ID.
Inputs: book_id (required). Returns: result
calibre_index_statusA
Return Calibre's own full-text indexing status.
Inputs: no named parameters. Returns: result
calibre_index_summaryA
Return raw full-text index row counts grouped by format.
Inputs: no named parameters. Returns: object
calibre_recent_booksC
List recently added books from the Calibre library.
Inputs: limit. Returns: result
calibre_run_index_maintenanceA
Start the optional remote maintenance script that refreshes Calibre FTS.
Inputs: no named parameters. Returns: result
calibre_search_booksC
Search Calibre metadata by book title or author.
Inputs: query (required), limit. Returns: result
calibre_search_textC
Search extracted full text from indexed Calibre books and return snippets.
Inputs: query (required), limit, snippet_chars. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: book details, two index reporting tools (status vs. summary), recent books, index maintenance, and two search tools (metadata vs. full text). No overlap or ambiguity.
All tools follow a consistent 'calibre_verb_noun' pattern using snake_case, making the naming predictable and easy to understand.
With 7 tools, the server is well-scoped for querying and maintaining a Calibre library. It's not overburdened with unnecessary tools nor lacking essential ones for its purpose.
The tool set covers core operations: getting book details, searching, listing recent books, and index maintenance. Missing a tool to list all books or filter by other criteria, but given the focus on search and indexing, this is a minor gap.
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server for search and retrieval over a local LanceDB database
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server for managing local Calibre libraries using the calibredb CLI. It allows users to search books, manage metadata, and retrieve EPUB file paths through natural language commands.7-
- AlicenseAqualityDmaintenanceAn MCP server to manage and organize a Calibre ebook library, enabling metadata editing, search, conversion, and more through AI assistants.175MIT
- AlicenseNot gradedqualityDmaintenanceMCP server enabling LLMs to query a local Calibre Content Server for ebook metadata, chapters, and content in HTML or Markdown.6 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables semantic search over local Calibre libraries via MCP, allowing AI assistants to query books, annotations, and export bibliographies while keeping data private.9MIT