Book Downloader MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LIBGEN_MIRROR | No | Pin a LibGen+ mirror (e.g. `https://libgen.li/`) instead of discovering one. | |
| LIBGEN_CONFIG_URL | No | Remote JSON listing the current mirrors. Defaults to the upstream `config.v3.json`. | upstream config.v3.json |
| LIBGEN_TIMEOUT_MS | No | Per-request timeout. | 30000 |
| LIBGEN_USER_AGENT | No | Override the browser user agent. Defaults to a Chrome UA. | Chrome UA |
| LIBGEN_VERIFY_MD5 | No | Verify downloads against the LibGen md5. | true |
| LIBGEN_CONCURRENCY | No | Parallel downloads for bulk calls (clamped to 1–5). | 2 |
| LIBGEN_MAX_RETRIES | No | Retries for 429/5xx/network failures, with exponential backoff. | 2 |
| LIBGEN_DOWNLOAD_DIR | No | Where downloads are saved. `~` is expanded. Defaults to the process working directory. | process cwd |
| LIBGEN_CONFIG_TTL_MS | No | How long to cache the mirror list. | 3600000 |
| LIBGEN_MAX_DOWNLOAD_MB | No | Per-file size cap. | 512 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
LibGen MCP searches Library Genesis and downloads files to the machine running the server.
Workflow:
libgen_search with a title, author or ISBN.
libgen_download with the md5 of a result (or libgen_get_download_url to inspect the link first).
Use libgen_bulk_download for several files.
Notes:
Downloads land in LIBGEN_DOWNLOAD_DIR (default: the server's working directory). Pass downloadDir to override per call.
Files are verified against their LibGen md5; check the md5Verified field.
Mirrors rotate often. If a call fails, run libgen_status, then libgen_set_mirror with a working URL.
Only download material you are legally allowed to access.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| libgen_searchA | Search Library Genesis (LibGen+) for books and papers. Returns title, authors, year, language, size, extension, md5 and the detail page URL. Mirrors are discovered automatically and rotated on failure. |
| libgen_get_download_urlA | Resolve the direct download URL for an md5 without downloading. Useful for handing the link to another tool or a browser. |
| libgen_downloadA | Download one file by md5. Streams to disk with a size cap, verifies the file against its LibGen md5, and never overwrites an existing file unless overwrite=true. Returns the saved path, byte count and verification result. |
| libgen_bulk_downloadA | Download a list of md5s with bounded concurrency. Failures are reported per item; one bad md5 does not abort the batch. |
| libgen_list_mirrorsA | Show the configured LibGen+ mirrors, which one is active, and the configuration version. |
| libgen_set_mirrorA | Pin a specific LibGen+ mirror for this session. The mirror is probed first, so an unreachable URL is rejected immediately. |
| libgen_statusA | Probe every configured mirror with a real search request and report latency and errors. Use this when searches fail. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
The search → resolve URL → download → bulk download chain is clearly distinct, as are the mirror-management tools. The only soft overlap is libgen_list_mirrors vs libgen_status, since both report on mirrors, though descriptions differentiate (configuration listing vs active probing with latency/errors).
Every tool uses the same libgen_ prefix with a snake_case verb_noun suffix (libgen_search, libgen_download, libgen_bulk_download, libgen_set_mirror). Fully predictable pattern with no deviation.
Seven tools is a well-scoped set for a downloader: search, resolve, single download, bulk download, plus three mirror management operations. No tool appears redundant or gratuitous.
The core workflow (search, resolve link, download, batch download, mirror configuration/recovery) is fully covered with sensible safety behavior like md5 verification and no-overwrite. Minor gap: no dedicated metadata/detail lookup by md5 beyond the detail URL returned by search.