Skip to content
Z-Library logo
MCP server
Registry

Z-Library MCP Server

Search and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.

Z-Library scores 75 (Good), licensed MIT and written in Go. It installs as a local process. It does not declare tools yet. Filed under AI and memory. GitHub shows 4,057 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by heartleoMITGo4.1K stars
Trust score
75Good
Trust score 75 of 100, Good

Good trust

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

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 75 comes from

22 + 20 + 12 + 10 + 4 + 7 = 75. 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.
Popularity12 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 12 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

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

Security: 4 of 10 points.
Docs7 / 10

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

Docs: 7 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": {    "heartleo-zlib": {      "command": "npx",      "args": [        "-y",        "https://github.com/heartleo/zlib/releases/download/v0.0.15/zlib_0.0.15_linux_x86_64.mcpb"      ],      "env": {        "ZLIB_MCP_READ_ONLY": "false",        "ZLIB_MCP_ALLOWED_DIR": ""      }    }  }}

Environment variables

NameRequiredNotes
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.
ZLIB_MCP_READ_ONLYOptionalSet to true to expose only read tools: no download, history deletion, Kindle or WeRead delivery, or metadata editing.
ZLIB_MCP_ALLOWED_DIROptionalA folder to keep downloads, Kindle attachments, WeRead imports and the metadata tools inside. Leave empty for no limit.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

A Z-Library CLI for you and your AI agents.

English | 简体中文

Install · Quick start · Terminal interface · Commands · Agent setup · Docs

Features

🔍 Search — filter by year, language, and format; sort results
📚 Browse — favorites, recommendations, popular books, and download history
📥 Download — view book details, choose a download directory
🖼️ Covers — show book covers in the terminal
🏷️ Metadata — look up and edit e-book metadata
📖 Send to Kindle — deliver files to your Kindle address
🌏 Send to WeRead — import books into your WeRead shelf
🕒 Profile — check your daily download quota
🎨 Themes — change the color theme
🌐 Network — check which mirrors work, trust your own mirror, or use a proxy
🤖 AI Agent Integration — integrate with Claude Code and Codex through Agent plugins

Install

macOS / Linux with Homebrew:

brew install heartleo/tap/zlib-cli

[!IMPORTANT] The Homebrew formula was renamed from zlib to zlib-cli.
Use the command above. The installed command is still zlib.

macOS / Linux with the install script (installs to /usr/local/bin, may ask for sudo):

curl -fsSL https://raw.githubusercontent.com/heartleo/zlib/main/install.sh | sh

Windows with winget:

winget install --id heartleo.zlib --exact

Or download a binary from Releases and put it on your PATH. See Installation for Go installation, source builds, and upgrades.

Quick start

You need a Z-Library account. First, find a domain reachable from your network:

zlib doctor

Log in with a domain from the results. Replace the example URL below with one from your results; enter your email and password in the prompt:

zlib login --domain https://z-lib.gd
zlib tui

Press /, choose /search, enter a title, author, or ISBN, and press Ctrl+S. You can also type /search dune and press Enter. Select a book and press Enter to confirm the download.

Downloads default to the current directory. You can choose another folder before downloading. Login is saved locally; subsequent sessions only need zlib tui.

If no domain works or login fails, see Troubleshooting. Existing browser sessions can be imported as cookies.

Terminal interface

zlib tui opens one persistent shell. Every screen lists its keys at the bottom; these cover a first session:

KeyAction
/Open the command list: search, favorites, history, profile, metadata, settings, themes
↑/↓ or j/kSelect a book
←/→Previous or next page of results
EnterDownload the selected book, after a confirmation
Ctrl+FChange the query and filters of the current search
EscGo back
/quitExit

On a terminal with Kitty graphics or Sixel support, at least 100 columns by 20 rows, the selected book's card shows its cover; other terminals show text only (Book covers). /meta opens a file picker, then looks the chosen e-book up online and lets you review each field before writing it. It needs no login (E-book metadata).

Settings live under /config (network, downloads, search formats, metadata, Kindle, WeRead). See Terminal interface for every screen and key.

Commands

Pass a query for table output, or add --json for scripts:

zlib search "dune" --ext epub
zlib search "dune" --ext epub --json --count 10
TaskCommand
Browse favoriteszlib favorites
Browse recommendationszlib recommended
Browse popular bookszlib most-popular
Browse download historyzlib history
Check account and quotazlib profile
Send to Kindlezlib kindle send ./book.epub
Send to WeReadzlib weread import ./book.epub
Show a file's metadatazlib meta book.epub
Look up a file's metadatazlib meta book.epub --fetch
Edit a file's metadatazlib meta book.epub -t "Dune" -a "Frank Herbert" --rename

To download, replace id:hash with a book's complete id from the results:

zlib download "id:hash"

Run zlib <command> --help for flags. Usage covers filters, pagination, and download options.

Agent setup

Install the plugin, or register the MCP server (zlib mcp). The plugin brings the skills and the MCP server. If zlib is missing, the skills install it on first use; the MCP server needs it on PATH. Log in yourself with zlib login so your password stays out of chat.

Claude Code

Plugin:

/plugin marketplace add heartleo/zlib
/plugin install zlib@zlib-plugin-cc

Codex

Plugin:

codex plugin marketplace add heartleo/zlib
codex plugin add zlib@zlib

Grok

Plugin:

grok plugin marketplace add heartleo/zlib
grok plugin install zlib --trust

MCP server

Register zlib mcp as a local stdio server. zlib must be on PATH and signed in:

# Claude Code
claude mcp add -s user zlib -- zlib mcp

# Codex
codex mcp add zlib -- zlib mcp

# Grok
grok mcp add zlib -- zlib mcp

Add --read-only after mcp to hide download, history deletion, Kindle delivery, WeRead import and metadata editing. See MCP server for other clients, flags, and tools.

Documentation

GuideCovers
InstallationInstall methods, source builds, zlib update
UsageSearch, downloads, favorites, history
Terminal interfaceCommands and keyboard controls
Book coversSupported terminals, limits and cache
E-book metadataLookup sources, editing, renaming, formats
ConfigurationDomains, proxies, folders, configuration paths
ThemesAvailable palettes and preview controls
KindleSMTP setup and delivery
WeReadQR login and imports into WeRead
MCP serverClient setup, flags, and tools for zlib mcp
TroubleshootingLogin and network problems

Report bugs in Issues with your zlib version, OS, command, and error. Omit passwords, cookies, and session files. Report security vulnerabilities privately as described in SECURITY.md.

Star History

Frequently asked questions

What is Z-Library MCP Server?

Search and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.

How do I install Z-Library 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. Z-Library MCP Server runs locally from the MCP bundle https://github.com/heartleo/zlib/releases/download/v0.0.15/zlib_0.0.15_linux_x86_64.mcpb with the command npx -y https://github.com/heartleo/zlib/releases/download/v0.0.15/zlib_0.0.15_linux_x86_64.mcpb.

Is Z-Library MCP Server free and open source?

Yes. Z-Library MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does Z-Library MCP Server support remote (HTTP) connections?

No remote endpoint is listed for Z-Library MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is Z-Library MCP Server's trust score calculated?

Z-Library MCP Server scores 75 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