Komga Ebook Library: Supercharged with AI via UBOS & MCP
Imagine being able to ask an AI assistant questions and have it instantly search and retrieve answers from your personal library of ebooks. This is no longer a dream with the Komga Ebook Library MCP (Model Context Protocol) Server, now available on the UBOS Asset Marketplace. This innovative tool bridges the gap between your digital library and the power of AI, turning your ebook collection into a dynamic, searchable knowledge base.
Built by sylweriusz and designed for seamless integration with AI assistants like Claude, the Komga Ebook Library MCP Server leverages the Model Context Protocol to grant AI access to your Komga digital library. Forget endless scrolling and manual searches. This server lets you leverage AI for intelligent book discovery, content reading, and full-text search across your entire ebook collection.
Why the Komga Ebook Library MCP Server is a Game Changer
In today’s information-saturated world, quick and reliable access to information is paramount. The Komga Ebook Library MCP Server transforms the way you interact with your digital library, offering:
- Enhanced Research Capabilities: Instantly locate relevant information for research, fact-checking, and academic citation.
- Improved Learning Experience: Find specific examples, definitions, or concepts within your learning materials.
- Efficient Information Retrieval: Eliminate time wasted on manual searches and quickly access the knowledge you need.
This MCP Server isn’t just about searching; it’s about unlocking the full potential of your ebook library by making it accessible to AI.
Key Features: A Deep Dive
The Komga Ebook Library MCP Server boasts a range of features designed for optimal performance and usability:
- Smart Format Detection: The server automatically identifies whether a book is in EPUB or PDF format and applies the appropriate processing methods. This ensures accurate content extraction and search functionality regardless of the file type.
- Full-Text Search with FlexSearch: Integrated FlexSearch provides lightning-fast, full-text search capabilities within your ebooks. Find specific keywords, phrases, or concepts instantly.
- Claude Vision OCR for Image-Based PDFs: For PDFs containing images or scanned text, the server utilizes Claude Vision OCR (Optical Character Recognition) to convert images into searchable text. This feature makes even non-text-based PDFs accessible to AI.
- Session Caching: The server caches search results to optimize performance for repeated access. This reduces latency and provides a smoother user experience.
- Conservative Fallbacks: The server is designed with graceful degradation in mind. If a particular processing method fails, it will fall back to a more conservative approach to ensure that the user experience remains positive.
Let’s break down how these features work in practice:
- The Query: You or an AI Agent, submits a search query through the UBOS platform.
- Format Detection: The MCP Server identifies the format of the ebook (EPUB or PDF).
- Content Extraction: The server extracts the text content from the ebook using the appropriate method (XHTML text extraction for EPUB, pdf-parse extraction for text-based PDFs, and Sharp compression + Claude Vision for image-based PDFs).
- Search Execution: FlexSearch indexes the extracted text, allowing for rapid full-text search. For image-based PDFs, Claude Vision provides guidance to specific pages containing the search term.
- Results Delivery: The server returns the search results to the UBOS platform, which then presents them to the user or AI Agent.
Format Support: A Comprehensive Matrix
| Format | Content Extraction | Search Capability | Performance |
|---|---|---|---|
| EPUB | XHTML text extraction | FlexSearch full-text search | <1s after indexing |
| PDF (Text) | pdf-parse extraction | FlexSearch full-text search | 2-5s initial, <1s cached |
| PDF (Image) | Sharp compression + Claude Vision | Guidance to specific pages | Real-time |
This table highlights the robust format support offered by the Komga Ebook Library MCP Server. While EPUBs are preferred for their clean text extraction, the server also provides excellent support for both text-based and image-based PDFs.
Unleashing the Power: Practical Use Cases
The Komga Ebook Library MCP Server unlocks a wide range of potential use cases:
- Academic Research: Researchers can use the server to quickly locate relevant scholarly articles and books within their digital libraries. Imagine asking your AI assistant to find all books in your library that discuss a specific research methodology or theoretical framework. The server can instantly retrieve the relevant passages, saving you hours of manual searching.
- Fact Verification: Verify claims and cross-reference information against authoritative sources within your ebook collection. Is a particular statistic accurate? Use the server to search for the original source and confirm the data.
- Language Learning: Find conversation examples and vocabulary in context within your language learning materials. Ask the server to find all instances of a particular idiom or grammatical structure.
- Technical Documentation: Navigate complex technical manuals efficiently. Quickly find the section of a manual that describes a particular feature or troubleshooting step.
- Legal Professionals: Instantly search legal documents, case files, and legal ebooks for relevant precedents, statutes, and regulations. Streamline legal research and case preparation.
- Medical Professionals: Quickly access medical textbooks, research papers, and clinical guidelines to find information on diagnosis, treatment, and patient care.
- Business Analysts: Analyze market research reports, industry analyses, and business ebooks to identify trends, opportunities, and competitive threats.
Getting Started: Installation and Configuration
Integrating the Komga Ebook Library MCP Server into your workflow is straightforward. Here’s a step-by-step guide:
Installation:
Via NPM (recommended): bash npx @sylweriusz/komga-book-search
Via Smithery (for Claude Desktop): bash npx @smithery/cli install @sylweriusz/komga-book-search --client claude
Configuration: Add the following configuration to your Claude Desktop:
{ “mcpServers”: { “komga-ebook-search”: { “command”: “npx”, “args”: [“@sylweriusz/komga-book-search”], “env”: { “KOMGA_URL”: “http://your-komga-server:25600”, “KOMGA_USERNAME”: “your-username”, “KOMGA_PASSWORD”: “your-password”, “KOMGA_LIBRARY”: “your-library-filter” } } } }
- KOMGA_URL: The URL of your Komga server.
- KOMGA_USERNAME: Your Komga username.
- KOMGA_PASSWORD: Your Komga password.
- KOMGA_LIBRARY: A filter to specify which Komga library to search (optional).
MCP Tools: A Toolkit for AI Interaction
The Komga Ebook Library MCP Server provides a set of powerful tools for interacting with your ebook library through AI:
search_library_books(query, library_filter?): Discover books across library collections with format detection. This tool allows you to search for books based on keywords and optionally filter the search by library.typescript // Find academic books on specific topics { “query”: “artificial intelligence”, “library_filter”: “academic” // optional }
get_book_overview(book_id): Retrieve complete book metadata including page count and format information. This tool provides detailed information about a specific book, including its ID, title, author, and format.typescript { “book_id”: “0K79C4PQAEH7J” }
read_book_pages(book_id, start_page, end_page): Access book content with intelligent format routing (max 15 pages). This tool allows you to read specific pages of a book, with the server automatically handling the format conversion and content extraction.- EPUBs: Returns clean text with chapter delimiters.
- PDFs: Returns compressed images optimized for Claude Vision OCR.
search_within_book(book_id, search_term): Full-text search within individual books. This tool allows you to search for specific keywords or phrases within a single book.- EPUBs & Text PDFs: FlexSearch with context and highlights
- Image PDFs: Guidance to use
read_book_pageswith Claude Vision
Architecture: Lean and Mean
The Komga Ebook Library MCP Server is built with Lean Architectural Methodology (LAM), emphasizing simplicity, maintainability, and scalability:
- Vertical Feature Slicing: Each MCP tool is implemented as a self-contained feature, making it easy to add, modify, or remove functionality.
- Dependency Injection: Constructor-based dependency injection promotes loose coupling and testability.
- Strict Type Safety: Comprehensive TypeScript coverage ensures code quality and reduces the risk of runtime errors.
- Single Responsibility: Each file is responsible for a single, well-defined purpose, making the codebase easier to understand and maintain.
- No Circular Dependencies: A clear dependency direction prevents circular dependencies and promotes modularity.
Requirements: What You Need to Get Started
- Node.js: 18.0.0 or higher
- Komga Server: Running instance with API access
- TypeScript: Included in dependencies
UBOS: Your Full-Stack AI Agent Development Platform
The Komga Ebook Library MCP Server is a valuable addition to the UBOS Asset Marketplace, providing a critical link between your digital library and the world of AI. UBOS is a full-stack AI Agent development platform focused on bringing AI Agents to every business department. Our platform empowers you to:
- Orchestrate AI Agents: Seamlessly manage and deploy AI Agents across your organization.
- Connect AI Agents with Enterprise Data: Provide AI Agents with access to your valuable enterprise data, enabling them to make informed decisions.
- Build Custom AI Agents with Your LLM Model: Create custom AI Agents tailored to your specific business needs.
- Develop Multi-Agent Systems: Build complex AI systems that leverage the power of multiple interacting agents.
By combining the power of the Komga Ebook Library MCP Server with the capabilities of the UBOS platform, you can unlock new possibilities for AI-powered research, learning, and information retrieval.
Get Started Today!
Transform your ebook library into an AI-powered knowledge base with the Komga Ebook Library MCP Server, now available on the UBOS Asset Marketplace. Start leveraging the power of AI to unlock the full potential of your digital library.
Troubleshooting
- Connection Issues
- Verify Komga server is accessible
- Check authentication credentials
- Ensure user has PAGE_STREAMING role
- Search Problems
- Confirm
KOMGA_LIBRARYfilter matches existing libraries - Check book format support (EPUB preferred for text search)
- Confirm
- Performance Issues
- EPUBs index on first access (2-4 seconds)
- Subsequent searches use cached indexes (<1 second)
- Large PDFs may require patience for initial processing
Komga Ebook Library Search
Project Details
- sylweriusz/komga-ebook-search
- MIT License
- Last Updated: 5/28/2025
Recomended MCP Servers
A lightweight MCP server for generating placeholder images from multiple providers.
Kollektiv MCP enables you to chat with and query your own documents directly from IDEs and MCP clients....
Allows AI assistants such as Cursor/Cline/GitHub Copilot to use Google's lighthouse tool to measure perf metrics for your...
MCP Contract Analyst
Model Context Protocol (MCP) implementation for iOS simulators
A integração entre o Model Context Protocol (MCP) e a computação quântica representa uma fronteira inovadora na interseção...
MCP server for interacting with esa API
A lightweight FastAPI server that can run as a Windows service and exposes an endpoint to execute shell...
Examples of using E2B





