calibre-mcp

calibre-mcp

Enables searching, reading, and managing a Calibre ebook library through natural language, with features like metadata search, full-text search, content extraction, and library management.

Category
Visit Server

README

calibre-mcp Version 1.0.0

A Model Context Protocol (MCP) server for searching, reading, and managing your Calibre ebook library. Completely rewritten in TypeScript for Bun, it offers ultra-fast performance, deep integration with Calibre's CLI tools, and automated content extraction.

🚀 Features

  • Blazing Fast Metadata Search: Queries the Calibre metadata.db directly via SQLite for near-instant results.
  • Full-text Content Search: Leverages Calibre's indexed full-text search engine to find specific phrases across your entire library.
  • Dynamic Content Extraction: Automatically converts EPUB, PDF, and other formats to text on-the-fly. No manual .txt exports required.
  • Comprehensive Library Management: Update database metadata, modify internal file metadata, polish books, and convert between formats.
  • Smart Result Distribution: Search results are intelligently balanced across different books to provide diverse matches.
  • Custom URL Scheme: Uses epub:// URLs for precise referencing of book locations and line ranges.

📋 Prerequisites

  • Calibre installed at /Applications/calibre.app (macOS).
  • Bun runtime installed.
  • A Calibre library.

⚙️ Configuration

The server uses the following environment variables:

  • CALIBRE_LIBRARY_PATH: Path to your Calibre library (where metadata.db resides). Defaults to /Volumes/Xarismata/eBooks/CalibreNuevo.

🛠 Installation

  1. Clone this repository:
git clone https://github.com/2b3pro/calibre-mcp.git
cd calibre-mcp
  1. Install dependencies:
bun install

⌨️ Usage

With MCP Inspector

Test the server in an interactive environment:

npx @modelcontextprotocol/inspector bun src/index.ts

With Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "calibre": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/calibre-mcp/src/index.ts"]
    }
  }
}

🧰 Available Tools

Tool Description
search_library Unified search (metadata + full-text). Supports author:, title:, etc.
read_content Extracts text from a book via epub:// URL. Handles dynamic conversion.
update_metadata Updates the Calibre database metadata for a book.
fetch_online_metadata Retrieves high-quality metadata from online sources (OPF format).
polish_book Enhances book files (punctuation, compression, CSS cleanup).
convert_ebook Converts books between formats (e.g., EPUB ↔ MOBI) and adds them to the library.
deep_search_book Searches for content inside a specific book (bypasses FTS index).
read_file_metadata Reads metadata embedded directly inside the ebook file.
write_file_metadata Writes metadata directly into the ebook file itself.

Tool Details & Examples

search_library

Search using natural language for content or specific fields for metadata.

  • Query Examples:
    • "machine learning" (Full-text search)
    • author:Asimov title:Foundation (Metadata search)
    • tag:science-fiction rating:>4 (Advanced filtering)

read_content

Uses the epub:// scheme.

  • Format: epub://[author]/[title]@[book_id]#[start_line]:[end_line]
  • Example: epub://Isaac%20Asimov/Foundation@123#500:600 retrieves lines 500 to 600.

polish_book

Perfect for cleaning up automated conversions or old files.

  • Options: smartenPunctuation, compressImages, upgradeBook, removeUnusedCss.

convert_ebook

Convert formats and automatically update your library record.

  • Example: book_id: 45, output_format: "azw3", options: ["--enable-heuristics"]

deep_search_book

Search directly inside a specific book (useful if Calibre FTS hasn't indexed it yet).

  • Example: book_id: 123, query: "quantum entanglement", context_lines: 3

⚖️ License

Apache License 2.0 - See LICENSE file for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured