Skip to content
MCP server
Registry

Book Downloader (LibGen) MCP Server

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

Book Downloader (LibGen) scores 64 (Good), licensed WTFPL and written in TypeScript. It installs as a local process. It declares 7 tools. Filed under Uncategorized. GitHub shows 2 stars. Package registries report about 84 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by abhinav-prabhakarWTFPLTypeScript2 stars
Trust score
64Good
Trust score 64 of 100, Good

Good trust

64 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • License present: wtfpl.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 64 comes from

22 + 20 + 2 + 6 + 4 + 10 = 64. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity2 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 2 of 20 points.
License6 / 10

A clear, OSI-style open-source license.

License: 6 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "abhinav-prabhakar-bookdownloadermcp": {      "command": "npx",      "args": [        "-y",        "book-downloader-mcp@4.0.1"      ],      "env": {        "LIBGEN_DOWNLOAD_DIR": "",        "LIBGEN_MIRROR": ""      }    }  }}

Environment variables

NameRequiredNotes
LIBGEN_DOWNLOAD_DIROptionalDirectory where downloaded books are saved. Defaults to the server's working directory.
LIBGEN_MIRROROptionalPin a specific LibGen+ mirror instead of discovering one automatically.

Tools7Tool docs quality grade F

All capabilities

About

Book Downloader MCP

npm version npm downloads License: WTFPL Node

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

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

Frequently asked questions

What is Book Downloader (LibGen) MCP Server?

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

How do I install Book Downloader (LibGen) MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Book Downloader (LibGen) MCP Server runs locally from the npm package book-downloader-mcp with the command npx -y book-downloader-mcp@4.0.1.

Is Book Downloader (LibGen) MCP Server free and open source?

Book Downloader (LibGen) MCP Server is released under the WTFPL license, which is not on MCPpedia's list of OSI-approved open-source licenses. Read the license terms before using it, especially commercially.

Does Book Downloader (LibGen) MCP Server support remote (HTTP) connections?

No remote endpoint is listed for Book Downloader (LibGen) MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does Book Downloader (LibGen) MCP Server provide?

Book Downloader (LibGen) MCP Server provides 7 tools, including libgen_bulk_download, libgen_download, libgen_get_download_url, and libgen_list_mirrors. See the full tool list for descriptions and parameters.

How is Book Downloader (LibGen) MCP Server's trust score calculated?

Book Downloader (LibGen) MCP Server scores 64 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server