Skip to main content
Glama
Book Downloader MCP

Book Downloader MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LIBGEN_MIRRORNoPin a LibGen+ mirror (e.g. `https://libgen.li/`) instead of discovering one.
LIBGEN_CONFIG_URLNoRemote JSON listing the current mirrors. Defaults to the upstream `config.v3.json`.upstream config.v3.json
LIBGEN_TIMEOUT_MSNoPer-request timeout.30000
LIBGEN_USER_AGENTNoOverride the browser user agent. Defaults to a Chrome UA.Chrome UA
LIBGEN_VERIFY_MD5NoVerify downloads against the LibGen md5.true
LIBGEN_CONCURRENCYNoParallel downloads for bulk calls (clamped to 1–5).2
LIBGEN_MAX_RETRIESNoRetries for 429/5xx/network failures, with exponential backoff.2
LIBGEN_DOWNLOAD_DIRNoWhere downloads are saved. `~` is expanded. Defaults to the process working directory.process cwd
LIBGEN_CONFIG_TTL_MSNoHow long to cache the mirror list.3600000
LIBGEN_MAX_DOWNLOAD_MBNoPer-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:

  1. libgen_search with a title, author or ISBN.

  2. libgen_download with the md5 of a result (or libgen_get_download_url to inspect the link first).

  3. 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 7 tools

Disambiguation4/5

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).

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues