download-books-mcp
Enables agents to search and download books from LibGen and Z-Library via MCP tools, abstracting provider details behind neutral labels.
README
download-books-mcp
Local MCP server and Codex skill for agent-driven book search and download through LibGen and Z-Library / Zeta Library.
This repo wraps two existing Python clients:
- onurhanak/libgen-api-enhanced for LibGen / Library Genesis search and download metadata.
- sertraline/zlibrary for Z-Library / Zeta Library search and authenticated downloads.
The purpose is to make those sources usable from MCP clients such as Codex, Claude Code, and other agents while keeping provider-specific details out of the agent-facing tool contract. The README is explicit for humans and GitHub search; the MCP tools and skill use neutral provider labels and clean IDs.
The MCP surface is intentionally small:
search_books(...)returns clean candidates with a temporaryid.download_book(id=...)downloads the selected candidate into a local library folder.
Internally, the server can query LibGen, Z-Library / Zeta Library, or both. Externally, provider internals stay behind neutral labels (provider_1, provider_2, all) so agents can use the MCP tools without handling provider-specific links, hashes, mirrors, URLs, or identifiers.
Use only sources, credentials, and documents you are authorized to access.
Install
git clone https://github.com/mateogon/download-books-mcp.git
cd download-books-mcp
uv sync
Copy the environment example and fill local values:
cp .env.example .env
Important settings:
DOWNLOAD_BOOKS_PROVIDER=all
DOWNLOAD_BOOKS_LIBRARY_DIR=~/Downloads/books
BOOK_PROVIDER_2_EMAIL=
BOOK_PROVIDER_2_PASSWORD=
Agent Installation
There are two pieces:
- MCP server: the runtime tools agents call.
- Skill: the workflow that tells Codex how to use those tools cleanly.
Add the MCP server to Codex by copying examples/codex-config.toml into ~/.codex/config.toml and replacing /absolute/path/to/download-books-mcp with your clone path.
Install the Codex skill:
./scripts/install-codex-skill.sh
Restart Codex after changing MCP config or installing the skill.
For Hermes, use examples/hermes-mcp.yaml.
MCP Tools
search_books
Parameters:
query: str
limit: int = 10
preferred_language: str = "English"
provider_name: str = "default" # default | all | provider_1 | provider_2
search_type: str = "default" # default | title | author
topic: str = "books"
preferred_author: str | None = None
Clean results include:
id, title, author, year, language, extension, size, publisher, pages, score
Raw provider internals are cached locally for download_book, but they are not returned in normal MCP results.
download_book
Parameters:
id: str | int
library_dir: str | None = None
If library_dir is omitted, the server uses DOWNLOAD_BOOKS_LIBRARY_DIR.
Default output layout:
<library_dir>/Sources/<Author - Title>/00 - Fuentes/<Title>.<extension>
CLI
Search clean candidates:
uv run download-books search "The Embodied Mind" --search-type title --limit 10
Download a selected result:
uv run download-books download <ID>
Local diagnostic output:
uv run download-books search "The Embodied Mind" --raw --json
Provider Routing
Visible provider options are:
defaultusesDOWNLOAD_BOOKS_PROVIDER, defaulting toallallsearches every available configured providerprovider_1searches only the LibGen adapterprovider_2searches only the Z-Library / Zeta Library adapter
Agents should normally leave provider routing at default.
The MCP and skill intentionally keep the neutral names. Humans reading this repo should understand the mapping; agents using the tool should not need to.
Development
uv run --extra dev pytest
uv run python -m compileall src
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。