Project Gutenberg MCP

io.github.bobbyhouse由 GitHub 帳號 bobbyhouse 發布v1.2.0更新於 Oct 25, 2026

Read Project Gutenberg books via MCP. Search, fetch metadata, and retrieve text in passages.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

一個 MCP 伺服器,讓助理透過自架鏡像搜尋、檢視並閱讀 Project Gutenberg 的書籍。

可以做什麼
依書名或作者搜尋書籍,可加上語言篩選,並可為後續呼叫設定預設書籍 ID。取得書籍中繼資料,包括書名、作者與可用格式。下載書籍的完整純文字。列出書籍的固定大小段落鍵,並依段落鍵取得單一段落,段落大小可設定。
適用情境
當你希望助理查閱並閱讀 Project Gutenberg 上的公版文學作品,例如引用、摘要或討論某部作品,且願意執行本機鏡像而非直接存取主站時使用。
執行需求
以 Docker 映像透過 stdio 在本機執行,或以二進位形式使用 stdio 或 HTTP 傳輸。需要一個執行中的 Gutenberg 鏡像,透過 GUTENBERG_BASE_URL 指定;儲存庫自帶一個鏡像,啟動時下載目錄(約 5 MB 壓縮)並快取書籍檔案。必須設定 GUTENBERG_TOOLS 指定要暴露的工具。選用:GUTENBERG_BOOK_ID、GUTENBERG_CHUNK_SIZE、GUTENBERG_LANGUAGE。本機建置映像需要登入 Docker Hub。
安裝前請注意
Project Gutenberg 的機器人存取政策規定網站僅供人類使用者使用,自動存取可能導致 IP 被封鎖,因此此伺服器應針對自架鏡像而非主站執行。鏡像會下載目錄並在磁碟上快取書籍檔案。不涉及憑證或付費。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Project Gutenberg MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

project-gutenberg-mcp

[MCP Registry] [Docker Hub]

An MCP server for reading books from Project Gutenberg.

Project Gutenberg Terms of Service

Project Gutenberg's robot access policy states that the site is intended for human users only. Automated access may result in your IP being blocked.

To use this MCP server you must run your own mirror. Project Gutenberg explicitly supports and encourages mirroring — see their mirroring guide for details.

This repository includes a ready-to-run mirror server in the mirror/ directory.

Mirror Setup

The mirror server downloads the Project Gutenberg catalog on startup (~5 MB compressed) and caches book files locally on first access. It exposes the URL structure that this MCP server expects.

Docker Compose (recommended)

Runs the mirror and MCP server together. The MCP server is exposed on HTTP at port 8081.

bash
docker compose up

The mirror is available at http://localhost:8080 and the MCP server at http://localhost:8081/mcp.

Mirror only (stdio)

Build and start just the mirror, then connect an MCP client via stdio.

bash
task build:mirrortask start:mirror

The mirror runs at http://localhost:8080. Example MCP client config (stdio):

json
{  "mcpServers": {    "project-gutenberg-mcp": {      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "GUTENBERG_BASE_URL=http://host.docker.internal:8080",        "-e", "GUTENBERG_TOOLS=search_books,get_book_metadata,list_passages,get_passage",        "roberthouse224/project-gutenberg-mcp"      ]    }  }}

Configuration

All configuration is via environment variables.

VariableRequiredDescription
GUTENBERG_BASE_URLYesBase URL of your Gutenberg mirror (see Mirror Setup above)
GUTENBERG_TOOLSYesComma-separated list of tools to expose (see below)
GUTENBERG_BOOK_IDNoProject Gutenberg book ID to use as default
GUTENBERG_CHUNK_SIZENoPassage size in bytes (default: 4096)
GUTENBERG_LANGUAGENoDefault ISO 639-1 language code for search_books (default: en)

Tools

ToolDescription
search_booksSearch for books by title or author
get_book_metadataFetch metadata (title, authors, formats) for a book
fetch_book_textDownload the full plain text of a book
list_passagesList fixed-size passage keys for a book
get_passageFetch a specific passage by its key

When GUTENBERG_BOOK_ID is set, tools that take a book ID will use it as the default. When it is not set, include search_books in your tools list so an agent can discover IDs first.

Running

stdio

bash
GUTENBERG_BASE_URL=http://localhost:8080 \GUTENBERG_BOOK_ID=2680 \GUTENBERG_TOOLS=get_book_metadata,list_passages,get_passage \./project-gutenberg-mcp --transport stdio

HTTP

bash
GUTENBERG_BASE_URL=http://localhost:8080 \GUTENBERG_BOOK_ID=2680 \GUTENBERG_TOOLS=get_book_metadata,list_passages,get_passage \./project-gutenberg-mcp --transport http --addr :8081

Docker

Pulling pre-built images

bash
# MCP serverdocker pull roberthouse224/project-gutenberg-mcp:1.2.0
# Mirrordocker pull roberthouse224/gutenberg-mirror:1.2.0

Building locally

Both Dockerfiles use Docker Hardened Images (DHI) for enhanced security. Building requires authentication to Docker Hub:

bash
docker login

Then build:

bash
# Build MCP serverdocker build -t project-gutenberg-mcp .
# Build mirrordocker build -f mirror/Dockerfile -t gutenberg-mirror ./mirror

Running the MCP server

bash
# HTTPdocker run -p 8081:8081 \  -e GUTENBERG_BASE_URL=http://host.docker.internal:8080 \  -e GUTENBERG_BOOK_ID=2680 \  -e GUTENBERG_TOOLS=get_book_metadata,list_passages,get_passage \  roberthouse224/project-gutenberg-mcp --transport http --addr :8081
# stdiodocker run -i --rm \  -e GUTENBERG_BASE_URL=http://host.docker.internal:8080 \  -e GUTENBERG_BOOK_ID=2680 \  -e GUTENBERG_TOOLS=get_book_metadata,list_passages,get_passage \  roberthouse224/project-gutenberg-mcp

Running the mirror

bash
# Create a named volume for cache persistencedocker volume create gutenberg-cache
# Run mirror (serves on http://localhost:8080)docker run -d \  -p 8080:8080 \  -v gutenberg-cache:/data \  --name gutenberg-mirror \  roberthouse224/gutenberg-mirror:1.2.0

Multi-architecture builds

Both images support linux/amd64 and linux/arm64 architectures. To build and push multi-arch images:

bash
# Create a builder instancedocker buildx create --name multiarch --use
# Build and push MCP serverdocker buildx build \  --platform linux/amd64,linux/arm64 \  -t roberthouse224/project-gutenberg-mcp:1.2.0 \  -t roberthouse224/project-gutenberg-mcp:latest \  --push \  .
# Build and push mirrordocker buildx build \  --platform linux/amd64,linux/arm64 \  -t roberthouse224/gutenberg-mirror:1.2.0 \  -t roberthouse224/gutenberg-mirror:latest \  --push \  -f mirror/Dockerfile \  ./mirror

MCP client config (stdio)

json
{  "mcpServers": {    "project-gutenberg-mcp": {      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "GUTENBERG_BASE_URL=http://host.docker.internal:8080",        "-e", "GUTENBERG_BOOK_ID=2680",        "-e", "GUTENBERG_TOOLS=get_book_metadata,list_passages,get_passage",        "roberthouse224/project-gutenberg-mcp:1.2.0"      ]    }  }}

Local builds (non-Docker)

bash
task build         # outputs to build/project-gutenberg-mcptask build:mirror  # outputs to mirror/build/mirrortask test

Book IDs

A few useful IDs:

BookID
Meditations — Marcus Aurelius2680
The Republic — Plato1497
Thus Spoke Zarathustra — Nietzsche1998
Moby Dick — Melville2701
Pride and Prejudice — Austen1342

來源:README.md,提交 067d64b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分