# calibre-mcp

MCP server connecting AI assistants to a Calibre ebook library. It runs semantic searches across books, reads exact chapters, and curates metadata.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 20
- Author: caelum29
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/caelum29/calibre-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/calibre-mcp

## What it does

The server provides 19 tools for working with Calibre libraries. Assistants run hybrid vector and keyword searches across the entire collection or pinpoint exact sections inside a single volume. Cross-lingual queries work reliably between English and Russian.

Safety controls prevent library corruption. The integration stays strictly read-only until you enable write permissions through environment flags. All write operations pass through Calibre Content Server, avoiding database lockups against the desktop GUI.

You need Node.js 22.16 or higher and an active Calibre Content Server. Without Poppler `pdftotext` or Python `pymupdf` installed, the server falls back to the built-in `ebook-convert` utility for PDF parsing.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `CALIBRE_MCP_SERVER_URL`, `CALIBRE_MCP_LIBRARY`, `CALIBRE_MCP_ENABLE_WRITE`, `CALIBRE_MCP_CALIBREDB_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env CALIBRE_MCP_SERVER_URL=<CALIBRE_MCP_SERVER_URL> --env CALIBRE_MCP_LIBRARY=<CALIBRE_MCP_LIBRARY> --env CALIBRE_MCP_ENABLE_WRITE=<CALIBRE_MCP_ENABLE_WRITE> --env CALIBRE_MCP_CALIBREDB_PATH=<CALIBRE_MCP_CALIBREDB_PATH> --transport stdio calibre-mcp -- npx -y calibre-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add calibre-mcp --env CALIBRE_MCP_SERVER_URL=<CALIBRE_MCP_SERVER_URL> --env CALIBRE_MCP_LIBRARY=<CALIBRE_MCP_LIBRARY> --env CALIBRE_MCP_ENABLE_WRITE=<CALIBRE_MCP_ENABLE_WRITE> --env CALIBRE_MCP_CALIBREDB_PATH=<CALIBRE_MCP_CALIBREDB_PATH> -- npx -y calibre-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "calibre-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "calibre-mcp"
            ],
            "env": {
                "CALIBRE_MCP_SERVER_URL": "<CALIBRE_MCP_SERVER_URL>",
                "CALIBRE_MCP_LIBRARY": "<CALIBRE_MCP_LIBRARY>",
                "CALIBRE_MCP_ENABLE_WRITE": "<CALIBRE_MCP_ENABLE_WRITE>",
                "CALIBRE_MCP_CALIBREDB_PATH": "<CALIBRE_MCP_CALIBREDB_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "calibre-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "calibre-mcp"
            ],
            "env": {
                "CALIBRE_MCP_SERVER_URL": "<CALIBRE_MCP_SERVER_URL>",
                "CALIBRE_MCP_LIBRARY": "<CALIBRE_MCP_LIBRARY>",
                "CALIBRE_MCP_ENABLE_WRITE": "<CALIBRE_MCP_ENABLE_WRITE>",
                "CALIBRE_MCP_CALIBREDB_PATH": "<CALIBRE_MCP_CALIBREDB_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e CALIBRE_MCP_SERVER_URL=<CALIBRE_MCP_SERVER_URL> -e CALIBRE_MCP_LIBRARY=<CALIBRE_MCP_LIBRARY> -e CALIBRE_MCP_ENABLE_WRITE=<CALIBRE_MCP_ENABLE_WRITE> -e CALIBRE_MCP_CALIBREDB_PATH=<CALIBRE_MCP_CALIBREDB_PATH> calibre-mcp npx -y calibre-mcp
```
Replace <…> with your own values

## When to use it
- find relevant passages across library books using meaning-based search
- read chapters and extract diagrams directly into assistant chats
- detect duplicate book entries with merge safety scores
- populate missing book metadata from Google Books or Open Library

## Example prompts
- Search my library for books explaining consumer group rebalancing
- Read the chapter on database indexing from the PostgreSQL book
- Scan the catalog for duplicate titles before merging entries

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44908
- [screenpipe](https://affpapa.org/en/nevibecode/mcp/screenpipe.md) — MCP server · ★ 22082
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12826
- [kaneo](https://affpapa.org/en/nevibecode/mcp/kaneo.md) — MCP server · ★ 9623
- [Mindwtr](https://affpapa.org/en/nevibecode/mcp/mindwtr.md) — MCP server · ★ 2330
- [Azure DevOps (ADO)](https://affpapa.org/en/nevibecode/mcp/azure-devops-ado.md) — MCP server · ★ 2071

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
