Calibre Librarian MCP Server
Click on "Install 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 Librarian MCP Serverfind books by Terry Pratchett"
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 Librarian MCP Server
Model Context Protocol (MCP) server that surfaces your Calibre catalog to Claude via xmcp.
Requirements
Node.js:
v24.13.0(auto-managed if you usenvm use).pnpm: version
10.28.0or newer.Calibre CLI tools:
calibredbandebook-convertmust be installable on your PATH.Environment variables:
CALIBRE_LIBRARY_PATH– absolute path to your Calibre library directory.CALIBRE_DB_COMMAND– location of thecalibredbexecutable (e.g.,/opt/homebrew/bin/calibredb).FAVORITE_SEARCH_ENGINE_URL– base URL used when the server offers external book lookups (defaults to DuckDuckGo:https://duckduckgo.com/?q=).
Setup
Clone and enter the repo:
git clone https://github.com/chepetime/calibre-librarian-mcp.git cd calibre-librarian-mcpInstall dependencies with pnpm:
pnpm installCopy the sample environment file and fill in your paths:
cp .env.example .env
Update the variables so the server can reach your Calibre library.
The env is just for local development. For Claude Desktop, you'll need to configure the server in the Claude Desktop settings.
Local development workflow
Use these scripts while iterating locally:
pnpm run dev– watches files and serves the MCP server over stdio.pnpm run lint– type-checks and lints the project.pnpm test– runs the full unit test suite once.pnpm test:watch– reruns tests whenever source files change.
Build for Claude Desktop (no Docker)
Follow this flow when you want Claude Desktop (or any MCP client) to run the compiled server directly:
Build the project so
dist/stdio.jsexists:pnpm run build(Optional) Run the built output locally for a quick smoke test:
pnpm start # equivalent to: node dist/stdio.jsConfigure Claude Desktop by editing
~/Library/Application Support/Claude/claude_desktop_config.json(or via the in-app UI). Setcommandtonode, include the absolute path todist/stdio.jsas the firstargsentry, and provide the required environment variables:
{
"globalShortcut": "",
"mcpServers": {
"calibre-librarian": {
"command": "node",
"args": ["/Users/you/path/to/calibre-librarian-mcp/dist/stdio.js"],
"env": {
"CALIBRE_LIBRARY_PATH": "<Absolute path to your>/Calibre",
"CALIBRE_DB_COMMAND": "/opt/homebrew/bin/calibredb",
"FAVORITE_SEARCH_ENGINE_URL": "https://duckduckgo.com/?q="
}
}
},
"preferences": {
"quickEntryShortcut": "off",
"menuBarEnabled": false
}
}After Claude Desktop reloads, it will list calibre-librarian as an available MCP server whenever MCP-enabled conversations start.
Docker deployment
Run the server in a container with Calibre pre-installed when you prefer an isolated environment.
Quick start
# Build the image
docker build -t calibre-librarian-mcp .
# Run with your Calibre library mounted
docker run -it \
-v /path/to/your/calibre/library:/library:ro \
-e CALIBRE_LIBRARY_PATH=/library \
calibre-librarian-mcpDocker Compose
Copy and customize
docker-compose.yml.Set your library path and launch the stack:
export CALIBRE_LIBRARY_PATH=/path/to/your/calibre/library docker compose up --build
Claude Desktop with Docker
To let Claude Desktop run the container directly, point it at docker run:
{
"mcpServers": {
"calibre-librarian": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/your/calibre/library:/library:ro",
"-e",
"CALIBRE_LIBRARY_PATH=/library",
"calibre-librarian-mcp"
]
}
}
}Note: Remove :ro from the volume mount and add -e CALIBRE_ENABLE_WRITE_OPERATIONS=true to enable write operations.
Tool Catalog & Examples
Installing the MCP CLI
The examples below use the mcp CLI published by Anthropic. Install (or run) it with any of the following options:
Global install (recommended if you call MCP tools frequently):
npm install -g @anthropic-ai/mcp-cli # now `mcp --help` should workOne-off execution without a global install:
npx @anthropic-ai/mcp-cli --help # or pnpm dlx @anthropic-ai/mcp-cli --help
CLI usage
All tools can be invoked from MCP Inspector or the CLI:
mcp call calibre-librarian <toolName> '<json payload>'Prompts (e.g., merge_duplicates, library_cleanup, search_library) use the companion command:
mcp prompt calibre-librarian library_cleanup '{"focus":"missing covers"}'Swap library_cleanup for any prompt listed below, and replace calibre-librarian with the server name you configured in mcp.json.
Library Overview & Metadata
Tool | Example |
|
|
|
|
|
|
|
|
|
|
Search & Discovery
Tool | Example |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full-Text & Content Access
Tool | Example |
|
|
|
|
|
|
Cleanup & Duplicate Workbench
Tool | Example |
|
|
|
|
|
|
|
|
|
|
|
|
Smart Maintenance Recipes
Tool | Example |
|
|
|
|
|
|
|
|
Metadata Editing & Custom Columns
Requires
CALIBRE_ENABLE_WRITE_OPERATIONS=true
Tool | Example |
|
|
|
|
Setup & Configuration Tools
Tool | Example |
|
|
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Absolute path to your Calibre library directory |
| No |
| Path to the |
| No |
| Timeout for calibredb commands in milliseconds |
| No |
| Enable metadata editing tools ( |
| No |
| Base URL for external book search links |
| No |
| Server name shown in MCP clients |
Resources
The server exposes these MCP resources:
URI | Description |
| Library configuration and statistics |
| Custom column definitions |
| MCP Inspector verification guide |
Troubleshooting
"calibredb: command not found"
The server can't find the Calibre CLI tools. Solutions:
macOS (Homebrew):
brew install calibreor setCALIBRE_DB_COMMAND=/Applications/calibre.app/Contents/MacOS/calibredbmacOS (App):
CALIBRE_DB_COMMAND=/Applications/calibre.app/Contents/MacOS/calibredbWindows:
CALIBRE_DB_COMMAND=C:\Program Files\Calibre2\calibredb.exeLinux: Install Calibre via package manager, usually adds
calibredbto PATH
"Library path does not exist"
Verify your CALIBRE_LIBRARY_PATH:
# Check the path contains metadata.db
ls "$CALIBRE_LIBRARY_PATH/metadata.db""Write operations are disabled"
Write tools (set_metadata, set_custom_column, bulk_retag with preview:false, etc.) require:
CALIBRE_ENABLE_WRITE_OPERATIONS=trueAdd this to your .env file or Claude Desktop config.
"Command timed out"
For large libraries, increase the timeout:
CALIBRE_COMMAND_TIMEOUT_MS=60000 # 60 seconds"Full-text search returns no results"
Calibre FTS must be enabled:
Open Calibre
Go to Preferences → Searching
Enable Full text searching
Click Re-index all books
Server not appearing in Claude Desktop
Verify the config file path:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Check JSON syntax is valid
Restart Claude Desktop completely
Check Claude Desktop logs for errors
Testing with MCP Inspector
Use the built-in verification guide:
# Start dev server
npm run dev
# In another terminal, run inspector
npx @anthropic/mcp-inspectorOr use the generate_claude_config tool to get your configuration.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chepetime/calibre-librarian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server