zlib-mcp
zlib-mcp
Ein stdio-MCP-Server, der jedem KI-Agenten-Tool – Claude Code, Codex CLI, Cursor, Claude Desktop – die Möglichkeit gibt, in z-library zu suchen und Bücher herunterzuladen.
Bring dein eigenes Konto mit. Es gibt kein gemeinsames Backend, keinen API-Schlüssel, keinen Proxy: Der Server läuft auf deinem Rechner, spricht direkt mit z-library und nutzt deine Anmeldedaten und dein Kontingent.
Tools
Tool | Was es tut | Benötigt Anmeldedaten |
| Suche nach Titel / Autor / ISBN, mit Filtern für Format, Sprache und Jahr | ja |
| Direkten Download-Link für ein Buch abrufen (keine Datei wird geschrieben) | ja |
| Ein Buch in ein von dir konfiguriertes Verzeichnis herunterladen | ja |
| Verbleibendes Download-Kontingent für heute prüfen | ja |
| Einmaliger Helfer: E-Mail + Passwort gegen remix-Anmeldedaten eintauschen | nein |
zlib_download erscheint nur, wenn du ZLIB_DOWNLOAD_DIR gesetzt hast – ein MCP-Server, der standardmäßig überall Dateien schreiben kann, ist kein akzeptabler Standard. Du musst das Verzeichnis also selbst benennen.
Related MCP server: open-public-domain
Voraussetzungen
Node.js ≥ 20
Ein z-library-Konto
Einrichtung in 5 Minuten
1. Anmeldedaten besorgen
Wenn du deine remix_userid / remix_userkey bereits kennst, überspringe diesen Schritt. Andernfalls füge den Server nur mit deiner E-Mail und deinem Passwort hinzu (siehe die Konfigurationsausschnitte unten) und bitte deinen Agenten, einmal zlib_login auszuführen und die zurückgegebenen remix_id / remix_key dauerhaft in die Konfiguration einzutragen.
Du kannst es auch direkt aus einem Terminal ausführen:
ZLIB_EMAIL=you@example.com ZLIB_PASSWORD='…' npx zlib-mcp2. Server zum Client hinzufügen
Jeder Client akzeptiert dieselben drei Dinge: den Befehl npx, das Argument zlib-mcp und einen env-Block.
claude mcp add zlib \
--env ZLIB_REMIX_ID=123456 \
--env ZLIB_REMIX_KEY=your_remix_userkey \
--env ZLIB_DOWNLOAD_DIR="$HOME/Downloads/books" \
-- npx -y zlib-mcpOder bearbeite ~/.claude.json / .mcp.json direkt mit dem untenstehenden JSON.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"zlib": {
"command": "npx",
"args": ["-y", "zlib-mcp"],
"env": {
"ZLIB_REMIX_ID": "123456",
"ZLIB_REMIX_KEY": "your_remix_userkey",
"ZLIB_DOWNLOAD_DIR": "/Users/you/Downloads/books"
}
}
}
}{
"mcpServers": {
"zlib": {
"command": "npx",
"args": ["-y", "zlib-mcp"],
"env": {
"ZLIB_REMIX_ID": "123456",
"ZLIB_REMIX_KEY": "your_remix_userkey",
"ZLIB_DOWNLOAD_DIR": "/Users/you/Downloads/books"
}
}
}
}[mcp_servers.zlib]
command = "npx"
args = ["-y", "zlib-mcp"]
[mcp_servers.zlib.env]
ZLIB_REMIX_ID = "123456"
ZLIB_REMIX_KEY = "your_remix_userkey"
ZLIB_DOWNLOAD_DIR = "/Users/you/Downloads/books"3. Ausprobieren
Finde Kleppmanns Designing Data-Intensive Applications im EPUB-Format und lade dann das erste Ergebnis herunter.
Konfiguration
Variable | Erforderlich | Standard | Hinweise |
| eines von zwei | — | Deine |
| eines von zwei | — | Deine |
| eines von zwei | — | Fallback: wird bei erster Nutzung gegen remix-Anmeldedaten eingetauscht |
| eines von zwei | — | Fallback, wird mit |
| nein |
| Upstream-Mirror; ändere ihn, wenn du blockiert wirst |
| nein | (nicht gesetzt → | Wohin Downloads geschrieben werden |
| nein |
| Dateien darüber benötigen |
| nein |
| Connect-Timeout pro Anfrage |
| nein |
| Setze |
| nein |
|
|
Priorität der Anmeldedaten
ZLIB_REMIX_ID+ZLIB_REMIX_KEYZwischengespeicherte Anmeldedaten von einem früheren
ZLIB_EMAIL-Login (~/.zlib-mcp/credentials.json, Modus600)ZLIB_EMAIL+ZLIB_PASSWORD→ Login erfolgt beim ersten Tool-Aufruf, nicht beim Start
Der Cache existiert, damit ein Neustart des Clients nicht jedes Mal einen neuen Login auslöst – wiederholte Logins sind es, die das Anti-Missbrauchssystem von z-library aufmerksam machen. Er speichert nur die remix-ID und den remix-Key; dein Passwort wird niemals auf die Festplatte geschrieben, protokolliert oder von einem Tool zurückgegeben. Unter Windows ist der Modus 600 wirkungslos (das Betriebssystem ignoriert POSIX-Berechtigungen) – setze ZLIB_CREDENTIAL_CACHE=0, falls das für dich relevant ist.
Wenn nichts konfiguriert ist, startet der Server trotzdem und listet seine Tools auf; ein Aufruf gibt Hinweise, was zu setzen ist. Er stürzt nicht ab – ein abgestürzter MCP-Server erscheint in den meisten Clients nur als „nicht verfügbar“, ohne dass etwas zu debuggen wäre.
Fehlerbehebung
„Upstream-Host … scheint diese Anfrage zu blockieren“ – der Mirror steht hinter einer Anti-Bot-Wand. Setze ZLIB_HOST auf einen anderen und starte den Client neu. Bekannte Mirrors ändern sich häufig; 1lib.sk ist derzeit blockiert, pkuedu.xyz funktioniert derzeit. Alles, was dieselben /eapi/*-Endpunkte bedient, funktioniert.
„z-library hat die aktuellen Anmeldedaten abgelehnt“ – dein remix-Key ist abgelaufen. Führe zlib_login erneut aus und aktualisiere die Konfiguration. Wenn du den E-Mail/Passwort-Fallback verwendest, lösche ~/.zlib-mcp/credentials.json, um einen neuen Login zu erzwingen.
„Download-Kontingent erreicht“ – kostenlose Konten erhalten eine begrenzte Anzahl von Downloads pro Tag. zlib_limits zeigt den Zähler; er wird auf der Seite von z-library um Mitternacht UTC zurückgesetzt.
Im Client erscheint nichts – prüfe das MCP-Log des Clients; dieser Server schreibt alle Diagnosen nach stderr. ZLIB_LOG_LEVEL=debug macht es gesprächiger.
zlib_download fehlt – du hast ZLIB_DOWNLOAD_DIR nicht gesetzt. Das ist beabsichtigt.
Entwicklung
pnpm install
pnpm check # format check → lint → typecheck → tests
pnpm buildUm eine unveröffentlichte Version direkt aus Git auszuprobieren, richte die command/args deines Clients auf
npx / ["-y", "github:shiyi-0x7f/zlib-mcp"] – das prepare-Skript baut es bei der Installation.
Tests treffen nie den echten Upstream – fetch ist überall gestubbt.
Rechtliches
Dieses Tool bietet nur API-Zugriff auf dein eigenes z-library-Konto. Es hostet nichts, verteilt nichts und enthält keine urheberrechtlich geschützten Inhalte. Dass deine Nutzung dort, wo du dich befindest, legal ist, liegt in deiner Verantwortung. Dein Konto, dein Kontingent, dein Risiko – ein wegen Missbrauchs gesperrtes Konto ist deins zu verlieren.
Lizenz
MIT
Available Tools
4 toolszlib_get_download_urlGet z-library download URLA
Get a direct download URL for one book. Requires the "id" and "hash" from a zlib_search result. The link is short-lived and tied to the session that fetched it — use it right away, never cache or reuse it. Fetching a link consumes one unit of the account's daily download allowance (see zlib_limits). This server cannot save files to disk: set the ZLIB_DOWNLOAD_DIR environment variable in the MCP client config to a directory you want downloads written to, then restart the server to enable zlib_download.
Inputs: hash (required), book_id (required).
zlib_limitsCheck z-library download quotaA
Check the z-library account's daily download allowance: how many downloads were used today, the daily cap, and how many remain. Call this before a batch of downloads, or when a download fails with a quota error. Takes no arguments and does not consume any allowance.
Inputs: no named parameters.
zlib_loginExchange z-library credentialsA
Exchange a z-library email + password for the long-lived remix credentials (remix_id / remix_key). This is a one-time setup helper, not a per-call login: put the returned values into your MCP client config as ZLIB_REMIX_ID and ZLIB_REMIX_KEY, then restart the server. The password is never stored, logged, or returned. Do not call this before every search.
Inputs: email (required), password (required).
zlib_searchSearch z-libraryA
Search z-library for books. Returns a trimmed list — each entry carries the "id" and "hash" that zlib_get_download_url and zlib_download require, plus title/author/year/language/extension/size. Present the candidates to the user and let them pick before downloading anything.
Inputs: query (required), page, limit, order, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose: search for books, fetch download URLs, check account limits, and handle login. No two tools overlap in functionality, making selection unambiguous.
All tools share the 'zlib_' prefix and most follow a verb-based pattern (search, get_download_url, login), but 'limits' is a noun rather than a verb like 'get_limits' or 'check_limits'. Minor deviation but still coherent.
With 4 tools covering search, URL generation, quota checking, and authentication, the set is well-scoped for a focused book download workflow. No redundant tools, and each one earns its place.
The descriptions repeatedly mention a 'zlib_download' tool and instructions for enabling it, but that tool is not included in the provided set. This leaves a critical gap in the core workflow, preventing actual file downloads.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Web search API and MCP server for developers building AI agents.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for searching and downloading books from Library Genesis, supporting EPUB, MOBI, PDF, and more through natural language queries.38MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that gives AI agents access to the world's public domain library. Search, read, and navigate books and audiobooks from Project Gutenberg and LibriVox.MIT
- AlicenseAqualityDmaintenanceMCP server that lets AI agents search YouTube and fetch transcripts.23MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for AI assistants to search and download ebooks from Z-Library and Anna's Archive, configured locally with automatic setup and download path.4AGPL 3.0