calibre-mcp
calibre-mcp 
一个用于搜索、阅读和管理 Calibre 电子书库的模型上下文协议 (MCP) 服务器。使用 TypeScript 为 Bun 完全重写,提供超高性能、与 Calibre 命令行工具的深度集成以及自动化内容提取功能。
🚀 功能特性
极速元数据搜索:通过 SQLite 直接查询 Calibre 的
metadata.db,实现近乎即时的搜索结果。全文内容搜索:利用 Calibre 的索引全文搜索引擎,在整个书库中查找特定短语。
动态内容提取:自动将 EPUB、PDF 等格式即时转换为文本。无需手动导出 .txt 文件。
全面的库管理:更新数据库元数据、修改内部文件元数据、润色书籍以及在不同格式间进行转换。
智能结果分发:搜索结果在不同书籍间进行智能平衡,以提供多样化的匹配项。
自定义 URL 方案:使用
epub://URL 精确引用书籍位置和行范围。
Related MCP server: Calibre RAG MCP Server
📋 前置要求
⚙️ 配置
服务器使用以下环境变量:
CALIBRE_LIBRARY_PATH:Calibre 书库的路径(metadata.db所在位置)。默认为/Volumes/Xarismata/eBooks/CalibreNuevo。
🛠 安装
克隆此仓库:
git clone https://github.com/2b3pro/calibre-mcp.git
cd calibre-mcp安装依赖:
bun install⌨️ 使用方法
使用 MCP Inspector
在交互式环境中测试服务器:
npx @modelcontextprotocol/inspector bun src/index.ts使用 Claude Desktop
将以下内容添加到你的 claude_desktop_config.json 中:
{
"mcpServers": {
"calibre": {
"command": "bun",
"args": ["run", "/absolute/path/to/calibre-mcp/src/index.ts"]
}
}
}🧰 可用工具
工具 | 描述 |
| 统一搜索(元数据 + 全文)。支持 |
| 通过 |
| 更新书籍的 Calibre 数据库元数据。 |
| 从在线来源获取高质量元数据(OPF 格式)。 |
| 增强书籍文件(标点符号、压缩、CSS 清理)。 |
| 在不同格式间转换书籍(例如 EPUB ↔ MOBI)并将其添加到库中。 |
| 在特定书籍内搜索内容(绕过 FTS 索引)。 |
| 读取直接嵌入在电子书文件内的元数据。 |
| 将元数据直接写入电子书文件本身。 |
工具详情与示例
search_library
使用自然语言搜索内容,或使用特定字段搜索元数据。
查询示例:
"machine learning"(全文搜索)author:Asimov title:Foundation(元数据搜索)tag:science-fiction rating:>4(高级过滤)
read_content
使用 epub:// 方案。
格式:
epub://[作者]/[书名]@[书籍ID]#[起始行]:[结束行]示例:
epub://Isaac%20Asimov/Foundation@123#500:600获取第 500 到 600 行。
polish_book
非常适合清理自动转换后的文件或旧文件。
选项:
smartenPunctuation(智能标点)、compressImages(压缩图片)、upgradeBook(升级书籍)、removeUnusedCss(移除未使用的 CSS)。
convert_ebook
转换格式并自动更新你的库记录。
示例:
book_id: 45, output_format: "azw3", options: ["--enable-heuristics"]
deep_search_book
直接在特定书籍内搜索(如果 Calibre FTS 尚未索引该书,此功能很有用)。
示例:
book_id: 123, query: "quantum entanglement", context_lines: 3
⚖️ 许可证
Apache License 2.0 - 详情请参阅 LICENSE 文件。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables read-only access to local Calibre libraries for searching metadata, inspecting book formats, and extracting content samples. Supports full-text search, batch operations, and detailed book analysis through natural language queries.3MIT
- FlicenseBqualityDmaintenanceEnables semantic search and contextual conversations with your Calibre ebook library using vector-based RAG technology. Supports project-based organization, multi-format book processing, and OCR capabilities for enhanced content extraction and retrieval.72
- Alicense-qualityCmaintenanceProvides AI agents with research capabilities for local Calibre e-book libraries, including fulltext search across titles, ISBNs, and comments, plus structured excerpt retrieval from books.2GPL 3.0
- AlicenseBqualityCmaintenanceConnects AI agents to Calibre ebook libraries for searching, reading, and managing digital collections. It supports metadata updates, format conversion, and full-text content searches while providing granular permission controls for library access.721MIT
Related MCP Connectors
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/2b3pro/calibre-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server