Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Book Downloader (LibGen)

by Abhinav-Prabhakarversion 4.0.1i★ 2iRuns on your computerRepository ↗
Registry nameio.github.Abhinav-Prabhakar/book-downloader-mcp

How to install

What it does

Search Library Genesis and download ebooks with MD5 verification and mirror failover.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Search & AI memory

Use together with

Skills that teach the AI this kind of work; they work alongside this one

timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

by google-research★ 35,6421 skills

Skill · How-to guide

Shadowbroker

Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…

by BigBodyCobain★ 11,6081 skills

Skill · How-to guide

google-maps-scraper

scrape data from Google Maps. Extracts data such as the name, address, phone number, website URL, rating, reviews number, latitude and longitude, reviews,email and more for each place

by gosom★ 8,2561 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity6/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score18/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Book Downloader (LibGen). Follow https://mcp.popnx.com/i/abhinav-prabhakar-book-downloader-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Book Downloader (LibGen) for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "book-downloader": { "command": "npx", "args": [ "-y", "book-downloader-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Book Downloader (LibGen) tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "book-downloader": {
          "command": "npx",
          "args": [
            "-y",
            "book-downloader-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Book Downloader (LibGen) and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Book Downloader (LibGen) or shows a Book Downloader (LibGen) tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LIBGEN_DOWNLOAD_DIR Directory where downloaded books are saved. Defaults to the server's working directory.
  • LIBGEN_MIRROR Pin a specific LibGen+ mirror instead of discovering one automatically.

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Book Downloader (LibGen) yet

Book Downloader (LibGen) runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Book Downloader (LibGen)

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Search & AI memory that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Book Downloader (LibGen) for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user book-downloader -- npx -y book-downloader-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Book Downloader (LibGen) tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user book-downloader -- npx -y book-downloader-mcp
  4. Type /mcp in Claude Code

    You should see Book Downloader (LibGen) listed as connected

  5. Try it

    Use Book Downloader (LibGen) and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Book Downloader (LibGen) or shows a Book Downloader (LibGen) tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LIBGEN_DOWNLOAD_DIR Directory where downloaded books are saved. Defaults to the server's working directory.
  • LIBGEN_MIRROR Pin a specific LibGen+ mirror instead of discovering one automatically.

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Book Downloader (LibGen) for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "book-downloader": { "command": "npx", "args": [ "-y", "book-downloader-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Book Downloader (LibGen) tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Book Downloader (LibGen) and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Book Downloader (LibGen) or shows a Book Downloader (LibGen) tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LIBGEN_DOWNLOAD_DIR Directory where downloaded books are saved. Defaults to the server's working directory.
  • LIBGEN_MIRROR Pin a specific LibGen+ mirror instead of discovering one automatically.

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Book Downloader (LibGen) for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "book-downloader": { "type": "stdio", "command": "npx", "args": [ "-y", "book-downloader-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Book Downloader (LibGen) tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Book Downloader (LibGen) and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Book Downloader (LibGen) or shows a Book Downloader (LibGen) tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LIBGEN_DOWNLOAD_DIR Directory where downloaded books are saved. Defaults to the server's working directory.
  • LIBGEN_MIRROR Pin a specific LibGen+ mirror instead of discovering one automatically.

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Book Downloader (LibGen)💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user book-downloader -- npx -y book-downloader-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "book-downloader": {
      "command": "npx",
      "args": [
        "-y",
        "book-downloader-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "book-downloader": {
      "command": "npx",
      "args": [
        "-y",
        "book-downloader-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "book-downloader": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "book-downloader-mcp"
      ]
    }
  }
}

Values you fill in

  • LIBGEN_DOWNLOAD_DIR env
    Directory where downloaded books are saved. Defaults to the server's working directory.
  • LIBGEN_MIRROR env
    Pin a specific LibGen+ mirror instead of discovering one automatically.

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
9/wk
Connection
Runs on your computer
Latest versioni
4.0.1
Published to registryi
Nov 12, 2026
Code last changedi
Nov 12, 2026
Maker
Abhinav-Prabhakar
Packages
npm: book-downloader-mcp
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 21, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account Abhinav-Prabhakar, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 9 days ago

  • ✓ Pass

    Has a licence

    Uses WTFPL

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for book-downloader-mcp@4.0.1

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/abhinav-prabhakar-book-downloader-mcp.svg)](https://mcp.popnx.com/en/servers/abhinav-prabhakar-book-downloader-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Search & AI memoryi

  • More stars than 83% of the other 6535 servers in this category
  • Published to the registry more recently than 83% of the other 6535 servers in this category
  • Basic checks equal to or better than 99% of the other 6535 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Book Downloader (LibGen) safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 9 days ago, and the latest version (4.0.1) reached the registry 9 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: OpenSEO, Exa, Microsoft Learn MCP, Docs, COTAL actions (cotal.ai)

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

OpenSEO

Keyword research, site audits, rank tracking and AI visibility for your AI agent.

by every-appWidely used★ 28.4KUpdated 7 days ago

Runs in the cloud✓ everyapp.com

Exa

Official Exa MCP for web search, content fetching, and multi-step research.

by exa-labsWidely used★ 5.2KUpdated yesterday

Runs in the cloud✓ service owner · exa.aiTried by the PopNx team

Microsoft Learn MCP

Official Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.

by MicrosoftDocsWidely used★ 2KUpdated 12 months ago

Runs in the cloud✓ service owner · microsoft.comTried by the PopNx team

Docs

Search and read Empryo's documentation. Read-only, no auth, no local access.

by proxysoulGrowing★ 1.6KUpdated 3 months ago

Runs in the cloud✓ empryo.com
Compared with similar ones
This one
Book Downloader (LibGen)
OpenSEOExaMicrosoft Learn MCPDocsCOTAL actions (cotal.ai)
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoYesYesYesNoNo
Basic checks3/35/52/44/44/44/4
LicenseWTFPLMITMITCC-BY-4.0NOASSERTIONApache-2.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

Book Downloader MCP

Ask your AI for a book, get the file.

A Model Context Protocol server for Library Genesis (LibGen+). Search, resolve and download ebooks from Claude, Cursor, VS Code, Windsurf, Zed or any other MCP client — with automatic mirror discovery, MD5 verification and bounded concurrency.

You: Find me "The Art of War" and download it.

Claude: → libgen_search(query: "the art of war") 25 results. → libgen_download(md5: "07fa8b41…") Saved /Users/you/Books/The Art of War.pdf (58 MB, md5 verified).


Contents

  • Why this server
  • Quick start
  • Tools
  • Example prompts
  • Configuration
  • Docker
  • Programmatic API
  • Development
  • Troubleshooting
  • Legal

Why this server

  • It actually works in 2026. LibGen+ mirrors answer non-browser user agents with a stock nginx page, so most scrapers look like the site is down. This server sends real browser headers, then verifies a mirror by running a live search rather than trusting a 200.
  • Mirrors die constantly. Every configured mirror is probed with a real request; the warm mirror is re-probed and rotated automatically when a call fails.
  • Downloads you can trust. Files stream to disk with a size cap, a .part file, and an MD5 check against the LibGen record. Existing files are never silently overwritten.
  • Safe by construction. Filenames are sanitized (including Windows reserved names and traversal attempts), and the server refuses expired-key HTML pages instead of saving them as .pdf.
  • Made for agents. Seven focused, snake_case tools with Zod-validated inputs and actionable error messages, plus a --status CLI probe for when a tool call fails.

Quick start

The package runs on demand through npx; there is nothing to install globally.

Claude Code

claude mcp add libgen \

--env LIBGEN_DOWNLOAD_DIR=~/Books \ -- npx -y book-downloader-mcp

Claude Desktop (claude_desktop_config.json)

{

"mcpServers": { "libgen": { "command": "npx", "args": ["-y", "book-downloader-mcp"], "env": { "LIBGEN_DOWNLOAD_DIR": "~/Books" } } } }

Cursor (~/.cursor/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json) and Cline use the same shape:

{

"mcpServers": { "libgen": { "command": "npx", "args": ["-y", "book-downloader-mcp"] } } }

VS Code (.vscode/mcp.json)

{

"servers": { "libgen": { "type": "stdio", "command": "npx", "args": ["-y", "book-downloader-mcp"] } } }

Anything else — the generic stdio snippet:

{

"command": "npx", "args": ["-y", "book-downloader-mcp"] }

Check mirror health before wiring it into a client:

npx -y book-downloader-mcp --status

Tools

ToolRead-onlyWhat it does
libgen_search✓Search by title, author or ISBN. Returns metadata plus the md5 needed for downloads.
libgen_get_download_url✓Resolve the direct download URL for an md5 without downloading.
libgen_download—Download one file, verify its MD5, report the saved path and size.
libgen_bulk_download—Download 1–20 md5s with bounded concurrency; failures are reported per item.
libgen_list_mirrors✓Show configured mirrors, the active one, and the config version.
libgen_set_mirror—Pin a specific LibGen+ mirror for the session (probed before use).
libgen_status✓Probe every mirror with a real search and report latency and errors.

Search results carry title, authors, publisher, year, language, pages, size, extension, md5 and mirrorUrl. Downloads return status, path, filename, bytes and md5Verified.

Set LIBGEN_DOWNLOAD_DIR once, or pass downloadDir per call. Relative paths resolve against the server's working directory.

Example prompts

  • “Search LibGen for the 3rd edition of _Computer Networks_ by Tanenbaum.”
  • “Find an EPUB of _Dune_ and download the smallest result.”
  • “Download these five books into ~/Research/Books.”
  • “LibGen search is failing — check the mirrors and switch to a working one.”
  • “Get me the direct download link for this md5, I'll use curl.”

Configuration

All settings are environment variables; each has a safe default.

VariableDefaultDescription
LIBGEN_DOWNLOAD_DIRprocess cwdWhere downloads are saved. ~ is expanded.
LIBGEN_MIRROR—Pin a LibGen+ mirror (e.g. https://libgen.li/) instead of discovering one.
LIBGEN_CONFIG_URLupstream config.v3.jsonRemote JSON listing the current mirrors.
LIBGEN_TIMEOUT_MS30000Per-request timeout.
LIBGEN_MAX_RETRIES2Retries for 429/5xx/network failures, with exponential backoff.
LIBGEN_MAX_DOWNLOAD_MB512Per-file size cap.
LIBGEN_CONCURRENCY2Parallel downloads for bulk calls (clamped to 1–5).
LIBGEN_VERIFY_MD5trueVerify downloads against the LibGen md5.
LIBGEN_CONFIG_TTL_MS3600000How long to cache the mirror list.
LIBGEN_USER_AGENTChrome UAOverride the browser user agent.

CLI flags: --status (probe mirrors and exit), --version, --help.

Docker

docker build -t book-downloader-mcp .

Mount a folder so downloads persist outside the container

docker run -i --rm \ -v "$HOME/Books:/books" \ -e LIBGEN_DOWNLOAD_DIR=/books \ book-downloader-mcp

Mount a host folder to keep downloads after the container exits; the image defaults LIBGEN_DOWNLOAD_DIR to /books.

Programmatic API

import { LibgenClient, searchBooks, downloadByMd5, downloadByMd5List } from "book-downloader-mcp";

// One-off helpers (each creates a client) const results = await searchBooks("the art of war", 1, 10); const best = results.find((entry) => entry.extension === "pdf");

if (best?.md5) { const outcome = await downloadByMd5(best.md5, { downloadDir: "~/Books" }); console.log(outcome.status, outcome.path, outcome.md5Verified); }

// Reuse one client to keep the warm mirror and config cache const client = new LibgenClient(); const status = await client.status(); const outcomes = await client.downloadMany( results.flatMap((entry) => (entry.md5 ? [entry.md5] : [])).slice(0, 3), { concurrency: 2 } );

Useful exports: LibgenClient, createServer, TOOLS, loadConfig, HttpClient, LibgenPlusAdapter, LibgenError, searchBooks, downloadByMd5, downloadByMd5List.

Development

npm install

npm run dev # run the server from source with reload npm test # 50 vitest tests npm run test:coverage npm run typecheck npm run lint npm run build # emit dist/ and .d.ts node dist/cli.js --status

Project layout:

src/

cli.ts CLI entry point (stdio server, --status) config.ts Environment parsing libgen.ts Client: mirror discovery, search, download, bulk core/ HTTP (browser headers, retries), files, errors api/ Mirror config, HTML parsing, LibGen+ adapter mcp/ MCPServer factory and the seven tool definitions tests/ Adapter, HTTP, config, files, client and MCP tests

Pull requests are welcome. Run npm run lint && npm test && npm run build before opening one.

Troubleshooting

SymptomFix
“No working LibGen mirror found”Run npx -y book-downloader-mcp --status. If every mirror fails, set LIBGEN_MIRROR to a current LibGen+ URL.
Search returns nothingTry fewer, more specific terms. LibGen+ matches titles, authors and ISBNs, not full sentences.
The mirror returned a web page instead of a fileThe download key expired. Re-run the search and download a fresh md5.
md5Verified: falseThe mirror served a different file than the record describes. Inspect it before trusting it.
Download exceeds the size limitRaise LIBGEN_MAX_DOWNLOAD_MB or pass a smaller result.
Empty md5 in a resultThat row has no direct file (e.g. a metadata-only record). Pick another result.

Legal

This project only provides a client for Library Genesis mirrors operated by third parties. It does not host, mirror or distribute any content. Downloading copyrighted material without permission may be illegal where you live — you are responsible for what you download. The original project is obsfx/libgen-downloader.

License

WTFPL © Ömercan Balandı, with maintenance by Abhinav Prabhakar.