zlib-mcp
zlib-mcp
Un servidor MCP sobre stdio que le da a cualquier agente de IA — Claude Code, Codex CLI, Cursor, Claude Desktop — la capacidad de buscar en z-library y descargar libros.
Trae tu propia cuenta. No hay backend compartido, ni clave API, ni proxy: el servidor se ejecuta en tu máquina, habla directamente con z-library y usa tus credenciales y tu cuota.
Herramientas
Herramienta | Qué hace | Necesita credenciales |
| Busca por título / autor / ISBN, con filtros de formato, idioma y año | sí |
| Obtiene un enlace de descarga directa para un libro (sin escribir archivo) | sí |
| Descarga un libro en un directorio que configures | sí |
| Comprueba la cuota de descargas restante de hoy | sí |
| Ayuda puntual: intercambia email + contraseña por credenciales remix | no |
zlib_download solo aparece si configuras ZLIB_DOWNLOAD_DIR — un servidor MCP que pueda escribir archivos en cualquier lugar por defecto no es un comportamiento aceptable, así que tienes que nombrar el directorio tú mismo.
Related MCP server: open-public-domain
Requisitos
Node.js ≥ 20
Una cuenta de z-library
Configuración en 5 minutos
1. Obtén tus credenciales
Si ya conoces tu remix_userid / remix_userkey, salta al siguiente paso. Si no, añade el servidor solo con tu email y contraseña (ver los fragmentos de configuración más abajo), luego pide a tu agente que ejecute zlib_login una vez y pon el remix_id / remix_key devuelto en la configuración de forma permanente.
También puedes ejecutarlo directamente desde una terminal:
ZLIB_EMAIL=you@example.com ZLIB_PASSWORD='…' npx zlib-mcp2. Añade el servidor a tu cliente
Cada cliente necesita las mismas tres cosas: el comando npx, el argumento zlib-mcp y un bloque env.
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-mcpO edita ~/.claude.json / .mcp.json directamente usando el JSON de abajo.
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. Pruébalo
Encuentra el Designing Data-Intensive Applications de Kleppmann en epub y descarga el primer resultado.
Configuración
Variable | ¿Obligatoria? | Por defecto | Notas |
| una de dos | — | Tu |
| una de dos | — | Tu |
| una de dos | — | Alternativa: se intercambia por credenciales remix en el primer uso |
| una de dos | — | Alternativa, se usa con |
| no |
| Espejo ascendente; cámbialo si te bloquean |
| no | (sin definir → | Dónde se escriben las descargas |
| no |
| Archivos mayores necesitan |
| no |
| Tiempo de espera de conexión por petición |
| no |
| Pon |
| no |
|
|
Precedencia de credenciales
ZLIB_REMIX_ID+ZLIB_REMIX_KEYCredenciales en caché de un inicio de sesión anterior con
ZLIB_EMAIL(~/.zlib-mcp/credentials.json, modo600)ZLIB_EMAIL+ZLIB_PASSWORD→ se inicia sesión en la primera llamada a una herramienta, no al arrancar
La caché existe para que un reinicio del cliente no provoque un nuevo inicio de sesión cada vez — los inicios de sesión repetidos son lo que hace que el sistema antiabuso de z-library te detecte. Solo almacena el id y la clave remix; tu contraseña nunca se escribe en disco, se registra ni la devuelve ninguna herramienta. En Windows el modo 600 no tiene efecto (el sistema operativo ignora los permisos POSIX) — pon ZLIB_CREDENTIAL_CACHE=0 si eso te importa.
Si no hay nada configurado, el servidor igualmente arranca y lista sus herramientas; llamar a una devuelve instrucciones sobre qué configurar. No se bloquea — un servidor MCP bloqueado simplemente aparece como "no disponible" en la mayoría de clientes, sin nada que depurar.
Solución de problemas
"El host ascendente … parece estar bloqueando esta solicitud" — el espejo está detrás de un muro antibots. Pon ZLIB_HOST a otro y reinicia el cliente. Los espejos conocidos cambian a menudo; 1lib.sk está bloqueado actualmente, pkuedu.xyz funciona ahora mismo. Cualquier cosa que sirva los mismos endpoints /eapi/* servirá.
"z-library rechazó las credenciales actuales" — tu clave remix ha caducado. Ejecuta zlib_login de nuevo y actualiza la configuración. Si usas la alternativa de email/contraseña, borra ~/.zlib-mcp/credentials.json para forzar un inicio de sesión nuevo.
"cuota de descargas alcanzada" — las cuentas gratuitas tienen un número pequeño de descargas al día. zlib_limits muestra el contador; se reinicia en el lado de z-library a medianoche UTC.
No aparece nada en el cliente — revisa el registro MCP del cliente; este servidor escribe todos los diagnósticos en stderr. ZLIB_LOG_LEVEL=debug lo hace más hablador.
Falta zlib_download — no has configurado ZLIB_DOWNLOAD_DIR. Eso es a propósito.
Desarrollo
pnpm install
pnpm check # format check → lint → typecheck → tests
pnpm buildPara probar una versión no publicada directamente desde git, apunta el command/args de tu cliente a
npx / ["-y", "github:shiyi-0x7f/zlib-mcp"] — el script prepare lo compila al instalarlo.
Las pruebas nunca tocan el servidor real — fetch está simulado en todas partes.
Legal
Esta herramienta solo proporciona acceso API a tu propia cuenta de z-library. No aloja nada, no distribuye nada y no incluye contenido con derechos de autor. Asegurarte de que su uso sea legal donde estás es tu responsabilidad. Tu cuenta, tu cuota, tu riesgo — una cuenta bloqueada por abuso es tuya para perder.
Licencia
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