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 分