opds-mcp
An MCP server that lets an LLM browse, search, and download books from OPDS catalogs (e.g., Project Gutenberg, Standard Ebooks) using tools for feed navigation, full-text search, and acquisition link downloads.
README
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.
Install
npm install
npm run build
Configure 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。