Book Fetch

Provides access to book content via MCP with local caching and paging for long texts.
  • python

4

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kinshukk-book-fetch-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "<PATH_TO_PARENT_DIR>/libgen-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

Book Fetch MCP lets you talk to any published book inside your MCP client directly, with caching and paging for long texts. It provides a local MCP server you can run to fetch book content on demand, making it easy to ask questions and retrieve passages from a vast library without leaving your client environment.

How to use

You run the Book Fetch MCP locally and connect to it from your MCP client. The server exposes a toolchain that retrieves book content, caches long texts, and paginates results so you can read chapter-sized chunks without overwhelming the client. Use it to search, request specific pages or chapters, and prompt the client to summarize or extract quotes from a book. When you begin a long query, your MCP client can rely on the built-in cache to deliver results quickly and maintain context across pages.

How to install

Prerequisites you need before starting: you must have the uv runtime installed on your system.

Step 1: Verify uv is available on your path.

Step 2: Prepare the Book Fetch MCP directory and dependencies.

Step 3: Start the MCP server using the following runtime command specification shown in the configuration snippet.

{
  "mcpServers": {
    "book_fetcher": {
      "command": "uv",
      "args": [
        "--directory",
        "<PATH_TO_PARENT_DIR>/libgen-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

Additional content

Configuration shows a local, stdio-based MCP server that you run with a runtime command. If you need to customize the path to the library or the script, replace the placeholder with your actual path. The server name is book_fetcher, and it runs via the uv runner with a directory pointing to the library content and a Python entry script main.py.

Available tools

book_fetch

Retrieves book content on demand from the library, caches it in MCP, and serves pages or chapters on request.

paginate_cache

Maintains a cache of long books and provides paginated responses to MCP clients to avoid exceeding context limits.

mini_rag_engine

Optionally spawns a lightweight retrieval-augmented generation style workflow to improve long-context answers by re-ranking chunks before returning results.

scihub_integration

Plan to integrate Sci-Hub sources in the future to broaden access to public-domain and accessible texts.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational