TC

trieloff/calibre-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

59 stars 4 forks 품질 64 트렌드 13Apache-2.0

MCP 서버 검색 및 캘리브 ebook 라이브러리에서 책 읽기

개요

Calibre ebook 라이브러리의 검색 및 판독을 위한 Model Context Protocol (MCP) 서버. - 자동 구문 매칭 및 fuzzy fallback - 또는 부분 매칭 - 키워드 강조 및 pagination과 책에서 - Calibredb CLI를 사용하여 순수한 bash 구현 - Calibre 깊은 링크 (calibre://) 및 파일 URL (file://) - macOS 호환성에 대한 견고한 타임 아웃 처리 - Calibre는 /Applications/calibre.app에 설치 - ~/Calibre Library의 Calibre 라이브러리 - 텍스트 (.txt) 발췌 기능에 대한 도서의 내보내기 - Bash 4.0 이상 MCP Inspector를 사용하여 서버를 테스트 : Claude 데스크탑 구성에 추가: Calibre의 전체 텍스트 검색 엔진을 사용하여 책 검색. - 쿼리 (필수): 검색 쿼리. Multi-word 쿼리는 자동 구문 연구 - 제한 (선택 사항) : 최대 결과 (기본값 : 50) - fuzzy fallback (선택 사항) : 정확한 검색이 실패한 경우 관련 용어로 Fallback 쿼리 부분 일치로 저자 이름에 의해 검색 책.

개요(AI 번역)

Calibre ebook 라이브러리의 검색 및 판독을 위한 Model Context Protocol (MCP) 서버.

특징

-Full-text search 자동 구문 일치 및 fuzzy fallback

  • ** 저자 검색 ** 또는 ** 제목** 부분 일치
  • **Extract text excerpts ** 키워드 강조 및 질서가있는 책에서
  • calibredb] CLI를 이용한 순수한 배쉬 구현
  • 캘리브 딥 링크 반환 (calibre://) 및 파일 URL (file://)
  • macOS 호환성을 위한 Robust timeout 취급

필수품

  • /Applications/calibre.app에 설치된 Calibre
  • ~/Calibre Library의 Calibre 라이브러리
  • 텍스트 (.txt) 발췌 기능에 대한 책의 수출
  • Bash 4.0 이상

설치

  1. Clone 이 저장소:

  2. 스크립트 실행 가능:

사용법

MCP 검사기를 가진 ###

MCP Inspector를 사용하여 서버를 테스트 :

Claude 데스크탑

Claude 데스크탑 구성에 추가:

사용 가능한 도구

검색 전체 텍스트

Calibre의 전체 텍스트 검색 엔진을 사용하여 책 검색.

** 모수: **

  • query (필수): 쿼리 검색. Multi-word 쿼리는 자동으로 구문 연구
  • limit (선택): 최대 결과 (과태: 50)

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

calibre-mcp

A Model Context Protocol (MCP) server for searching and reading books from your Calibre ebook library.

Features

  • Full-text search with automatic phrase matching and fuzzy fallback
  • Search by author or title with partial matching
  • Extract text excerpts from books with keyword highlighting and pagination
  • Pure bash implementation using calibredb CLI
  • Returns Calibre deep links (calibre://) and file URLs (file://)
  • Robust timeout handling for macOS compatibility

Prerequisites

  • Calibre installed at /Applications/calibre.app
  • A Calibre library at ~/Calibre Library
  • Text (.txt) exports of your books for excerpt functionality
  • Bash 4.0 or later

Installation

  1. Clone this repository:
git clone https://github.com/trieloff/calibre-mcp.git
cd calibre-mcp
  1. Make the script executable:
chmod +x calibre-mcp.sh

Usage

With MCP Inspector

Test the server using the MCP Inspector:

npx @modelcontextprotocol/inspector /path/to/calibre-mcp.sh

With Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "calibre": {
      "command": "/path/to/calibre-mcp.sh"
    }
  }
}

Available Tools

search-fulltext

Search books using Calibre’s full-text search engine.

Parameters:

  • query (required): Search query. Multi-word queries are automatically phrase-searched
  • limit (optional): Maximum results (default: 50)
  • fuzzy_fallback (optional): Fallback query with related terms if exact search fails

Example:

{
  "query": "machine learning",
  "fuzzy_fallback": "AI artificial intelligence ML neural networks deep learning"
}

search-author

Search books by author name with partial matching.

Parameters:

  • author (required): Author name (partial match supported)
  • limit (optional): Maximum results (default: 50)

search-title

Search books by title with partial matching.

Parameters:

  • title (required): Book title (partial match supported)
  • limit (optional): Maximum results (default: 50)

get-excerpt

Extract text excerpts from books with keyword context.

Parameters:

  • book_id (required): Calibre book ID
  • keyword (optional): Search term to find in the book
  • context_lines (optional): Lines of context around matches (default: 10)
  • max_results (optional): Results per page (default: 10)
  • page (optional): Page number for pagination (default: 1)

Response Format

Search results include:

  • Book metadata (title, authors, series, tags, publisher)
  • Calibre deep link for opening in Calibre
  • File URL for direct EPUB access
  • Available formats
  • Whether text format is available for excerpts

Logging

The server logs all requests and responses to requests.log for debugging.

Limitations

  • Requires Calibre to be closed or may experience timeouts
  • Full-text search requires indexed books
GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector /path/to/calibre-mcp.sh
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "calibre": { "command": "/path/to/calibre-mcp.sh" } } }