download-books-mcp
Click on "Install 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., "@download-books-mcpsearch for 'Dune' by Frank Herbert"
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.
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 syncCopy the environment example and fill local values:
cp .env.example .envImportant settings:
DOWNLOAD_BOOKS_PROVIDER=all
DOWNLOAD_BOOKS_LIBRARY_DIR=~/Downloads/books
BOOK_PROVIDER_2_EMAIL=
BOOK_PROVIDER_2_PASSWORD=Related MCP server: librarian
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.shRestart 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 = NoneClean results include:
id, title, author, year, language, extension, size, publisher, pages, scoreRaw 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 = NoneIf 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 10Download a selected result:
uv run download-books download <ID>Local diagnostic output:
uv run download-books search "The Embodied Mind" --raw --jsonProvider 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 srcAvailable Tools
2 toolsdownload_bookA
Download a book selected by its id from a previous search_books result.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| library_dir_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only says 'Download', which implies a side-effect operation, but does not disclose where the book is saved, whether library_dir_path is required for that, what happens on failure, or any other behavioral details. This is a significant transparency gap for an action that likely writes files.
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, direct sentence that front-loads the verb and object and contains no filler. Every word earns its place by clarifying the source of the id.
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?
For a two-parameter tool, the essential workflow is conveyed: use an id from search_books. However, the optional library_dir_path parameter is left unexplained, and with no annotations there is no guidance on side effects or postconditions. The presence of an output schema reduces the need to document return values, but the behavioral gap keeps this from being 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?
The description adds meaning to 'id' by stating it comes from a search_books result, which helps an agent understand its origin and type. However, library_dir_path is entirely undocumented—neither the schema nor the description explains what it controls (presumably the save directory). With 0% schema description coverage, the description needed to compensate and only partially did.
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 states a specific verb ('Download'), a resource ('a book selected by its id'), and the source of that id ('from a previous search_books result'). This clearly distinguishes download_book from its sibling search_books: one searches, the other downloads.
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 phrase 'from a previous search_books result' explicitly positions this tool as the follow-up step after a search, giving clear context for when to use it. It does not provide explicit exclusions, but the intended sequence is evident enough to guide an agent correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_booksA
Search book metadata through configured providers. Returns clean results with an id for download_book.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| topic | No | books | |
| search_type | No | default | |
| provider_name | No | default | |
| preferred_author | No | ||
| preferred_language | No | English |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of disclosing behavior. It discloses that results are 'clean' and include an id for download, but it does not mention provider behavior, limits, error handling, or filtering semantics. This is adequate but minimal.
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 core action, with no wasted words. Each sentence adds value: the first states what the tool does, the second states the output's purpose.
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?
With seven parameters, no annotations, and no schema descriptions, the description leaves too much unstated. The existence of an output schema reduces the need to document return shape, but the lack of parameter semantics and behavioral caveats makes the overall definition incomplete for an agent to invoke confidently.
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 0%, and the description provides no explanation for any of the seven parameters. While parameter names like 'query' and 'limit' are somewhat self-explanatory, 'search_type', 'provider_name', 'preferred_author', and 'preferred_language' lack any semantic guidance. The description does not compensate for the missing schema descriptions.
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 uses a specific verb ('Search') and resource ('book metadata'), and clearly states the output's purpose ('id for download_book'), which distinguishes it from the sibling tool. It is immediately clear what the tool 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?
The description implies a clear usage context: search for book metadata to obtain an id, then use that id with download_book. It does not give explicit exclusions or alternative conditions, but the workflow context is evident.
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. Dates show when Glama detected each change.
2 tool updates
v0.1.0- First observed
download_book - First observed
search_books
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one searches for books and returns metadata with IDs, the other downloads a specific book by ID. There is no overlap or ambiguity between them.
Both tools follow a consistent verb_noun pattern: search_books and download_book. The slight singular/plural difference is natural and does not create inconsistency.
With only 2 tools, the server is on the thin side, but given its narrow purpose of searching and downloading books, this count is appropriate and each tool clearly earns its place.
The server covers the essential workflow for its domain: discover books via search, then download via ID. This forms a complete user journey with no dead ends or obvious missing operations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Search GitHub, npm, PyPI, StackOverflow, ArXiv from one MCP — built for coding agents.
Free search across ~35,000 agent tools (x402 bazaar + MCP registry) by plain-language need.
Scrape, crawl and search the web for AI agents via MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn 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.41AGPL 3.0
- AlicenseAqualityAmaintenanceEnables browsing, searching, and quote verification of a local ebook library via MCP, providing deterministic RAG with no embeddings or network.62MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching for lawful, free-to-read books across multiple open catalogues and resolving access routes (download, read, borrow, preview) via MCP tools like search_books and resolve_access.MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets AI agents search and download books from z-library using the user's own account credentials.4341MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mateogon/download-books-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server