npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

biblio-mcp

v1.1.0

Published

One MCP server for Anna's Archive, Library Genesis, Sci-Hub, and Z-Library. Search books and papers, resolve download links, and fetch files — across all shadow libraries through a single unified interface.

Readme

biblio-mcp

CI npm version license

One MCP server for Anna's Archive, Library Genesis, Sci-Hub, and Z-Library.

Search books and papers across every major shadow library through a single unified interface, resolve download links, and fetch files — all from your MCP client (Claude Code, Claude Desktop, Cline, etc.).

No API keys. No login. No per-source servers to juggle. One server, six tools.


Why

Each shadow library has its own scrapers and quirks, and the community MCP servers for them are separate projects with separate configs — one for Anna's Archive, one for Libgen, one for Sci-Hub, one for Z-Library. biblio-mcp merges them into a single server with a shared data model:

  • One search fans out to Anna's Archive, Libgen, and Z-Library concurrently and de-duplicates results by MD5 hash (the universal key these libraries share), keeping the richest metadata for each unique book.
  • Mirror rotation is built in. Every source declares a list of mirror domains; a dead or blocked host automatically falls through to the next, and the working one is remembered. When domains change, you edit src/mirrors.ts — one file — and everything picks it up.
  • Per-source failures never blank the search. If Z-Library is down, you still get Anna's + Libgen results, with the failure reported separately.

Install

Requires Node.js ≥ 18.

# Run directly (no install)
npx biblio-mcp

# Or clone and build
git clone https://github.com/yashimosh/biblio-mcp.git
cd biblio-mcp
npm install
npm run build

Add to Claude Code

claude mcp add -s user biblio -- npx biblio-mcp
# or, from a local build:
claude mcp add -s user biblio -- node /absolute/path/to/biblio-mcp/dist/index.js

Add to Claude Desktop / Cline

{
  "mcpServers": {
    "biblio": {
      "command": "npx",
      "args": ["biblio-mcp"]
    }
  }
}

Tools

| Tool | What it does | |---|---| | search_books | Search Anna's Archive + Libgen + Z-Library at once; merged & deduped by MD5. | | book_details | Full metadata + download options for one book by MD5. | | get_download_links | Every resolvable download URL for an MD5 — Libgen get.php, Anna's partner servers, IPFS gateways. direct: true links point straight at the file. | | download_book | Fetch the file to a local directory by MD5 (tries direct links in order). | | search_papers | Academic paper / article search via Library Genesis scimag; returns DOIs. | | get_paper | Resolve a paper's PDF via Sci-Hub by DOI, URL, or title. |

Typical flow

  1. search_books({ query: "dune frank herbert" }) → results, each with an md5.
  2. get_download_links({ md5: "..." }) → pick a direct: true link, or
  3. download_book({ md5: "...", output_dir: "~/Downloads/books" }) → saved file.

For papers: search_papers({ query: "CRISPR gene editing" }) → grab a doiget_paper({ identifier: "10.1089/crispr.2019.0064" }).

Configuration

All optional — sensible defaults ship built-in. Override via environment variables:

| Variable | Purpose | Default | |---|---|---| | BIBLIO_ANNAS_MIRRORS | Comma-separated Anna's Archive base URLs | .org, .se, .li, .gl | | BIBLIO_LIBGEN_MIRRORS | Comma-separated Libgen base URLs | .li, .is, .rs, .st, .gs, .vg | | BIBLIO_SCIHUB_MIRRORS | Comma-separated Sci-Hub base URLs | .se, .st, .ru | | BIBLIO_ZLIB_MIRRORS | Comma-separated Z-Library domains | z-lib.io, z-library.sk, … | | BIBLIO_IPFS_GATEWAYS | IPFS gateway bases for CID fallback | ipfs.io, cloudflare-ipfs, pinata | | BIBLIO_TIMEOUT_MS | Per-request timeout | 20000 |

Known limitations

  • Sci-Hub mirrors sometimes gate behind captcha, but the PDF embed URL is still present in the HTML for most mirrors. get_paper extracts it successfully in the vast majority of cases. If all mirrors fail, it returns fallback URLs so you can open the article in a browser.
  • Z-Library rotates domains and gates most of its catalog behind login. The built-in public search is best-effort; when it's blocked, Anna's Archive (which indexes the Z-Library collection) covers the same books. Point BIBLIO_ZLIB_MIRRORS at your working personal domain for better results.
  • These sites change their HTML often. Parsers live in src/providers/ and mirrors in src/mirrors.ts — both are small and easy to patch.

Development

npm run dev     # run from source via tsx
npm run build   # compile to dist/
npm run smoke   # live end-to-end test against real mirrors

Architecture:

src/
  index.ts          MCP server + tool definitions
  http.ts           mirror-rotating fetch (retry, timeout, stickiness)
  mirrors.ts        all mirror domains — the one file to edit when hosts change
  types.ts          shared Book / Paper / DownloadLink model
  providers/
    annas.ts        Anna's Archive (primary book source + md5 resolver)
    libgen.ts       Library Genesis (books + scimag papers + direct downloads)
    scihub.ts       Sci-Hub (paper PDF resolution by DOI)
    zlibrary.ts     Z-Library (best-effort public search)
    index.ts        aggregation: fan-out, merge, dedup-by-md5

Legal

This tool is a client that queries publicly reachable third-party websites; it hosts no content itself. Copyright law varies by country. You are responsible for ensuring your use complies with the laws of your jurisdiction and with the rights of copyright holders. Provided for research, archival, and accessibility purposes. The authors do not endorse copyright infringement.

License

MIT