opds-mcp
Allows browsing, searching, and downloading books from Calibre-Web OPDS catalogs.
Enables full-text search across OPDS catalogs using OpenSearch descriptions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opds-mcpsearch Project Gutenberg for 'Alice in Wonderland'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
opds-mcp
An MCP server that lets an LLM browse, search and download books from OPDS catalogs (Open Publication Distribution System) — the Atom/JSON-based feed format used by digital libraries such as Project Gutenberg, Standard Ebooks, Feedbooks, and many self-hosted book servers (Calibre-Web, COPS, KOReader sync targets, etc).
Supports both OPDS 1.x (Atom + XML) and OPDS 2.0 (JSON) catalogs, OpenSearch-based full-text search, and downloading acquisition links to disk.
Tools
opds_browse— fetch a catalog/feed document and return its navigation links (search, next/prev, subsections, facets) plus entries (title, authors, summary, categories, acquisition links, cover images).opds_search— search a catalog. Give it either the catalog's feed URL (itsrel="search"link is discovered automatically) or an OpenSearch description URL directly, plus a free-text query.opds_get_entry— fetch a single entry/publication document (e.g. an entry'srel="alternate"link) for full details.opds_download— download the file behind an acquisition link to a local directory and return the saved file path.
All tools accept optional username/password for catalogs that require HTTP Basic Auth. The
url argument of opds_browse/opds_search/opds_get_entry is optional if the server is
configured with a default catalog via OPDS_BASE_URL (see below) — pass url explicitly to
browse a different catalog for that one call.
Related MCP server: access-calibre
Install
npm install
npm run buildConfigure in an MCP client
Via npx (no local checkout required)
The package hasn't been published to the npm registry, but npx can install and run it straight
from this GitHub repo — it clones the repo, runs npm install (which triggers the prepare
script to build dist/), then executes the opds-mcp bin:
{
"mcpServers": {
"opds": {
"command": "npx",
"args": ["-y", "github:pastukhov/opds-mcp"],
"env": {
"OPDS_BASE_URL": "https://example.com/opds/root.xml",
"OPDS_USERNAME": "optional-default-username",
"OPDS_PASSWORD": "optional-default-password",
"OPDS_DOWNLOAD_DIR": "/absolute/path/to/save/books"
}
}
}
}To pin a specific branch or commit, append it: "github:pastukhov/opds-mcp#branch-or-sha".
Via a local checkout
Example for Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"opds": {
"command": "npx",
"args": ["-y", "/absolute/path/to/opds-mcp"],
"env": {
"OPDS_BASE_URL": "https://example.com/opds/root.xml",
"OPDS_USERNAME": "optional-default-username",
"OPDS_PASSWORD": "optional-default-password",
"OPDS_DOWNLOAD_DIR": "/absolute/path/to/save/books"
}
}
}
}npx -y /absolute/path installs dependencies and builds on first run, same as the GitHub form
above. Alternatively, run npm install && npm run build yourself and point command/args
directly at node and dist/index.js.
OPDS_BASE_URL— the catalogopds_browse/opds_search/opds_get_entryuse when a tool call doesn't pass its ownurl. This is the recommended way to point the server at a specific library (e.g.https://your-library.example/opds) without relying on the model to know or guess the address; omit it to require an expliciturlon every call instead.OPDS_USERNAME/OPDS_PASSWORD— used as a fallback whenever a tool call doesn't pass its own credentials, which is convenient when the server is dedicated to a single authenticated catalog.OPDS_DOWNLOAD_DIR— whereopds_downloadsaves files; defaults to a directory under the OS temp folder.
Example flow
opds_browsewith the catalog's root URL to see navigation links and/or a first page of entries.opds_searchwith that same root URL and a query to find a specific book.Pick an entry's
acquisitions[].hreffrom the result and pass it toopds_downloadto save the file locally (or useopds_get_entryfirst if you need more detail than the search result already includes).
Development
npm run dev # run the server directly with tsx
npm run typecheck # tsc --noEmit
npm test # vitest, using fixture OPDS documents under fixtures/
npm run test:coverage # vitest with a coverage report under coverage/
npm run build # compile to dist/Every pull request runs typecheck, build and test:coverage via
.github/workflows/ci.yml. On every push to main,
.github/workflows/coverage-badge.yml recomputes coverage
and commits .github/badges/coverage.json, which the badge at the top of this file reads via
shields.io's endpoint badge.
Notes
Only
http:/https:URLs are accepted; other schemes are rejected before any request is made.Downloaded files are capped at 200MB by default and written under a sanitized filename inside the configured download directory.
Because feed documents can be arbitrarily large,
opds_browse/opds_searchreturn whatever a single page contains; use thenavigation.nextlink from the response to page through the rest of the catalog.
Available Tools
4 toolsopds_browseBrowse an OPDS catalogB
Fetches an OPDS catalog document (feed, navigation, or acquisition list; OPDS 1.x Atom/XML or OPDS 2.0 JSON) and returns its navigation links (search, next/prev, subsections) and entries (books/publications) with their acquisition (download) and cover image links.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Absolute URL of the OPDS catalog/feed document to fetch. Optional if the server was started with a default catalog URL (OPDS_BASE_URL); required otherwise. | |
| password | No | HTTP Basic Auth password, if the catalog requires authentication | |
| username | No | HTTP Basic Auth username, if the catalog requires authentication |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description is the sole source of behavioral info. It explains the output structure (navigation links, entries with links) and the input format (URL, auth). However, it does not disclose error behavior, pagination, rate limits, or side effects. The description adds marginal value beyond what the input schema already conveys.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the core functionality and output. However, it is somewhat long and could be split for readability. It is not overly verbose, so it earns a 4.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of the tool (no output schema, no annotations, moderate parameter count), the description covers the return values but lacks details on error handling, pagination limits, or authentication failure scenarios. It is sufficient for basic understanding but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the description does not need to add parameter details. However, it adds no additional context beyond the schema (e.g., clarifying when url is required). The baseline of 3 is appropriate since the schema already explains all three parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches an OPDS catalog document and returns navigation links and entries. It specifies the document types and formats, aligning well with the title. However, it does not explicitly differentiate from sibling tools like opds_search or opds_download, though the purpose is distinct enough given the context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites, authentication requirements beyond the schema, or scenarios where it should not be used. This lack of usage direction is a significant gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
opds_downloadDownload a publication from an OPDS acquisition linkA
Downloads the file behind an OPDS acquisition link (as returned in the acquisitions array of opds_browse/opds_search/opds_get_entry) to a local directory and returns the saved file path. Defaults to a directory under the OS temp folder (/tmp/opds-mcp-downloads); configure OPDS_DOWNLOAD_DIR to persist elsewhere.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL of the acquisition (download) link | |
| password | No | HTTP Basic Auth password, if the catalog requires authentication | |
| username | No | HTTP Basic Auth username, if the catalog requires authentication | |
| suggestedName | No | Preferred base file name (without extension), e.g. the book title |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Describes download destination (temp dir or configurable) and return value. Lacks details on failure behavior, overwrite policy, or file extension handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with main action, no redundancy. Efficiently conveys purpose and configuration option.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description clearly states return value (saved file path) and destination. Low-complexity tool is fully specified for agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all 4 parameters. Description adds context about URL origin but no parameter-specific guidance beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it downloads a file from an OPDS acquisition link to a local directory and returns the path. It distinguishes from siblings (opds_browse, opds_search, opds_get_entry) which handle metadata discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly specifies when to use: after obtaining an acquisition link from opds_browse/opds_search/opds_get_entry. Does not include exclusions or alternatives, but siblings naturally cover different operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
opds_get_entryGet a single OPDS entry/publicationA
Fetches a single OPDS entry document (a per-publication Atom entry or OPDS 2.0 publication), typically the URL found in an entry's rel="alternate" link, and returns its full details including acquisition links.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Absolute URL of the entry/publication document to fetch. Optional if the server was started with a default catalog URL (OPDS_BASE_URL); required otherwise. | |
| password | No | HTTP Basic Auth password, if the catalog requires authentication | |
| username | No | HTTP Basic Auth username, if the catalog requires authentication |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description shoulders the transparency burden. It explains what the tool does (fetches and returns details) but omits failure modes, auth error behavior, or read-only nature beyond what's implied.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, well-structured sentence that front-loads the action ('Fetches') and efficiently conveys key details without wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (3 parameters, no output schema), the description adequately covers what is fetched and the typical source of the URL. It could mention error handling but is largely complete for a straightforward fetch.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds no extra parameter meaning beyond what the schema already provides—it essentially repeats the schema's parameter comments.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it fetches a single OPDS entry document with full details and acquisition links, distinctly separating it from siblings like opds_browse, opds_download, and opds_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the typical use case ('URL found in an entry's rel="alternate" link') but does not explicitly compare with siblings or provide when-not-to-use guidance. Still, context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
opds_searchSearch an OPDS catalogA
Searches an OPDS catalog. Pass either the catalog's root/feed URL (its OpenSearch description will be discovered via the feed's rel="search" link) or an OpenSearchDescription document URL directly, plus a free-text query. Returns matching entries the same way opds_browse does.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL of the OPDS feed (containing a rel="search" link) or of an OpenSearchDescription document. Optional if the server was started with a default catalog URL (OPDS_BASE_URL); required otherwise. | |
| query | Yes | Free-text search query, e.g. a book title or author name | |
| password | No | HTTP Basic Auth password, if the catalog requires authentication | |
| username | No | HTTP Basic Auth username, if the catalog requires authentication |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Discloses that it discovers OpenSearch description and returns matching entries, similar to opds_browse. Does not mention safety, but for a search tool, read-only inference is reasonable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action, no unnecessary words. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, but description references return format via 'same way opds_browse does', which helps if that tool is known. Could mention pagination or error handling, but overall adequate for a search tool with 4 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds meaning by explaining the URL parameter's two possible forms (feed root or OpenSearch document) and that query is free-text. Auth parameters are repeated without additional context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches an OPDS catalog, specifies the resource and action, and distinguishes it from siblings by mention of 'same way opds_browse does'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides context on when to use (searching an OPDS catalog) and how to specify the URL (root feed or OpenSearch document). Implicitly excludes browsing (sibling opds_browse) but lacks explicit when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
opds_browse - First observed
opds_download - First observed
opds_get_entry - First observed
opds_search
TDQS
Scored across 4 tools
Each tool has a distinct purpose: opds_browse for navigation, opds_search for queries, opds_get_entry for detailed entry info, and opds_download for file retrieval. There is no overlap or ambiguity.
All tool names follow a consistent opds_verb_noun pattern (opds_browse, opds_download, opds_get_entry, opds_search), making the set predictable and easy to understand.
With exactly 4 tools, the server covers the essential operations for an OPDS client (browse, search, get entry, download) without being excessive or insufficient.
The tool set provides complete coverage for interacting with an OPDS catalog: navigating feeds, searching, retrieving detailed entry information, and downloading files. No obvious gaps for client-side operations.
Maintenance
Related MCP Connectors
MCP server for Project Gutenberg — 75,000+ public-domain ebooks with full plain-text retrieval.
Read-only MCP server exposing a user ORANO library to their own AI agent.
MCP server for Russian books search, details, and recommendation candidates.
Related MCP Servers
- FlicenseAqualityCmaintenanceAn MCP server that exposes a fully offline RAG library of books (PDFs, EPUBs, markdown, text) to Claude, enabling hybrid search and retrieval of contextualized chunks via read-only tools.5-
- AlicenseNot gradedqualityDmaintenanceMCP server enabling LLMs to query a local Calibre Content Server for ebook metadata, chapters, and content in HTML or Markdown.17 npmMIT
- AlicenseBqualityDmaintenanceA local MCP server that lets LLM agents read EPUB books and PDF documents with outline-first navigation, precise node reads, and local SQLite persistence.292MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that gives AI agents access to the world's public domain library. Search, read, and navigate books and audiobooks from Project Gutenberg and LibriVox.-