download-books-mcp

download-books-mcp

Enables agents to search and download books from LibGen and Z-Library via MCP tools, abstracting provider details behind neutral labels.

Category
Visit Server

README

download-books-mcp

Local MCP server and Codex skill for agent-driven book search and download through LibGen and Z-Library / Zeta Library.

This repo wraps two existing Python clients:

The purpose is to make those sources usable from MCP clients such as Codex, Claude Code, and other agents while keeping provider-specific details out of the agent-facing tool contract. The README is explicit for humans and GitHub search; the MCP tools and skill use neutral provider labels and clean IDs.

The MCP surface is intentionally small:

  • search_books(...) returns clean candidates with a temporary id.
  • download_book(id=...) downloads the selected candidate into a local library folder.

Internally, the server can query LibGen, Z-Library / Zeta Library, or both. Externally, provider internals stay behind neutral labels (provider_1, provider_2, all) so agents can use the MCP tools without handling provider-specific links, hashes, mirrors, URLs, or identifiers.

Use only sources, credentials, and documents you are authorized to access.

Install

git clone https://github.com/mateogon/download-books-mcp.git
cd download-books-mcp
uv sync

Copy the environment example and fill local values:

cp .env.example .env

Important settings:

DOWNLOAD_BOOKS_PROVIDER=all
DOWNLOAD_BOOKS_LIBRARY_DIR=~/Downloads/books
BOOK_PROVIDER_2_EMAIL=
BOOK_PROVIDER_2_PASSWORD=

Agent Installation

There are two pieces:

  • MCP server: the runtime tools agents call.
  • Skill: the workflow that tells Codex how to use those tools cleanly.

Add the MCP server to Codex by copying examples/codex-config.toml into ~/.codex/config.toml and replacing /absolute/path/to/download-books-mcp with your clone path.

Install the Codex skill:

./scripts/install-codex-skill.sh

Restart Codex after changing MCP config or installing the skill.

For Hermes, use examples/hermes-mcp.yaml.

MCP Tools

search_books

Parameters:

query: str
limit: int = 10
preferred_language: str = "English"
provider_name: str = "default"  # default | all | provider_1 | provider_2
search_type: str = "default"    # default | title | author
topic: str = "books"
preferred_author: str | None = None

Clean results include:

id, title, author, year, language, extension, size, publisher, pages, score

Raw provider internals are cached locally for download_book, but they are not returned in normal MCP results.

download_book

Parameters:

id: str | int
library_dir: str | None = None

If library_dir is omitted, the server uses DOWNLOAD_BOOKS_LIBRARY_DIR.

Default output layout:

<library_dir>/Sources/<Author - Title>/00 - Fuentes/<Title>.<extension>

CLI

Search clean candidates:

uv run download-books search "The Embodied Mind" --search-type title --limit 10

Download a selected result:

uv run download-books download <ID>

Local diagnostic output:

uv run download-books search "The Embodied Mind" --raw --json

Provider Routing

Visible provider options are:

  • default uses DOWNLOAD_BOOKS_PROVIDER, defaulting to all
  • all searches every available configured provider
  • provider_1 searches only the LibGen adapter
  • provider_2 searches only the Z-Library / Zeta Library adapter

Agents should normally leave provider routing at default.

The MCP and skill intentionally keep the neutral names. Humans reading this repo should understand the mapping; agents using the tool should not need to.

Development

uv run --extra dev pytest
uv run python -m compileall src

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured